TextEncoding
public enum TextEncoding : UInt32TextEncoding determines whether text specifies character codes and their encoded size, or glyph indices. Characters are encoded as specified by the Unicode standard.
Character codes encoded size are specified by UTF-8, UTF-16, or UTF-32. All character code formats are able to represent all of Unicode, differing only in the total storage required.
UTF-8 (RFC 3629) encodes each character as one or more 8-bit bytes.
UTF-16 (RFC 2781) encodes each character as one or two 16-bit words.
UTF-32 encodes each character as one 32-bit word.
font manager uses font data to convert character code points into glyph indices. A glyph index is a 16-bit word.
TextEncoding is set to .utf8 by default.
- 
                  
                  Uses bytes to represent UTF-8 or ASCII. DeclarationSwift case utf8 = 0
- 
                  
                  Uses two byte words to represent most of Unicode. DeclarationSwift case utf16
- 
                  
                  Uses four byte words to represent all of Unicode. DeclarationSwift case utf32
- 
                  
                  Uses two byte words to represent glyph indices. DeclarationSwift case glyphId
 View on GitHub
View on GitHub Install in Dash
Install in Dash TextEncoding Enumeration Reference
        TextEncoding Enumeration Reference