package unicodedata
Import Path
github.com/go-text/typesetting/internal/unicodedata (on go.dev)
Dependency Relation
imports 3 packages, and imported by 3 packages
Involved Source Files
combining_classes.go
decomposition.go
east_asian_width.go
emojis.go
general_category.go
grapheme_break.go
indic_conjunct_break.go
line_break.go
mirroring.go
Package unicodedata provides additional lookup functions for unicode
properties, not covered by the standard package unicode.
vertical_orientation.go
word_break.go
Package-Level Type Names (total 6)
GeneralCategory is an enum storing the Unicode General Category of a rune.
IsLetter returns true for Lowercase_Letter, Modifier_Letter, Other_Letter, Titlecase_Letter, Uppercase_Letter
IsMark returns true for Spacing_Mark, Enclosing_Mark, Nonspacing_Mark
func LookupGeneralCategory(r rune) GeneralCategory
const Cc
const Cf
const Co
const Cs
const Ll
const Lm
const Lo
const Lt
const Lu
const Mc
const Me
const Mn
const Nd
const Nl
const No
const Pc
const Pd
const Pe
const Pf
const Pi
const Po
const Ps
const Sc
const Sk
const Sm
const So
const Unassigned
const Zl
const Zp
const Zs
GraphemeBreak is a flag storing the Unicode Grapheme Cluster Break Property.
See https://unicode.org/reports/tr29/#Grapheme_Cluster_Break_Property_Values
func LookupGraphemeBreak(ch rune) GraphemeBreak
const GB_Control
const GB_CR
const GB_Extend
const GB_L
const GB_LF
const GB_LV
const GB_LVT
const GB_Prepend
const GB_Regional_Indicator
const GB_SpacingMark
const GB_T
const GB_V
const GB_ZWJ
IndicConjunctBreak is a flag storing the Indic_Conjunct_Break property used for UAX29, rule GB9c.
func LookupIndicConjunctBreak(r rune) IndicConjunctBreak
const ICBConsonant
const ICBExtend
const ICBLinker
LineBreak is a flag storing the Unicode Line Break Property.
See https://unicode.org/reports/tr14/#Properties
func LookupLineBreak(ch rune) LineBreak
const LB_AI
const LB_AK
const LB_AL
const LB_AP
const LB_AS
const LB_B2
const LB_BA
const LB_BB
const LB_BK
const LB_CB
const LB_CJ
const LB_CL
const LB_CM
const LB_CP
const LB_CR
const LB_EB
const LB_EM
const LB_EX
const LB_GL
const LB_H2
const LB_H3
const LB_HH
const LB_HL
const LB_HY
const LB_ID
const LB_IN
const LB_IS
const LB_JL
const LB_JT
const LB_JV
const LB_LF
const LB_NL
const LB_NS
const LB_NU
const LB_OP
const LB_PO
const LB_PR
const LB_QU
const LB_RI
const LB_SA
const LB_SG
const LB_SP
const LB_SY
const LB_VF
const LB_VI
const LB_WJ
const LB_ZW
const LB_ZWJ
ScriptVerticalOrientation provides the glyph oriention
to use for vertical text.
Orientation returns the prefered orientation
for the given rune.
If the rune does not belong to this script, the default orientation of this script
is returned (regardless of the actual script of the given rune).
func LookupVerticalOrientation(s language.Script) ScriptVerticalOrientation
WordBreak is a flag storing the Unicode Word Break Property.
See https://unicode.org/reports/tr29/#Table_Word_Break_Property_Values
func LookupWordBreak(ch rune) WordBreak
const WB_ALetter
const WB_Double_Quote
const WB_ExtendFormat
const WB_ExtendNumLet
const WB_Hebrew_Letter
const WB_Katakana
const WB_MidLetter
const WB_MidNum
const WB_MidNumLet
const WB_NewlineCRLF
const WB_Numeric
const WB_Regional_Indicator
const WB_Single_Quote
const WB_WSegSpace
Package-Level Functions (total 13)
Compose composes a sequence of two input Unicode code
points by canonical equivalence, returning the composed code, if successful.
It returns `false` otherwise
Decompose decomposes an input Unicode code point,
returning the two decomposed code points, if successful.
It returns `false` otherwise.
func IsExtendedPictographic(ch rune) bool
IsLargeEastAsian matches runes with East_Asian_Width property of
F, W or H, and is used for UAX14, rule LB30.
IsWord returns true for all the runes we may found in a word,
that is either a Number (Nd, Nl, No) or a rune with the Alphabetic property
LookupCombiningClass returns the class used for the Canonical Ordering Algorithm in the Unicode Standard,
defaulting to 0.
From http://www.unicode.org/reports/tr44/#Canonical_Combining_Class:
"This property could be considered either an enumerated property or a numeric property:
the principal use of the property is in terms of the numeric values.
For the property value names associated with different numeric values,
see DerivedCombiningClass.txt and Canonical Combining Class Values."
LookupGeneralCategory returns the unicode general categorie of the rune,
or [Unassigned] if not found.
LookupGraphemeBreak returns the grapheme break property for the rune, or 0.
LookupIndicConjunctBreak return the value of the Indic_Conjunct_Break,
or zero.
LookupLineBreak returns the break class for the rune,
or 0 (the XX, Unknown class)
LookupMirrorChar finds the mirrored equivalent of a character as defined in
the file BidiMirroring.txt of the Unicode Character Database available at
http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt.
If the input character is declared as a mirroring character in the
Unicode standard and has a mirrored equivalent, it is returned.
Otherwise the input character itself is returned
LookupVerticalOrientation returns the prefered orientation
for the given script.
LookupWordBreak returns the word break property for the rune, or 0.
Package-Level Constants (total 117)
const Cc GeneralCategory = 1 // Control const Cf GeneralCategory = 2 // Format const Co GeneralCategory = 3 // Private_Use const Cs GeneralCategory = 4 // Surrogate const GB_Control GraphemeBreak = 2 const GB_CR GraphemeBreak = 1 const GB_Extend GraphemeBreak = 4 const GB_L GraphemeBreak = 8 const GB_LF GraphemeBreak = 16 const GB_LV GraphemeBreak = 32 const GB_LVT GraphemeBreak = 64 const GB_Prepend GraphemeBreak = 128 const GB_Regional_Indicator GraphemeBreak = 256 const GB_SpacingMark GraphemeBreak = 512 const GB_T GraphemeBreak = 1024 const GB_V GraphemeBreak = 2048 const GB_ZWJ GraphemeBreak = 4096
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
Algorithmic hangul syllables [de]composition, used
in Compose and Decompose, but also exported for additional shaper
processing.
const ICBConsonant IndicConjunctBreak = 2 const ICBExtend IndicConjunctBreak = 4 const ICBLinker IndicConjunctBreak = 1 const Ll GeneralCategory = 5 // Lowercase_Letter const Lm GeneralCategory = 6 // Modifier_Letter const Lo GeneralCategory = 7 // Other_Letter const Lt GeneralCategory = 8 // Titlecase_Letter const Lu GeneralCategory = 9 // Uppercase_Letter const Mc GeneralCategory = 10 // Spacing_Mark const Me GeneralCategory = 11 // Enclosing_Mark const Mn GeneralCategory = 12 // Nonspacing_Mark const Nd GeneralCategory = 13 // Decimal_Number const Nl GeneralCategory = 14 // Letter_Number const No GeneralCategory = 15 // Other_Number const Pc GeneralCategory = 16 // Connector_Punctuation const Pd GeneralCategory = 17 // Dash_Punctuation const Pe GeneralCategory = 18 // Close_Punctuation const Pf GeneralCategory = 19 // Final_Punctuation const Pi GeneralCategory = 20 // Initial_Punctuation const Po GeneralCategory = 21 // Other_Punctuation const Ps GeneralCategory = 22 // Open_Punctuation const Sc GeneralCategory = 23 // Currency_Symbol const Sk GeneralCategory = 24 // Modifier_Symbol const Sm GeneralCategory = 25 // Math_Symbol const So GeneralCategory = 26 // Other_Symbol const Unassigned GeneralCategory = 0 const WB_ALetter WordBreak = 1 const WB_Double_Quote WordBreak = 2 const WB_ExtendFormat WordBreak = 4 const WB_ExtendNumLet WordBreak = 8 const WB_Hebrew_Letter WordBreak = 16 const WB_Katakana WordBreak = 32 const WB_MidLetter WordBreak = 64 const WB_MidNumLet WordBreak = 256 const WB_NewlineCRLF WordBreak = 512 const WB_Numeric WordBreak = 1024 const WB_Regional_Indicator WordBreak = 2048 const WB_Single_Quote WordBreak = 4096 const WB_WSegSpace WordBreak = 8192 const Zl GeneralCategory = 27 // Line_Separator const Zp GeneralCategory = 28 // Paragraph_Separator const Zs GeneralCategory = 29 // Space_Separator
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |