hb

package
v0.0.0-...-51bb37a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HB_VERSION_MAJOR  = C.HB_VERSION_MAJOR  // The major component of the library version available at compile-time.
	HB_VERSION_MICRO  = C.HB_VERSION_MICRO  // The micro component of the library version available at compile-time.
	HB_VERSION_MINOR  = C.HB_VERSION_MINOR  // The minor component of the library version available at compile-time.
	HB_VERSION_STRING = C.HB_VERSION_STRING // A string literal containing the library version available at compile-time.
)
View Source
const BufferReplacementCodepointDefault = 0xFFFD

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#HB-SEGMENT-PROPERTIES-DEFAULT:CAPS

View Source
const SetValueInvalid = C.HB_SET_VALUE_INVALID

SetValueInvalid is an unset Set value.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#HB-SET-VALUE-INVALID:CAPS

Variables

This section is empty.

Functions

func BufferAdd

func BufferAdd(buffer Buffer, codepoint Codepoint, cluster uint32)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-add

func BufferAllocationSuccessful

func BufferAllocationSuccessful(buffer Buffer) bool

BufferAllocationSuccessful Checks if allocating memory for the buffer succeeded.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-allocation-successful

func BufferAppend

func BufferAppend(dst, src Buffer, start, end uint32)

BufferAppend appends part of the src buffer to the dst buffer.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-append

func BufferClearContents

func BufferClearContents(buffer Buffer)

BufferClearContents resets the buffer to its initial status, as if it was just newly created with BufferCreate, but does not clear the Unicode functions and the replacement code point.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-clear-contents

func BufferDestroy

func BufferDestroy(buffer Buffer)

BufferDestroy De-allocates the buffer. It decreases the reference counts by one. Once reference counts reach zero, then the buffer and all associated resources are freed.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-destroy

func BufferPreAllocate

func BufferPreAllocate(buffer Buffer, size uint32) bool

BufferPreAllocate Pre allocates memory for buffer to fit at least size number of items. returns true on successful allocation.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-pre-allocate

func BufferReset

func BufferReset(buffer Buffer)

BufferReset resets the buffer to its initial status, as if it was just newly created with BufferCreate.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-reset

func BufferReverse

func BufferReverse(buffer Buffer)

BufferReverse reverses the buffer contents.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-reverse

func DirectionToString

func DirectionToString(direction Direction) string

DirectionToString converts a Direction to a string.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-to-string

func DrawCubicTo

func DrawCubicTo(dfuncs DrawFuncs, drawData unsafe.Pointer, st *DrawState, control1X, control1Y, control2X, control2Y, toX, toY float32)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-draw.html#hb-draw-cubic-to

func DrawQuadraticTo

func DrawQuadraticTo(dfuncs DrawFuncs, drawData unsafe.Pointer, st *DrawState, controlX, controlY, toX, toY float32)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-draw.html#hb-draw-quadratic-to

func FaceCollectVariationUnicodes

func FaceCollectVariationUnicodes(face Face, variationSelector Codepoint, out Set)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-face.html#hb-face-collect-variation-unicodes

func FontGetGlyphContourPoint

func FontGetGlyphContourPoint(font Font, glyph Codepoint, pointIndex uint32) (x, y int32, ok bool)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-glyph-contour-point

func FontGetGlyphContourPointForOrigin

func FontGetGlyphContourPointForOrigin(font Font, glyph Codepoint, pointIndex uint32, direction Direction) (x, y int32, ok bool)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-get-glyph-contour-point-for-origin

func LanguageMatches

func LanguageMatches(language, specific Language) bool

LanguageMatches checks whether a second language tag is the same or a more specific version of the provided language tag. For example, "fa_IR.utf8" is a more specific tag for "fa" or for "fa_IR".

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-matches

func LanguageToString

func LanguageToString(language Language) string

LanguageToString converts a Language to a string.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-to-string

func SetAdd

func SetAdd(set Set, codePoint Codepoint)

SetAdd adds codePoint to set.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-add

func SetAddRange

func SetAddRange(set Set, first, last Codepoint)

SetAddRange adds all of the elements from first to last (inclusive) to set.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-add-range

func SetAddSortedArray

func SetAddSortedArray(set Set, sortedCodepoints []Codepoint)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-add-sorted-array

func SetGetMax

func SetGetMax(set Set) uint32

SetGetMax returns the largest element in the set.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-get-max

func SetGetMin

func SetGetMin(set Set) uint32

SetGetMin returns the smallest element in the set.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-get-min

func SetGetPopulation

func SetGetPopulation(set Set) uint32

SetGetPopulation returns the number of elements in the set.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-get-population

func SetHash

func SetHash(set Set) uint32

SetHash Creates and returns a hash representing set .

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-hash

func SetIsEmpty

func SetIsEmpty(set Set) bool

SetIsEmpty tests whether a set is empty (contains no elements).

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-is-empty

