class Freetype::Charmap
- Freetype::Charmap
- Reference
- Object
Overview
FT_Charmap wrapper.
A handle to a given character map. A charmap is used to translate character codes in a given encoding into glyph indexes for its parent's face. Some font formats may provide several charmaps per font.
Each face object owns zero or more charmaps, but only one of them can be 'active' and used by FT_Get_Char_Index or FT_Load_Char.
The list of available charmaps in a face is available through the 'face.num_charmaps' and 'face.charmaps' fields of FT_FaceRec.
The currently active charmap is available as 'face.charmap'. You should call FT_Set_Charmap to change it.
Note:
When a new face is created (either through FT_New_Face or FT_Open_Face), the library looks for a Unicode charmap within the list and automatically activates it.
See also:
See LibFreetype::FT_CharMapRec
for the publicly accessible fields of a
given character map.
Defined in:
freetype/charmap.crConstructors
Instance Method Summary
- #charmap : LibFreetype::FT_CharMap
-
#cmap_format
The format of 'charmap'.
-
#cmap_language_id
The language ID of 'charmap'.
-
#encoding
An FT_Encoding tag identifying the charmap.
-
#encoding_id
A platform specific encoding number.
-
#encoding_name
A platform specific encoding name.
-
#index
The index into the array of character maps within the face to which 'charmap' belongs.
-
#platform_id
An ID number describing the platform for the following encoding ID.
Constructor Detail
Instance Method Detail
The format of 'charmap'. If 'charmap' doesn't belong to a TrueType/sfnt face, return -1.
The language ID of 'charmap'. If 'charmap' doesn't belong to a TrueType/sfnt face, just return 0 as the default value.
A platform specific encoding number. This also comes from the TrueType specification and should be emulated similarly.
A platform specific encoding name. This also comes from the TrueType specification and should be emulated similarly.
The index into the array of character maps within the face to which 'charmap' belongs. If an error occurs, -1 is returned.
An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and should be emulated for other formats.