GXUNC class¶
-
class
geosoft.gx.
GXUNC
¶ This library is not a class. Use the UNC library functions to work with Unicode characters and strings. Since version 6.2 all strings are represented internally in the the GX engine as UTF-8. The character set concept was discarded as a way to work with characters that does not fall within the normal ASCII range 0x01-0x7F. The utilities here aids with any new functionality that is now possible (e.g. an expanded symbol range with TrueType fonts).
-
static
is_valid_utf16_char
((GXContext)ctx, (int)arg1) → bool:¶ Check if the UTF-16 value is a valid Unicode character code point.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (int) – UTF-16 value (32-bit int, lower 16 bits used, upper bits reserved for future use)
Returns: bool
Return type: bool
New in version 6.2.0.
- ctx (
-
static
utf16_val_to_str
((GXContext)ctx, (int)arg1, (str_ref)arg2) → None:¶ Convert a UTF-16 value to a UTF-8 encoded string.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (int) – UTF-16 value (32-bit int, lower 16 bits used, upper bits reserved for future use)
- arg2 (
geosoft.gx.str_ref
) – Converted string
Returns: Nothing
Return type: None
New in version 6.2.0.
Note:
An empty string will be returned for invalid symbols
- ctx (
-
static
valid_symbol
((GXContext)ctx, (str)arg1, (bool)arg2, (int)arg3) → bool:¶ See if a Symbol number is valid in a particular font.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (str) – Face name (undecorated)
- arg2 (bool) – Geosoft font? bool
- arg3 (int) – symbol number
Returns: bool
Return type: bool
New in version 6.2.0.
- ctx (
-
static
validate_symbols
((GXContext)ctx, (GXVV)arg1, (str)arg2, (bool)arg3) → None:¶ High performance method to see if a set of symbols are valid in a particular font.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXVV
) – VV of symbols - arg2 (str) – Face name (undecorated)
- arg3 (bool) – Geosoft font? bool
Returns: Nothing
Return type: None
New in version 6.2.0.
Note:
Invalid symbols in the VV will be set to -1 by this call. VV has to be of type GS_LONG.
- ctx (
-
static