func SetSet

func SetSet(set, other Set)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-set

func Shape

func Shape(font Font, buffer Buffer, features []Feature)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape.html#hb-shape

func ShapeFull

func ShapeFull(font Font, buffer Buffer, features []Feature, shaperList []string)

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape.html#hb-shape-full

func ShapeListShapers

func ShapeListShapers() (shapers []string)

ShapeListShapers returns the list of shapers supported by HarfBuzz.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape.html#hb-shape-list-shapers

func ShapePlanExecute

func ShapePlanExecute(shapePlan ShapePlan, font Font, buffer Buffer, features []Feature) bool

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape-plan.html#hb-shape-plan-execute

func ShapePlanGetShaper

func ShapePlanGetShaper(shapePlan ShapePlan) string

ShapePlanGetShaper returns the shaper from a given shaping plan.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape-plan.html#hb-shape-plan-get-shaper

func Version

func Version() (major, minor, micro uint32)

Version returns library version as three uint32 components.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-version.html#hb-version

func VersionAtLeast

func VersionAtLeast(major, minor, micro uint32) bool

VersionAtLeast tests the library version against a minimum value, as three integer components.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-version.html#hb-version-atleast

func VersionString

func VersionString() string

VersionString returns library version as a string with three components.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-version.html#hb-version-string

Types

type Blob

type Blob *C.hb_blob_t

Blob wraps a chunk of binary data and facilitates its lifecycle management between a client program and HarfBuzz.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-t

func BlobCreate

func BlobCreate(data []byte, mode MemoryMode, userData unsafe.Pointer, destroy DestroyFunc) Blob

BlobCreate creates a new Blob wrapping data. The mode parameter is used to negotiate ownership and lifecycle of data.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-create

func BlobCreateFromFile

func BlobCreateFromFile(filename string) Blob

BlobCreateFromFile creates a new blob containing the data from the specified binary font file.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-create-from-file

func BlobCreateSubBlob

func BlobCreateSubBlob(parent Blob, offset, length uint32) Blob

Learn more: https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-blob-create-sub-blob

type Buffer

type Buffer *C.hb_buffer_t

Buffer is the main structure holding the input text and its properties before shaping, and output glyphs and their information after shaping.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-t

func BufferCreate

func BufferCreate() Buffer

BufferCreate returns a newly allocated Buffer. This function never returns nil. Close the Buffer using BufferDestroy.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-create

func BufferCreateSimilar

func BufferCreateSimilar(src Buffer) Buffer

BufferCreateSimilar returns a newly allocated Buffer which is configured similarly to src. Close the Buffer using BufferDestroy.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-create-similar

func BufferGetEmpty

func BufferGetEmpty() Buffer

BufferGetEmpty returns an empty Buffer. Close the Buffer using BufferDestroy.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-get-empty

func BufferReference

func BufferReference(buffer Buffer) Buffer

BufferReference increases the reference count on the buffer by one. Decrease the reference count using BufferDestroy.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-reference

type BufferDiffFlags

type BufferDiffFlags C.hb_buffer_diff_flags_t

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-diff-flags-t

const (
	BufferDiffFlagEqual               BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_EQUAL                 // equal buffers.
	BufferDiffFlagContentTypeMismatch BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH // buffers with different ContentType.
	BufferDiffFlagLengthMismatch      BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH       // buffers with differing length.
	BufferDiffFlagNotdefPresent       BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT        // .notdef glyph is present in the reference buffer.
	BufferDiffFlagDottedCirclePresent BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT // dotted circle glyph is present in the reference buffer.
	BufferDiffFlagCodepointPresent    BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH    // difference in GlyphInfo.Codepoint
	BufferDiffFlagClusterMismatch     BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH      // difference in GlyphInfo.Cluster
	BufferDiffFlagGlyphFlagsMismatch  BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH  // difference in GlyphFlags.
	BufferDiffFlagPositionsMismatch   BufferDiffFlags = C.HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH     // difference in GlyphPosition.
)

func BufferDiff

func BufferDiff(buffer, reference Buffer, dottedCircleGlyph Codepoint, positionFuzz uint32) BufferDiffFlags

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-diff

type BufferFlags

type BufferFlags C.hb_buffer_flags_t

BufferFlags are flags for Buffer contents.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-flags-t

const (
	BufferFlagDefault                    BufferFlags = C.HB_BUFFER_FLAG_DEFAULT
	BufferFlagBot                        BufferFlags = C.HB_BUFFER_FLAG_BOT
	BufferFlagEot                        BufferFlags = C.HB_BUFFER_FLAG_EOT
	BufferFlagPreserveDefaultIgnorables  BufferFlags = C.HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES
	BufferFlagRemoveDefaultIgnorables    BufferFlags = C.HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
	BufferFlagDoNotInsertDottedCircle    BufferFlags = C.HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE
	BufferFlagVerify                     BufferFlags = C.HB_BUFFER_FLAG_VERIFY
	BufferFlagProduceUnsafeToConcat      BufferFlags = C.HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT
	BufferFlagProduceSafeToInsertTatweel BufferFlags = C.HB_BUFFER_FLAG_PRODUCE_SAFE_TO_INSERT_TATWEEL
	BufferFlagDEFINED                    BufferFlags = C.HB_BUFFER_FLAG_DEFINED
)

type ClusterLevel

type ClusterLevel C.hb_buffer_cluster_level_t

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t

const (
	ClusterLevelMonotoneGraphemes  ClusterLevel = C.HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES  // Return cluster values grouped by graphemes into monotone order.
	ClusterLevelMonotoneCharacters ClusterLevel = C.HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS // Return cluster values grouped into monotone order.
	ClusterLevelCharacters         ClusterLevel = C.HB_BUFFER_CLUSTER_LEVEL_CHARACTERS          // Don't group cluster values.
	ClusterLevelDefault            ClusterLevel = C.HB_BUFFER_CLUSTER_LEVEL_DEFAULT             // Default cluster level, equal to ClusterLevelMonotoneGraphemes.
)

type ContentType

type ContentType C.hb_buffer_content_type_t

ContentType is type of Buffer contents.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-content-type-t

const (
	ContentTypeInvalid ContentType = C.HB_BUFFER_CONTENT_TYPE_INVALID // Initial value for new buffer.
	ContentTypeUnicode ContentType = C.HB_BUFFER_CONTENT_TYPE_UNICODE // The buffer contains input characters (before shaping).
	ContentTypeGlyphs  ContentType = C.HB_BUFFER_CONTENT_TYPE_GLYPHS  // The buffer contains output glyphs (after shaping).
)

type DestroyFunc

type DestroyFunc C.hb_destroy_func_t

DestroyFunc is a method type for destroying user-data callbacks.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-destroy-func-t

type Direction

type Direction C.hb_direction_t

Direction is the direction of a text segment or buffer.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-t

const (
	DirectionInvalid Direction = C.HB_DIRECTION_INVALID // Initial, unset direction.
	DirectionLTR     Direction = C.HB_DIRECTION_LTR     // Text is set horizontally from left to right.
	DirectionRTL     Direction = C.HB_DIRECTION_RTL     // Text is set horizontally from right to left.
	DirectionTTB     Direction = C.HB_DIRECTION_TTB     // Text is set vertically from top to bottom.
	DirectionBTT     Direction = C.HB_DIRECTION_BTT     // Text is set vertically from bottom to top.
)

func DirectionFromString

func DirectionFromString(str string) Direction

DirectionFromString converts a string to a Direction.

Matching is loose and applies only to the first letter. For examples, "LTR" and "left-to-right" will both return DirectionLTR. Unmatched strings will return DirectionInvalid

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-direction-from-string

func ScriptGetHorizontalDirection

func ScriptGetHorizontalDirection(script Script) Direction

ScriptGetHorizontalDirection fetches the Direction of a script when it is set horizontally. All right-to-left scripts will return DirectionRTL. All left-to-right scripts will return DirectionLTR. Scripts that can be written either horizontally or vertically will return DirectionInvalid. Unknown scripts will return DirectionLTR.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-script-get-horizontal-direction

type DrawState

type DrawState struct {
	PathOpen bool // Whether there is an open path

	PathStartX float32 // X component of the start of current path
	PathStartY float32 // Y component of the start of current path
	CurrentX   float32 // X component of current point
	CurrentY   float32 // Y component of current point
	// contains filtered or unexported fields
}

DrawState holds the current drawing state.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-draw.html#hb-draw-state-t

type FontExtents

type FontExtents struct {
	Ascender  int32 // The height of typographic ascenders.
	Descender int32 // The depth of typographic descenders.
	LineGap   int32 // The suggested line-spacing gap.
}

Learn more: https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-font-extents-t

type GlyphExtents

type GlyphExtents struct {
	XBearing int32 // Distance from the x-origin to the left extremum of the glyph.
	YBearing int32 //Distance from the top extremum of the glyph to the y-origin.
	Width    int32 //Distance from the left extremum of the glyph to the right extremum.
	Height   int32 //Distance from the top extremum of the glyph to the bottom extremum.
}

Learn more: https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-glyph-extents-t

type GlyphFlags

type GlyphFlags C.hb_glyph_flags_t

GlyphFlags are flags for GlyphInfo.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-glyph-flags-t

const (
	GlyphFlagUnsafeToBreak       GlyphFlags = C.HB_GLYPH_FLAG_UNSAFE_TO_BREAK
	GlyphFlagUnsafeToConcat      GlyphFlags = C.HB_GLYPH_FLAG_UNSAFE_TO_CONCAT
	GlyphFlagSafeToInsertTatweel GlyphFlags = C.HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL
	GlyphFlagDefined             GlyphFlags = C.HB_GLYPH_FLAG_DEFINED
)

