MiniGUI API Reference (MiniGUI-Threads)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Modules | Functions
Operators for Unicode character and string

Modules

 Character Transformation Rules
 The character transformation rule indicates how UStrGetBreaks transforms text for styling purposes; can be.
 
 Word Breaking Rules
 The word breaking rule indicates how UStrGetBreaks creates soft wrap opportunities between letters.
 
 Line Breaking Policies
 The line breaking policy specifies the strictness of line-breaking rules applied within an element: especially how wrapping interacts with punctuation and symbols.
 
 The breaking opportunity code
 MiniGUI uses a 16-bits word to represent the character, word, and line breaking opportunities of a character in a context.
 

Functions

MG_EXPORT UCharGeneralCategory GUIAPI UCharGetCategory (Uchar32 uc)
 Get the general category of a Unicode character. More...
 
MG_EXPORT UCharBreakType GUIAPI UCharGetBreakType (Uchar32 uc)
 Get the break property of a Unicode character. More...
 
MG_EXPORT BidiType GUIAPI UCharGetBidiType (Uchar32 uc)
 Get bidi type of a Unicode character. More...
 
MG_EXPORT void GUIAPI UStrGetBidiTypes (const Uchar32 *ucs, int nr_ucs, BidiType *bdts)
 Get bidi types for an string of Unicode characters. More...
 
MG_EXPORT BidiBracketType GUIAPI UCharGetBracketType (Uchar32 ch)
 Get bracketed character. More...
 
MG_EXPORT void GUIAPI UStrGetBracketTypes (const Uchar32 *ucs, const BidiType *bidi_types, int len_ucs, BidiBracketType *bracket_types)
 Get bracketed characters of a Uchar32 string. More...
 
MG_EXPORT BOOL GUIAPI UCharGetMirror (Uchar32 uc, Uchar32 *mirrored)
 Get mirrored character. More...
 
MG_EXPORT BidiJoiningType GUIAPI UCharGetJoiningType (Uchar32 uc)
 Get character joining type. More...
 
MG_EXPORT void GUIAPI UStrGetJoiningTypes (const Uchar32 *ucs, int nr_ucs, BidiJoiningType *joining_types)
 Get joining types for a string of Unicode characters. More...
 
MG_EXPORT BidiType GUIAPI UBidiGetParagraphDir (const BidiType *bidi_types, int len)
 Get the base paragraph direction. More...
 
MG_EXPORT BidiLevel GUIAPI UBidiGetParagraphEmbeddingLevelsAlt (const Uchar32 *ucs, int nr_ucs, ParagraphDir *paragraph_dir, BidiLevel *embedding_levels)
 An alternative of UBidiGetParagraphEmbeddingLevels(). More...
 
MG_EXPORT void GUIAPI UBidiShapeMirroring (const BidiLevel *embedding_levels, int len, Uchar32 *ucs)
 Do mirroring shaping. More...
 
MG_EXPORT void GUIAPI UBidiJoinArabic (const BidiType *bidi_types, const BidiLevel *embedding_levels, int len, BidiArabicProp *ar_props)
 Do Arabic joining. More...
 
MG_EXPORT void GUIAPI UBidiShapeArabic (Uint32 shaping_flags, const BidiLevel *embedding_levels, int len, BidiArabicProp *ar_props, Uchar32 *ucs)
 Do Arabic shaping. More...
 
MG_EXPORT int GUIAPI UStrGetBreaks (LanguageCode lang_code, Uint8 ctr, Uint8 wbr, Uint8 lbp, Uchar32 *ucs, int nr_ucs, BreakOppo **break_oppos)
 Calculate the breaking opportunities of a Uchar32 string under the specified rules and line breaking policy. More...
 