type GlyphInfo

type GlyphInfo struct {
	Codepoint uint32 // Either a Unicode code point (before shaping) or a glyph index (after shaping).

	// The index of the character in the original text that corresponds to this
	// GlyphInfo, or whatever the client passes to BufferAdd. More than one
	// GlyphInfo can have the same cluster value, if they resulted from the same
	// character (e.g. one to many glyph substitution), and when more than one
	// character gets merged in the same glyph (e.g. many to one glyph substitution)
	// the hb_glyph_info_t will have the smallest cluster value of them. By default
	// some characters are merged into the same cluster (e.g. combining marks have
	// the same cluster as their bases) even if they are separate glyphs,
	// BufferSetClusterLevel allow selecting more fine-grained cluster handling.
	Cluster uint32
	// contains filtered or unexported fields
}

GlyphInfo holds information about the glyphs and their relation to input text.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-glyph-info-t

type GlyphPosition

type GlyphPosition struct {
	XAdvance int32 // how much the line advances after drawing this glyph when setting text in horizontal direction.
	YAdvance int32 // how much the line advances after drawing this glyph when setting text in vertical direction.
	XOffset  int32 // how much the glyph moves on the X-axis before drawing it, this should not affect how much the line advances.
	YOffset  int32 // how much the glyph moves on the Y-axis before drawing it, this should not affect how much the line advances.
	// contains filtered or unexported fields
}

GlyphPosition holds the positions of the glyph in both horizontal and vertical directions. All positions are relative to the current point.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-glyph-position-t

type Language

type Language C.hb_language_t

Language is a data type for languages. Each Language corresponds to a BCP 47 language tag.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-t

func LanguageFromString

func LanguageFromString(str string) Language

LanguageFromString converts str representing a BCP 47 language tag to the corresponding Language.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-from-string

func LanguageGetDefault

func LanguageGetDefault() Language

LanguageGetDefault fetches the default language from current locale.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-get-default

type MemoryMode

type MemoryMode C.hb_memory_mode_t

MemoryMode holds the memory modes available to client programs.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-blob.html#hb-memory-mode-t

const (
	// HarfBuzz immediately makes a copy of the data.
	//
	// In no case shall the HarfBuzz client modify memory that is passed to
	// HarfBuzz in a blob. If there is any such possibility, this mode should be
	// used such that HarfBuzz makes a copy immediately,
	MemoryModeDuplicate MemoryMode = C.HB_MEMORY_MODE_DUPLICATE

	// HarfBuzz client will never modify the data, and HarfBuzz will never modify
	// the data.
	//
	// Use this if it's ok for Harfbuzz client to modify memory that is passed
	// too Harfbuzz in a blob, unless you really really really know what you are
	// doing.
	MemoryModeReadonly MemoryMode = C.HB_MEMORY_MODE_READONLY

	// HarfBuzz client made a copy f the data solely for HarfBuzz, so HarfBuzz
	// may modify the data.
	//
	// This mode is appropriate if you really made a copy of data solely for the
	// purpose of passing to HarfBuzz and doing that just once (no reuse!).
	MemoryModeWritable MemoryMode = C.HB_MEMORY_MODE_WRITABLE

	MemoryModeReadonlyMayMakeWritable MemoryMode = C.HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE
)

type ReferenceTableFunc

type ReferenceTableFunc C.hb_reference_table_func_t

A callback function for FaceCreateForTables.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-font.html#hb-reference-table-func-t

type Script

type Script C.hb_script_t

Learn is a data type for scripts. Each Script's value is a Tag corresponding to the four-letter values defined by ISO 15924.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-script-t

const (
	ScriptCommon                Script = C.HB_SCRIPT_COMMON                 // Zyyy
	ScriptInherited             Script = C.HB_SCRIPT_INHERITED              // Zinh
	ScriptUnknown               Script = C.HB_SCRIPT_UNKNOWN                // Zzzz
	ScriptArabic                Script = C.HB_SCRIPT_ARABIC                 // Arab
	ScriptArmenia               Script = C.HB_SCRIPT_ARMENIAN               // Armn
	ScriptBengali               Script = C.HB_SCRIPT_BENGALI                // Beng
	ScriptCyrillic              Script = C.HB_SCRIPT_CYRILLIC               // Cyrl
	ScriptDevanagari            Script = C.HB_SCRIPT_DEVANAGARI             // Deva
	ScriptGeorgian              Script = C.HB_SCRIPT_GEORGIAN               // Geor
	ScriptGreek                 Script = C.HB_SCRIPT_GREEK                  // Grek
	ScriptGujarati              Script = C.HB_SCRIPT_GUJARATI               // Gujr
	ScriptGurmukhi              Script = C.HB_SCRIPT_GURMUKHI               // Guru
	ScriptHangul                Script = C.HB_SCRIPT_HANGUL                 // Hang
	ScriptHan                   Script = C.HB_SCRIPT_HAN                    // Hani
	ScriptHebrew                Script = C.HB_SCRIPT_HEBREW                 // Hebr
	ScriptHiragana              Script = C.HB_SCRIPT_HIRAGANA               // Hira
	ScriptKannada               Script = C.HB_SCRIPT_KANNADA                // Knda
	ScriptKatakana              Script = C.HB_SCRIPT_KATAKANA               // Kana
	ScriptLao                   Script = C.HB_SCRIPT_LAO                    // Laoo
	ScriptLatin                 Script = C.HB_SCRIPT_LATIN                  // Latn
	ScriptMalayalam             Script = C.HB_SCRIPT_MALAYALAM              // Mlym
	ScriptOriya                 Script = C.HB_SCRIPT_ORIYA                  // Orya
	ScriptTamil                 Script = C.HB_SCRIPT_TAMIL                  // Taml
	ScriptTelugu                Script = C.HB_SCRIPT_TELUGU                 // Telu
	ScriptThai                  Script = C.HB_SCRIPT_THAI                   // Thai
	ScriptTibetan               Script = C.HB_SCRIPT_TIBETAN                // Tibt
	ScriptBopomofo              Script = C.HB_SCRIPT_BOPOMOFO               // Bopo
	ScriptBraille               Script = C.HB_SCRIPT_BRAILLE                // Brai
	ScriptCanadianSyllabics     Script = C.HB_SCRIPT_CANADIAN_SYLLABICS     // Cans
	ScriptCherokee              Script = C.HB_SCRIPT_CHEROKEE               // Cher
	ScriptEthiopic              Script = C.HB_SCRIPT_ETHIOPIC               // Ethi
	ScriptKhmer                 Script = C.HB_SCRIPT_KHMER                  // Khmr
	ScriptMongolian             Script = C.HB_SCRIPT_MONGOLIAN              // Mong
	ScriptMyanmar               Script = C.HB_SCRIPT_MYANMAR                // Mymr
	ScriptOgham                 Script = C.HB_SCRIPT_OGHAM                  // Ogam
	ScriptRunic                 Script = C.HB_SCRIPT_RUNIC                  // Runr
	ScriptSinhala               Script = C.HB_SCRIPT_SINHALA                // Sinh
	ScriptSyriac                Script = C.HB_SCRIPT_SYRIAC                 // Syrc
	ScriptThaana                Script = C.HB_SCRIPT_THAANA                 // Thaa
	ScriptYi                    Script = C.HB_SCRIPT_YI                     // Yiii
	ScriptDeseret               Script = C.HB_SCRIPT_DESERET                // Dsrt
	ScriptGothic                Script = C.HB_SCRIPT_GOTHIC                 // Goth
	ScriptOldItalic             Script = C.HB_SCRIPT_OLD_ITALIC             // Ital
	ScriptBuhid                 Script = C.HB_SCRIPT_BUHID                  // Buhd
	ScriptHanunoo               Script = C.HB_SCRIPT_HANUNOO                // Hano
	ScriptTagalog               Script = C.HB_SCRIPT_TAGALOG                // Tglg
	ScriptTagbanwa              Script = C.HB_SCRIPT_TAGBANWA               // Tagb
	ScriptCypriot               Script = C.HB_SCRIPT_CYPRIOT                // Cprt
	ScriptLimbu                 Script = C.HB_SCRIPT_LIMBU                  // Limb
	ScriptLinearB               Script = C.HB_SCRIPT_LINEAR_B               // Linb
	ScriptOsmanya               Script = C.HB_SCRIPT_OSMANYA                // Osma
	ScriptShavian               Script = C.HB_SCRIPT_SHAVIAN                // Shaw
	ScriptTaiLe                 Script = C.HB_SCRIPT_TAI_LE                 // Tale
	ScriptUgaritic              Script = C.HB_SCRIPT_UGARITIC               // Ugar
	ScriptBuginese              Script = C.HB_SCRIPT_BUGINESE               // Bugi
	ScriptCoptic                Script = C.HB_SCRIPT_COPTIC                 // Copt
	ScriptGlagolitic            Script = C.HB_SCRIPT_GLAGOLITIC             // Glag
	ScriptKharoshthi            Script = C.HB_SCRIPT_KHAROSHTHI             // Khar
	ScriptNewTaiLue             Script = C.HB_SCRIPT_NEW_TAI_LUE            // Talu
	ScriptOldPersian            Script = C.HB_SCRIPT_OLD_PERSIAN            // Xpeo
	ScriptSylotiNagri           Script = C.HB_SCRIPT_SYLOTI_NAGRI           // Sylo
	ScriptTifinagh              Script = C.HB_SCRIPT_TIFINAGH               // Tfng
	ScriptBalinese              Script = C.HB_SCRIPT_BALINESE               // Bali
	ScriptCuneiform             Script = C.HB_SCRIPT_CUNEIFORM              // Xsux
	ScriptNko                   Script = C.HB_SCRIPT_NKO                    // Nkoo
	ScriptPhagsPa               Script = C.HB_SCRIPT_PHAGS_PA               // Phag
	ScriptPhoenician            Script = C.HB_SCRIPT_PHOENICIAN             // Phnx
	ScriptCarian                Script = C.HB_SCRIPT_CARIAN                 // Cari
	ScriptCham                  Script = C.HB_SCRIPT_CHAM                   // Cham
	ScriptKayahLi               Script = C.HB_SCRIPT_KAYAH_LI               // Kali
	ScriptLepcha                Script = C.HB_SCRIPT_LEPCHA                 // Lepc
	ScriptLycian                Script = C.HB_SCRIPT_LYCIAN                 // Lyci
	ScriptLydian                Script = C.HB_SCRIPT_LYDIAN                 // Lydi
	ScriptOlChiki               Script = C.HB_SCRIPT_OL_CHIKI               // Olck
	ScriptRejang                Script = C.HB_SCRIPT_REJANG                 // Rjng
	ScriptSaurashtra            Script = C.HB_SCRIPT_SAURASHTRA             // Saur
	ScriptSundanese             Script = C.HB_SCRIPT_SUNDANESE              // Sund
	ScriptVai                   Script = C.HB_SCRIPT_VAI                    // Vaii
	ScriptAvestan               Script = C.HB_SCRIPT_AVESTAN                // Avst
	ScriptBamum                 Script = C.HB_SCRIPT_BAMUM                  // Bamu
	ScriptEgyptianHieroglyphs   Script = C.HB_SCRIPT_EGYPTIAN_HIEROGLYPHS   // Egyp
	ScriptImperialAramaic       Script = C.HB_SCRIPT_IMPERIAL_ARAMAIC       // Armi
	ScriptInscriptionalPahlavi  Script = C.HB_SCRIPT_INSCRIPTIONAL_PAHLAVI  // Phli
	ScriptInscriptionalParthian Script = C.HB_SCRIPT_INSCRIPTIONAL_PARTHIAN // Prti
	ScriptJavanese              Script = C.HB_SCRIPT_JAVANESE               // Java
	ScriptKaithi                Script = C.HB_SCRIPT_KAITHI                 // Kthi
	ScriptLisu                  Script = C.HB_SCRIPT_LISU                   // Lisu
	ScriptMeeteiMayek           Script = C.HB_SCRIPT_MEETEI_MAYEK           // Mtei
	ScriptOldSouthArabian       Script = C.HB_SCRIPT_OLD_SOUTH_ARABIAN      // Sarb
	ScriptOldTurkic             Script = C.HB_SCRIPT_OLD_TURKIC             // Orkh
	ScriptSamaritan             Script = C.HB_SCRIPT_SAMARITAN              // Samr
	ScriptTaiTham               Script = C.HB_SCRIPT_TAI_THAM               // Lana
	ScriptTaiViet               Script = C.HB_SCRIPT_TAI_VIET               // Tavt
	ScriptBatak                 Script = C.HB_SCRIPT_BATAK                  // Batk
	ScriptBrahmi                Script = C.HB_SCRIPT_BRAHMI                 // Brah
	ScriptMandaic               Script = C.HB_SCRIPT_MANDAIC                // Mand
	ScriptChakma                Script = C.HB_SCRIPT_CHAKMA                 // Cakm
	ScriptMeroiticCursive       Script = C.HB_SCRIPT_MEROITIC_CURSIVE       // Merc
	ScriptMeroiticHieroglyphs   Script = C.HB_SCRIPT_MEROITIC_HIEROGLYPHS   // Mero
	ScriptMiao                  Script = C.HB_SCRIPT_MIAO                   // Plrd
	ScriptSharada               Script = C.HB_SCRIPT_SHARADA                // Shrd
	ScriptSoraSompeng           Script = C.HB_SCRIPT_SORA_SOMPENG           // Sora
	ScriptTakri                 Script = C.HB_SCRIPT_TAKRI                  // Takr
	ScriptBassaVah              Script = C.HB_SCRIPT_BASSA_VAH              // Bass
	ScriptCaucasianAlbanian     Script = C.HB_SCRIPT_CAUCASIAN_ALBANIAN     // Aghb
	ScriptDuployan              Script = C.HB_SCRIPT_DUPLOYAN               // Dupl
	ScriptElbasan               Script = C.HB_SCRIPT_ELBASAN                // Elba
	ScriptGrantha               Script = C.HB_SCRIPT_GRANTHA                // Gran
	ScriptKhojki                Script = C.HB_SCRIPT_KHOJKI                 // Khoj
	ScriptKhudawadi             Script = C.HB_SCRIPT_KHUDAWADI              // Sind
	ScriptLinearA               Script = C.HB_SCRIPT_LINEAR_A               // Lina
	ScriptMahajani              Script = C.HB_SCRIPT_MAHAJANI               // Mahj
	ScriptManichaean            Script = C.HB_SCRIPT_MANICHAEAN             // Mani
	ScriptMendeKikakui          Script = C.HB_SCRIPT_MENDE_KIKAKUI          // Mend
	ScriptModi                  Script = C.HB_SCRIPT_MODI                   // Modi
	ScriptMro                   Script = C.HB_SCRIPT_MRO                    // Mroo
	ScriptNabataean             Script = C.HB_SCRIPT_NABATAEAN              // Nbat
	ScriptOldNorthArabian       Script = C.HB_SCRIPT_OLD_NORTH_ARABIAN      // Narb
	ScriptOldPermic             Script = C.HB_SCRIPT_OLD_PERMIC             // Perm
	ScriptPahawhHmong           Script = C.HB_SCRIPT_PAHAWH_HMONG           // Hmng
	ScriptPalmyrene             Script = C.HB_SCRIPT_PALMYRENE              // Palm
	ScriptPauCinHau             Script = C.HB_SCRIPT_PAU_CIN_HAU            // Pauc
	ScriptPsalterPahlavi        Script = C.HB_SCRIPT_PSALTER_PAHLAVI        // Phlp
	ScriptSiddham               Script = C.HB_SCRIPT_SIDDHAM                // Sidd
	ScriptTirhuta               Script = C.HB_SCRIPT_TIRHUTA                // Tirh
	ScriptWarangCiti            Script = C.HB_SCRIPT_WARANG_CITI            // Wara
	ScriptAhom                  Script = C.HB_SCRIPT_AHOM                   // Ahom
	ScriptAnatolianHieroglyphs  Script = C.HB_SCRIPT_ANATOLIAN_HIEROGLYPHS  // Hluw
	ScriptHatran                Script = C.HB_SCRIPT_HATRAN                 // Hatr
	ScriptMultani               Script = C.HB_SCRIPT_MULTANI                // Mult
	ScriptOldHungarian          Script = C.HB_SCRIPT_OLD_HUNGARIAN          // Hung
	ScriptSignwriting           Script = C.HB_SCRIPT_SIGNWRITING            // Sgnw
	ScriptAdlam                 Script = C.HB_SCRIPT_ADLAM                  // Adlm
	ScriptBhaiksuki             Script = C.HB_SCRIPT_BHAIKSUKI              // Bhks
	ScriptMarchen               Script = C.HB_SCRIPT_MARCHEN                // Marc
	ScriptOsage                 Script = C.HB_SCRIPT_OSAGE                  // Osge
	ScriptTangut                Script = C.HB_SCRIPT_TANGUT                 // Tang
	ScriptNewa                  Script = C.HB_SCRIPT_NEWA                   // Newa
	ScriptMasaramGondi          Script = C.HB_SCRIPT_MASARAM_GONDI          // Gonm
	ScriptNushu                 Script = C.HB_SCRIPT_NUSHU                  // Nshu
	ScriptSoyombo               Script = C.HB_SCRIPT_SOYOMBO                // Soyo
	ScriptZanabazarQquare       Script = C.HB_SCRIPT_ZANABAZAR_SQUARE       // Zanb
	ScriptDogra                 Script = C.HB_SCRIPT_DOGRA                  // Dogr
	ScriptGunjalaGondi          Script = C.HB_SCRIPT_GUNJALA_GONDI          // Gong
	ScriptHanifiRohingya        Script = C.HB_SCRIPT_HANIFI_ROHINGYA        // Rohg
	ScriptMakasar               Script = C.HB_SCRIPT_MAKASAR                // Maka
	ScriptMedefaidrin           Script = C.HB_SCRIPT_MEDEFAIDRIN            // Medf
	ScriptOldSogdian            Script = C.HB_SCRIPT_OLD_SOGDIAN            // Sogo
	ScriptSogdian               Script = C.HB_SCRIPT_SOGDIAN                // Sogd
	ScriptElymaic               Script = C.HB_SCRIPT_ELYMAIC                // Elym
	ScriptNandinagari           Script = C.HB_SCRIPT_NANDINAGARI            // Nand
	ScriptNyiakengPuachueHmong  Script = C.HB_SCRIPT_NYIAKENG_PUACHUE_HMONG // Hmnp
	ScriptWancho                Script = C.HB_SCRIPT_WANCHO                 // Wcho
	ScriptChorasmian            Script = C.HB_SCRIPT_CHORASMIAN             // Chrs
	ScriptDivesAkuru            Script = C.HB_SCRIPT_DIVES_AKURU            // Diak
	ScriptKhitanSmallScript     Script = C.HB_SCRIPT_KHITAN_SMALL_SCRIPT    // Kits
	ScriptYezidi                Script = C.HB_SCRIPT_YEZIDI                 // Yezi
	ScriptCyproMinoan           Script = C.HB_SCRIPT_CYPRO_MINOAN           // Cpmn
	ScriptOldUyghur             Script = C.HB_SCRIPT_OLD_UYGHUR             // Ougr
	ScriptTangsa                Script = C.HB_SCRIPT_TANGSA                 // Tnsa
	ScriptToto                  Script = C.HB_SCRIPT_TOTO                   // Toto
	ScriptVithkuqi              Script = C.HB_SCRIPT_VITHKUQI               // Vith
	ScriptMath                  Script = C.HB_SCRIPT_MATH                   // Zmth
	ScriptKawi                  Script = C.HB_SCRIPT_KAWI                   // Kawi
	ScriptNagMundari            Script = C.HB_SCRIPT_NAG_MUNDARI            // Nagm
	ScriptInvalid               Script = C.HB_SCRIPT_INVALID                // No script set
)

func ScriptFromString

func ScriptFromString(str string) Script

ScriptFromString converts a string str representing an ISO 15924 script tag to a corresponding Script. Shorthand for TagFromString then ScriptFromISO15924Tag.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-script-from-string

type SegmentProperties

type SegmentProperties struct {
	Direction Direction // the Direction of the buffer, see BufferSetDirection.
	Script    Script    // the Script of the buffer, see BufferSetScript.
	Language  Language  // the Language of the buffer, see BufferSetLanguage.
	// contains filtered or unexported fields
}

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-segment-properties-t

type SerializeFlags

type SerializeFlags C.hb_buffer_serialize_flags_t

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-serialize-flags-t

const (
	SerializeFlagDefault      SerializeFlags = C.HB_BUFFER_SERIALIZE_FLAG_DEFAULT        //serialize glyph names, clusters and positions.
	SerializeFlagNoClusters   SerializeFlags = C.HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS    //do not serialize glyph cluster.
	SerializeFlagNoPositions  SerializeFlags = C.HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS   //do not serialize glyph position information.
	SerializeFlagNoGlyphNames SerializeFlags = C.HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES //do no serialize glyph name.
	SerializeFlagGlyphExtents SerializeFlags = C.HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS  //serialize glyph extents.
	SerializeFlagGlyphFlags   SerializeFlags = C.HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS    //serialize glyph flags.
	SerializeFlagNoAdvances   SerializeFlags = C.HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES    //do not serialize glyph advances, glyph offsets will reflect absolute glyph positions.
	SerializeFlagDefined      SerializeFlags = C.HB_BUFFER_SERIALIZE_FLAG_DEFINED        //All currently defined flags.
)