MG_EXPORT BOOL GUIAPI IsUCharAlnum (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharAlpha (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharControl (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharDigit (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharGraph (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharLowercase (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharPrint (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharUppercase (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharPunct (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharSpace (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharMark (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharTitle (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharXDigit (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharDefined (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharZeroWidth (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharWide (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI IsUCharWideCJK (Uchar32 uc)
 
MG_EXPORT Uchar32 UCharToUpper (Uchar32 uc)
 
MG_EXPORT Uchar32 GUIAPI UCharToLower (Uchar32 uc)
 
MG_EXPORT Uchar32 GUIAPI UCharToTitle (Uchar32 uc)
 
MG_EXPORT Uchar32 GUIAPI UCharToFullWidth (Uchar32 uc)
 
MG_EXPORT Uchar32 GUIAPI UCharToSingleWidth (Uchar32 uc)
 
MG_EXPORT Uchar32 GUIAPI UCharToFullSizeKana (Uchar32 uc)
 
MG_EXPORT Uchar32 GUIAPI UCharToSmallKana (Uchar32 uc)
 
MG_EXPORT BOOL GUIAPI UCharIsArabicVowel (Uchar32 uc)
 
MG_EXPORT int GUIAPI UCharCombiningClass (Uchar32 uc)
 
MG_EXPORT void GUIAPI UCharCanonicalOrdering (Uchar32 *string, int len)
 
MG_EXPORT BOOL GUIAPI UCharCompose (Uchar32 a, Uchar32 b, Uchar32 *ch)
 
MG_EXPORT BOOL GUIAPI UCharDecompose (Uchar32 ch, Uchar32 *a, Uchar32 *b)
 
MG_EXPORT int GUIAPI UCharFullyDecompose (Uchar32 ch, BOOL compat, Uchar32 *result, int result_len)
 
MG_EXPORT ScriptType GUIAPI UCharGetScriptType (Uchar32 ch)
 
MG_EXPORT Uint32 GUIAPI ScriptTypeToISO15924 (ScriptType script)
 
MG_EXPORT ScriptType GUIAPI ScriptTypeFromISO15924 (Uint32 iso15924)
 Get the ScriptType value from an encoded ISO15924 script code. More...
 
static ScriptType GUIAPI ScriptTypeFromISO15924Code (const char *iso15924)
 
MG_EXPORT UVerticalOrient GUIAPI UCharGetVerticalOrientation (Uchar32 uc)
 

Detailed Description

Function Documentation

◆ IsUCharAlnum()

MG_EXPORT BOOL GUIAPI IsUCharAlnum ( Uchar32  uc)

The function determines whether a character is alphanumeric.

◆ IsUCharAlpha()

MG_EXPORT BOOL GUIAPI IsUCharAlpha ( Uchar32  uc)

The function determines whether a character is alphabetic (i.e. a letter).

◆ IsUCharControl()

MG_EXPORT BOOL GUIAPI IsUCharControl ( Uchar32  uc)

The function determines whether a character is a control character.

◆ IsUCharDefined()

MG_EXPORT BOOL GUIAPI IsUCharDefined ( Uchar32  uc)

The function determines if a given character is assigned in the Unicode standard.

◆ IsUCharDigit()

MG_EXPORT BOOL GUIAPI IsUCharDigit ( Uchar32  uc)

The function determines whether a character is numeric (i.e. a digit).

◆ IsUCharGraph()

MG_EXPORT BOOL GUIAPI IsUCharGraph ( Uchar32  uc)

The function determines whether a character is printable and not a space

◆ IsUCharLowercase()

MG_EXPORT BOOL GUIAPI IsUCharLowercase ( Uchar32  uc)

The function determines whether a character is a lowercase letter.

◆ IsUCharMark()

MG_EXPORT BOOL GUIAPI IsUCharMark ( Uchar32  uc)

The function determines whether a character is a mark (non-spacing mark, combining mark, or enclosing mark in Unicode speak).

◆ IsUCharPrint()

MG_EXPORT BOOL GUIAPI IsUCharPrint ( Uchar32  uc)

The function determines whether a character is printable.

◆ IsUCharPunct()

MG_EXPORT BOOL GUIAPI IsUCharPunct ( Uchar32  uc)

The function determines whether a character is punctuation or a symbol.

◆ IsUCharSpace()

MG_EXPORT BOOL GUIAPI IsUCharSpace ( Uchar32  uc)

The function determines whether a character is a space, tab, or line separator (newline, carriage return, etc.).

◆ IsUCharTitle()

MG_EXPORT BOOL GUIAPI IsUCharTitle ( Uchar32  uc)

The function determines if a character is titlecase. Some characters in Unicode which are composites, such as the DZ digraph have three case variants instead of just two. The titlecase form is used at the beginning of a word where only the first letter is capitalized. The titlecase form of the DZ digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z.

◆ IsUCharUppercase()

MG_EXPORT BOOL GUIAPI IsUCharUppercase ( Uchar32  uc)

The function determines whether a character is a uppercase letter.

◆ IsUCharWide()

MG_EXPORT BOOL GUIAPI IsUCharWide ( Uchar32  uc)

The function determines if a character is typically rendered in a double-width cell.

◆ IsUCharWideCJK()

MG_EXPORT BOOL GUIAPI IsUCharWideCJK ( Uchar32  uc)

The function determines if a character is typically rendered in a double-width cell under legacy East Asian locales. If a character is wide according to g_unichar_iswide(), then it is also reported wide with this function, but the converse is not necessarily true. See the Unicode Standard Annex #11 for details.

◆ IsUCharXDigit()

MG_EXPORT BOOL GUIAPI IsUCharXDigit ( Uchar32  uc)

The function determines if a character is a hexidecimal digit.

◆ IsUCharZeroWidth()

MG_EXPORT BOOL GUIAPI IsUCharZeroWidth ( Uchar32  uc)

The function determines if a given character typically takes zero width when rendered.

◆ ScriptTypeFromISO15924()

ScriptType ScriptTypeFromISO15924 ( Uint32  iso15924)

Get the ScriptType value from an encoded ISO15924 script code.

Looks up the Unicode script type for the specified encoded ISO15924 script code iso15924. ISO 15924 assigns four-letter codes to scripts. For example, the code for Arabic is 'Arab'. This function accepts four letter codes encoded as a Uint32 in a big-endian fashion. That is, the code expected for Arabic is 0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc).

See Codes for the representation of names of scripts for details.

Parameters
iso15924an encoded Unicode script code in ISO15924.
Returns
the Unicode script for iso15924, or of SCRIPT_INVALID_CODE if iso15924 is zero and SCRIPT_UNKNOWN if iso15924 is unknown.
See also
ScriptTypeFromISO15924Code

Since: 4.0.0

◆ ScriptTypeFromISO15924Code()

ScriptType ScriptTypeFromISO15924Code ( const char *  iso15924)
inlinestatic

Looks up the Unicode script type for the specified ISO15924 script code iso15924. ISO15924 assigns four-letter codes to scripts. For example, the code for Arabic is 'Arab'.

See Codes for the representation of names of scripts for details.

Parameters
iso15924a Unicode script type code in ISO15924.
Returns
the Unicode script for iso15924, or of SCRIPT_INVALID_CODE if iso15924 is zero and SCRIPT_UNKNOWN if iso15924 is unknown.
See also
ScriptTypeFromISO15924

Since: 4.0.0

Definition at line 10343 of file gdi.h.

◆ ScriptTypeToISO15924()

Uint32 ScriptTypeToISO15924 ( ScriptType  script)

Looks up the ISO15924 code for the specific ScriptType script. ISO15924 assigns four-letter codes to scripts. For example, the code for Arabic is 'Arab'. The four letter codes are encoded as a Uint32 by this function in a big-endian fashion. That is, the code returned for Arabic is 0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc).

See Codes for the representation of names of scripts for details.

Parameters
scripta Unicode script
Returns
the ISO 15924 code for script, encoded as an integer, of zero if script is SCRIPT_INVALID_CODE or ISO 15924 code 'Zzzz' (script code for UNKNOWN) if script is not understood.
See also
ScriptTypeFromISO15924

Since: 4.0.0

◆ UBidiGetParagraphDir()

BidiType GUIAPI UBidiGetParagraphDir ( const BidiType bidi_types,
int  len 
)

Get the base paragraph direction.

This function finds the base direction of a single paragraph, as defined by rule P2 of the Unicode Bidirectional Algorithm.

You typically do not need this function as UBidiGetParagraphEmbeddingLevels knows how to compute base direction itself, but you may need this to implement a more sophisticated paragraph direction handling. Note that you can pass more than a paragraph to this function and the direction of the first non-neutral paragraph is returned, which is a very good heuristic to set direction of the neutral paragraphs at the beginning of text. For other neutral paragraphs, you better use the direction of the previous paragraph.

Parameters
bidi_typesthe pointer to the BidiType array as returned by UStrGetBidiTypes().
lenThe length of bidi types array.
Returns
Base pargraph direction. No weak paragraph direction is returned, only BIDI_PGDIR_LTR, BIDI_PGDIR_RTL, or BIDI_PGDIR_ON.

Since: 4.0.0

◆ UBidiGetParagraphEmbeddingLevelsAlt()

MG_EXPORT BidiLevel GUIAPI UBidiGetParagraphEmbeddingLevelsAlt ( const Uchar32 *  ucs,
int  nr_ucs,
ParagraphDir paragraph_dir,
BidiLevel embedding_levels 
)

An alternative of UBidiGetParagraphEmbeddingLevels().

This function finds the bidi embedding levels of a single paragraph, as defined by the Unicode Bidirectional Algorithm.

This function implements rules P2 to I1 inclusive, and parts 1 to 3 of L1. Part 4 of L1 is implemented in UBidiReorderLine().

Different from UBidiGetParagraphEmbeddingLevels(), this function finds the bidi embedding levels directly from the Uchar32 string.

Parameters
ucsThe Unicode character string.
nr_ucsThe length of the string.
paragraph_dirrequested and resolved paragraph base direction. You can pass the following values for base direction:
  • BIDI_PGDIR_LTR
    Explicit left to right.
  • BIDI_PGDIR_RTL
    Explicit right to left.
  • other values
    The base direction will be resolved by applying the rules P2 and P3, and returned via this parameter (one of BIDI_PGDIR_LTR or BIDI_PGDIR_RTL) .
embedding_levelsThe pointer to a buffer which will restore the embedding levels.
Returns
The Maximum level found plus one, or zero if any error occurred (memory allocation failure most probably).
See also
UBidiGetParagraphEmbeddingLevels

Since: 4.0.0

◆ UBidiJoinArabic()

void GUIAPI UBidiJoinArabic ( const BidiType bidi_types,
const BidiLevel embedding_levels,
int  len,
BidiArabicProp ar_props 
)

Do Arabic joining.

This function does the Arabic joining algorithm. Means, given Arabic joining types of the characters in ar_props (note that BidiJoiningType can be casted to BidiArabicProp automagically), this function modifies this properties to grasp the effect of neighboring characters. You probably need this information later to do Arabic shaping.

This function implements rules R1 to R7 inclusive (all rules) of the Arabic Cursive Joining algorithm of the Unicode standard as available at

https://www.unicode.org/versions/Unicode12.0.0/ch08.pdf#G7462.

It also interacts correctly with the bidirection algorithm as defined in Section 3.5 Shaping of the Unicode Bidirectional Algorithm available at

https://www.unicode.org/reports/tr9/#Shaping.

Parameters
bidi_typesThe list of bidi types as returned by UStrGetBidiTypes().
embedding_levelsinput list of embedding levels, as returned by UBidiGetParagraphEmbeddingLevels().
lenThe input string length.
ar_propsArabic properties to analyze, initialized by joining types, as returned by UStrGetJoiningTypes().
See also
UBidiGetParagraphEmbeddingLevels, UStrGetJoiningTypes

Since: 4.0.0

◆ UBidiShapeArabic()

void GUIAPI UBidiShapeArabic ( Uint32  shaping_flags,
const BidiLevel embedding_levels,
int  len,
BidiArabicProp ar_props,
Uchar32 *  ucs 
)

Do Arabic shaping.

The actual shaping that is done depends on the flags set. The following flags affect this function:

  • BIDI_FLAG_SHAPE_MIRRORING
    Do mirroring.
  • BIDI_FLAG_SHAPE_ARAB_PRES
    Shape Arabic characters to their presentation form glyphs.
  • BIDI_FLAG_SHAPE_ARAB_LIGA
    Form mandatory Arabic ligatures.
  • BIDI_FLAG_SHAPE_ARAB_CONSOLE
    Perform additional Arabic shaping suitable for text rendered on grid terminals with no mark rendering capabilities.

Of the above, BIDI_FLAG_SHAPE_ARAB_CONSOLE is only used in special cases, but the rest are recommended in any environment that doesn't have other means for doing Arabic shaping. The set of extra flags that enable this level of Arabic support has a shortcut named BIDI_FLAGS_ARABIC.

Parameters
shaping_flagsshaping flags.
embedding_levelsinput list of embedding levels, as returned by UBidiGetParagraphEmbeddingLevels().
lenThe length of the string.
ar_propsThe Arabic character properties as computed by UBidiJoinArabic().
ucsThe Uchar32 string to shape.
See also
UBidiGetParagraphEmbeddingLevels, UBidiJoinArabic

Since: 4.0.0

◆ UBidiShapeMirroring()

void GUIAPI UBidiShapeMirroring ( const BidiLevel embedding_levels,
int  len,
Uchar32 *  ucs 
)

Do mirroring shaping.

This functions replaces mirroring characters on right-to-left embeddings in string with their mirrored equivalent as returned by UCharGetMirror().

This function implements rule L4 of the Unicode Bidirectional Algorithm available at

https://www.unicode.org/reports/tr9/#L4.

Parameters
embedding_levelsinput list of embedding levels, as returned by UBidiGetParagraphEmbeddingLevels().
lenThe input string length.
ucsThe Uchar32 string to shape.
See also
UBidiGetParagraphEmbeddingLevels

Since: 4.0.0

◆ UCharCanonicalOrdering()

MG_EXPORT void GUIAPI UCharCanonicalOrdering ( Uchar32 *  string,
int  len 
)

Computes the canonical ordering of a string in-place. This rearranges decomposed characters in the string according to their combining classes. See the Unicode manual for more information.

◆ UCharCombiningClass()

MG_EXPORT int GUIAPI UCharCombiningClass ( Uchar32  uc)

Determine the canonical combining class of a Unicode character.

◆ UCharCompose()

MG_EXPORT BOOL GUIAPI UCharCompose ( Uchar32  a,
Uchar32  b,
Uchar32 *  ch 
)

Performs a single decomposition step of the Unicode canonical decomposition algorithm.

◆ UCharDecompose()

MG_EXPORT BOOL GUIAPI UCharDecompose ( Uchar32  ch,
Uchar32 *  a,
Uchar32 *  b 
)

Performs a single composition step of the Unicode canonical composition algorithm.

◆ UCharFullyDecompose()

int GUIAPI UCharFullyDecompose ( Uchar32  ch,
BOOL  compat,
Uchar32 *  result,
int  result_len 
)

Computes the canonical or compatibility decomposition of a Unicode character.

For compatibility decomposition, pass TRUE for compat; for canonical decomposition pass FALSE for compat.

◆ UCharGetBidiType()

BidiType GUIAPI UCharGetBidiType ( Uchar32  uc)

Get bidi type of a Unicode character.

This function returns the bidi type of a Unicode character as defined in Table 3.7 Bidirectional Character Types of the Unicode Bidirectional Algorithm available at

https://www.unicode.org/reports/tr9/#Bidirectional_Character_Types

Parameters
ucThe Uchar32 character.
Returns
The bidi type.
See also
UStrGetBidiTypes, BIDI types

Since: 4.0.0

◆ UCharGetBracketType()

BidiBracketType GUIAPI UCharGetBracketType ( Uchar32  ch)

Get bracketed character.

This function finds the bracketed equivalent of a character as defined in the file BidiBrackets.txt of the Unicode Character Database available at

https://www.unicode.org/Public/UNIDATA/BidiBrackets.txt.

If the input character is a declared as a brackets character in the Unicode standard and has a bracketed equivalent. The matching bracketed character is put in the output, otherwise the input character itself is put.

Parameters
chinput character
Returns
The bracket type of the character. Use the BIDI_IS_BRACKET(BidiBracketType) to test if it is a valid property. Use BCHI_BRACKET_CHAR(BidiBracketType) to get the bracketed character value.
See also
UStrGetBracketTypes

Since: 4.0.0

◆ UCharGetBreakType()

UCharBreakType GUIAPI UCharGetBreakType ( Uchar32  uc)

Get the break property of a Unicode character.

The function determines the break property of a UNICODE character uc.

Parameters
ucThe Uchar32 value of the Unicode character.
Returns
The breaking type value of the Unicode character.
See also
UCharBreakType

Since: 4.0.0

◆ UCharGetCategory()

UCharGeneralCategory GUIAPI UCharGetCategory ( Uchar32  uc)

Get the general category of a Unicode character.

The function determines the general category (basic type) of a UNICODE character uc.

Parameters
ucThe Uchar32 value of the Unicode character.
Returns
The general category of the Unicode character.
See also
UCharGeneralCategory

Since: 4.0.0

◆ UCharGetJoiningType()

BidiJoiningType GUIAPI UCharGetJoiningType ( Uchar32  uc)

Get character joining type.

This function returns the joining type of a character as defined in Table 8-2 Primary Arabic Joining Classes of the Unicode standard available at

https://www.unicode.org/versions/Unicode12.0.0/ch08.pdf#G7462

using data provided in file ArabicShaping.txt and UnicodeData.txt of the Unicode Character Database available at

https://www.unicode.org/Public/UNIDATA/ArabicShaping.txt

and

https://www.unicode.org/Public/UNIDATA/UnicodeData.txt.

Parameters
ucThe Uchar32 character.
Returns
The joining type of the specified Uchar32 character.

Since: 4.0.0

◆ UCharGetMirror()

BOOL GUIAPI UCharGetMirror ( Uchar32  uc,
Uchar32 *  mirrored 
)

Get mirrored character.

This function finds the mirrored equivalent of a Unicode character as defined in the file BidiMirroring.txt of the Unicode Character Database available at

https://www.unicode.org/Public/UNIDATA/BidiMirroring.txt.

Parameters
ucThe Uchar32 character.
mirroredA pointer to a Uchar32 buffer to return the mirroed character. If the input character uc is a declared as a mirroring character in the Unicode standard and has a mirrored equivalent, the matching mirrored character was put in this buffer, otherwise the input character itself was put.
Returns
A BOOL value indicates if the character has a mirroring equivalent or not.

Since: 4.0.0

◆ UCharGetScriptType()

ScriptType GUIAPI UCharGetScriptType ( Uchar32  ch)

Looks up the script code for a particular character (as defined by Unicode Standard Annex #24). No check is made for ch being a valid Unicode character; if you pass in invalid character, the result is undefined.

Parameters
cha Unicode character
Returns
The script type code for the UNICODE character.
See also
ScriptType

Since: 4.0.0

◆ UCharGetVerticalOrientation()

MG_EXPORT UVerticalOrient GUIAPI UCharGetVerticalOrientation ( Uchar32  uc)

Get the vertical orientation property of a Unicode character

◆ UCharIsArabicVowel()

MG_EXPORT BOOL GUIAPI UCharIsArabicVowel ( Uchar32  uc)

Determine is the given Unicode character an Arabic vowel.

◆ UCharToFullSizeKana()

MG_EXPORT Uchar32 GUIAPI UCharToFullSizeKana ( Uchar32  uc)

Converts a glyph to full-size Kana.

◆ UCharToFullWidth()

MG_EXPORT Uchar32 GUIAPI UCharToFullWidth ( Uchar32  uc)

Converts a glyph to full-width.

◆ UCharToLower()

MG_EXPORT Uchar32 GUIAPI UCharToLower ( Uchar32  uc)

Converts a character to lower case.

◆ UCharToSingleWidth()

MG_EXPORT Uchar32 GUIAPI UCharToSingleWidth ( Uchar32  uc)

Converts a glyph to single-width.

◆ UCharToSmallKana()

MG_EXPORT Uchar32 GUIAPI UCharToSmallKana ( Uchar32  uc)

Converts a glyph to small Kana.

◆ UCharToTitle()

MG_EXPORT Uchar32 GUIAPI UCharToTitle ( Uchar32  uc)

Converts a glyph to the titlecase.

◆ UCharToUpper()

MG_EXPORT Uchar32 UCharToUpper ( Uchar32  uc)

Converts a character to uppercase.

◆ UStrGetBidiTypes()

void GUIAPI UStrGetBidiTypes ( const Uchar32 *  ucs,
int  nr_ucs,
BidiType bdts 
)

Get bidi types for an string of Unicode characters.

This function finds the bidi types of an string of Unicode characters.

Parameters
ucsThe pointer to the Uchar32 string.
nr_ucsThe number of Unicode characters in the string.
bdtsThe pointer to a buffer which will be used to store the bidi types of the characters in ucs.
See also
UCharGetBidiType

Since: 4.0.0

◆ UStrGetBracketTypes()

void UStrGetBracketTypes ( const Uchar32 *  ucs,
const BidiType bidi_types,
int  nr_ucs,
BidiBracketType bracket_types 
)

Get bracketed characters of a Uchar32 string.

This function finds the bracketed characters of a string of Unicode characters. See UCharGetBracketType() for more information about the bracketed characters returned by this function.

Parameters
ucsThe input Uchar32 string.
nr_ucsThe length of string.
bidi_typesThe bidi types (an array of BidiType) of the string.
bracket_typesThe pointer to a BidiBracketType array storing the bracketed characters.
See also
UCharGetBracketType

Since: 4.0.0

◆ UStrGetBreaks()

int GUIAPI UStrGetBreaks ( LanguageCode  lang_code,
Uint8  ctr,
Uint8  wbr,
Uint8  lbp,
Uchar32 *  ucs,
int  nr_ucs,
BreakOppo **  break_oppos 
)

Calculate the breaking opportunities of a Uchar32 string under the specified rules and line breaking policy.

This function calculates the breaking opportunities of the Unicode characters under the specified the writing system writing_system, the word breaking rule wbr, and the line breaking policy lbp. This function also transforms the character according to the text transformation rule ctr.

The implementation of this function conforms to UNICODE LINE BREAKING ALGORITHM:

https://www.unicode.org/reports/tr14/tr14-39.html

and UNICODE TEXT SEGMENTATION:

https://www.unicode.org/reports/tr29/tr29-33.html

and the CSS Text Module Level 3:

https://www.w3.org/TR/css-text-3/

The function will return if it encounters the end of the text.

Note that you are responsible for freeing the break opportunities array allocated by this function if it allocates the buffer.

Parameters
lang_codeThe language code; not used so far, reserved for future.
ctrThe character transformation rule; see char_transform_rules.
wbrThe word breaking rule; see word_break_rules.
lbpThe line breaking policy; see line_break_policies.
ucsThe Uchar32 string.
nr_ucsThe length of the Uchar32 string.
break_opposThe pointer to a buffer to store the address of a Uint16 array which will return the break opportunities of the uchars. If the buffer contains a NULL value, this function will try to allocate a new space for the break opportunities. Note that the length of this array is always one longer than the Unicode array. The first unit of the array stores the break opportunity before the first uchar, and the others store the break opportunities after other gyphs. The break opportunity can be one of the following values:
  • BOV_LB_MANDATORY
    The mandatory breaking.
  • BOV_LB_NOTALLOWED
    No breaking allowed after the uchar definitely.
  • BOV_LB_ALLOWED
    Breaking allowed after the uchar.
Returns
The length of break oppoortunities array; zero on error.
Note
Only available when support for UNICODE is enabled.
See also
DrawGlyphStringEx, Word Breaking Rules, Character Transformation Rules, Line Breaking Policies

◆ UStrGetJoiningTypes()

void GUIAPI UStrGetJoiningTypes ( const Uchar32 *  ucs,
int  nr_ucs,
BidiJoiningType joining_types 
)

Get joining types for a string of Unicode characters.

This function finds the joining types of an string of characters. See UCharGetJoiningType for more information about the joining types returned by this function.

Parameters
ucsThe input Uchar32 string.
nr_ucsThe number of Uchar32 characters.
joining_typesThe pointer to a BidiJoiningType array storing the joining types of the characters.
See also
UCharGetJoiningType

Since: 4.0.0