type SerializeFormat

type SerializeFormat C.hb_buffer_serialize_format_t

Learn more: https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t

const (
	SerializeFormatText    SerializeFormat = C.HB_BUFFER_SERIALIZE_FORMAT_TEXT    // a human-readable, plain text format.
	SerializeFormatJson    SerializeFormat = C.HB_BUFFER_SERIALIZE_FORMAT_JSON    // a machine-readable JSON format.
	SerializeFormatInvalid SerializeFormat = C.HB_BUFFER_SERIALIZE_FORMAT_INVALID // invalid format.
)

type Set

type Set *C.hb_set_t

Set holds a set of integers. Set's are used to gather and contain glyph IDs, Unicode code points, and various other collections of discrete values.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-set.html#hb-set-t

type ShapePlan

type ShapePlan *C.hb_shape_plan_t

ShapePlan holds a shaping plan.

Shape plans contain information about how HarfBuzz will shape a particular text segment, based on the segment's properties and the capabilities in the font face in use.

Shape plans can be queried about how shaping will perform, given a set of specific input parameters (script, language, direction, features, etc.).

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape-plan.html#hb-shape-plan-t

func ShapePlanCreate

func ShapePlanCreate(face Face, props *SegmentProperties, userFeatures []Feature, shaperList []string) ShapePlan

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape-plan.html#hb-shape-plan-create

func ShapePlanCreate2

func ShapePlanCreate2(face Face, props *SegmentProperties, userFeatures []Feature, coords []int32, shaperList []string) ShapePlan

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape-plan.html#hb-shape-plan-create2

func ShapePlanCreateCached2

func ShapePlanCreateCached2(face Face, props *SegmentProperties, userFeatures []Feature, coords []int32, shaperList []string) ShapePlan

Learn more: https://harfbuzz.github.io/harfbuzz-hb-shape-plan.html#hb-shape-plan-create-cached2

type UserDataKey

type UserDataKey C.hb_user_data_key_t

UserDataKey is a data structure for holding user-data keys.

Learn more: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-user-data-key-t

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL