ReactOS 0.4.16-dev-2332-g4cba65d
cffcmap.c File Reference
#include <freetype/internal/ftdebug.h>
#include "cffcmap.h"
#include "cffload.h"
#include "cfferrs.h"
Include dependency graph for cffcmap.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 cff_cmap_encoding_init (CFF_CMapStd cmap, FT_Pointer pointer)
 
 cff_cmap_encoding_done (CFF_CMapStd cmap)
 
 cff_cmap_encoding_char_index (CFF_CMapStd cmap, FT_UInt32 char_code)
 
 cff_cmap_encoding_char_next (CFF_CMapStd cmap, FT_UInt32 *pchar_code)
 
 FT_DEFINE_CMAP_CLASS (cff_cmap_encoding_class_rec, sizeof(CFF_CMapStdRec),(FT_CMap_InitFunc) cff_cmap_encoding_init,(FT_CMap_DoneFunc) cff_cmap_encoding_done,(FT_CMap_CharIndexFunc) cff_cmap_encoding_char_index,(FT_CMap_CharNextFunc) cff_cmap_encoding_char_next,(FT_CMap_CharVarIndexFunc) NULL,(FT_CMap_CharVarIsDefaultFunc) NULL,(FT_CMap_VariantListFunc) NULL,(FT_CMap_CharVariantListFunc) NULL,(FT_CMap_VariantCharListFunc) NULL) cff_sid_to_glyph_name(TT_Face face
 
return cff_index_get_sid_string (cff, sid)
 
 cff_cmap_unicode_init (PS_Unicodes unicodes, FT_Pointer pointer)
 
 cff_cmap_unicode_done (PS_Unicodes unicodes)
 
 cff_cmap_unicode_char_index (PS_Unicodes unicodes, FT_UInt32 char_code)
 
 cff_cmap_unicode_char_next (PS_Unicodes unicodes, FT_UInt32 *pchar_code)
 

Variables

FT_UInt idx
 
CFF_Charset charset = &cff->charset
 
FT_UInt sid = charset->sids[idx]
 

Function Documentation

◆ cff_cmap_encoding_char_index()

cff_cmap_encoding_char_index ( CFF_CMapStd  cmap,
FT_UInt32  char_code 
)

Definition at line 59 of file cffcmap.c.

61 {
62 FT_UInt result = 0;
63
64
65 if ( char_code < 256 )
66 result = cmap->gids[char_code];
67
68 return result;
69 }
unsigned int FT_UInt
Definition: fttypes.h:231
GLuint64EXT * result
Definition: glext.h:11304

◆ cff_cmap_encoding_char_next()

cff_cmap_encoding_char_next ( CFF_CMapStd  cmap,
FT_UInt32 *  pchar_code 
)

Definition at line 73 of file cffcmap.c.

75 {
76 FT_UInt result = 0;
77 FT_UInt32 char_code = *pchar_code;
78
79
80 *pchar_code = 0;
81
82 if ( char_code < 255 )
83 {
84 FT_UInt code = (FT_UInt)(char_code + 1);
85
86
87 for (;;)
88 {
89 if ( code >= 256 )
90 break;
91
92 result = cmap->gids[code];
93 if ( result != 0 )
94 {
95 *pchar_code = code;
96 break;
97 }
98
99 code++;
100 }
101 }
102 return result;
103 }
Definition: inflate.c:139

◆ cff_cmap_encoding_done()

cff_cmap_encoding_done ( CFF_CMapStd  cmap)

Definition at line 52 of file cffcmap.c.

53 {
54 cmap->gids = NULL;
55 }
#define NULL
Definition: types.h:112

◆ cff_cmap_encoding_init()

cff_cmap_encoding_init ( CFF_CMapStd  cmap,
FT_Pointer  pointer 
)

Definition at line 35 of file cffcmap.c.

37 {
39 CFF_Font cff = (CFF_Font)face->extra.data;
40 CFF_Encoding encoding = &cff->encoding;
41
43
44
45 cmap->gids = encoding->codes;
46
47 return 0;
48 }
CFF_Font cff
Definition: cffdrivr.c:701
struct CFF_FontRec_ * CFF_Font
Definition: cfftypes.h:156
#define FT_CMAP_FACE(x)
Definition: ftobjs.h:163
GLsizei const GLvoid * pointer
Definition: glext.h:5848
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
#define FT_UNUSED(arg)
CFF_EncodingRec encoding
Definition: cfftypes.h:358
struct TT_FaceRec_ * TT_Face
Definition: tttypes.h:988

◆ cff_cmap_unicode_char_index()

cff_cmap_unicode_char_index ( PS_Unicodes  unicodes,
FT_UInt32  char_code 
)

Definition at line 188 of file cffcmap.c.

190 {
191 TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
192 CFF_Font cff = (CFF_Font)face->extra.data;
193 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
194
195
196 return psnames->unicodes_char_index( unicodes, char_code );
197 }
FT_Service_PsCMaps psnames
Definition: cfftypes.h:387

◆ cff_cmap_unicode_char_next()

cff_cmap_unicode_char_next ( PS_Unicodes  unicodes,
FT_UInt32 *  pchar_code 
)

Definition at line 201 of file cffcmap.c.

203 {
204 TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
205 CFF_Font cff = (CFF_Font)face->extra.data;
206 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
207
208
209 return psnames->unicodes_char_next( unicodes, pchar_code );
210 }

◆ cff_cmap_unicode_done()

cff_cmap_unicode_done ( PS_Unicodes  unicodes)

Definition at line 176 of file cffcmap.c.

177 {
178 FT_Face face = FT_CMAP_FACE( unicodes );
180
181
182 FT_FREE( unicodes->maps );
183 unicodes->num_maps = 0;
184 }
#define FT_FREE(ptr)
Definition: ftmemory.h:337
#define FT_FACE_MEMORY(x)
Definition: ftobjs.h:603
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
static char memory[1024 *256]
Definition: process.c:122
FT_UInt num_maps
Definition: svpscmap.h:66
PS_UniMap * maps
Definition: svpscmap.h:67

◆ cff_cmap_unicode_init()

cff_cmap_unicode_init ( PS_Unicodes  unicodes,
FT_Pointer  pointer 
)

Definition at line 146 of file cffcmap.c.

148 {
149 TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
151 CFF_Font cff = (CFF_Font)face->extra.data;
153 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
154
156
157
158 /* can't build Unicode map for CID-keyed font */
159 /* because we don't know glyph names. */
160 if ( !charset->sids )
161 return FT_THROW( No_Unicode_Glyph_Name );
162
163 if ( !psnames->unicodes_init )
164 return FT_THROW( Unimplemented_Feature );
165
166 return psnames->unicodes_init( memory,
167 unicodes,
169 (PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
171 (FT_Pointer)face );
172 }
CFF_Charset charset
Definition: cffcmap.c:137
#define FT_THROW(e)
Definition: ftdebug.h:243
FT_UShort * sids
Definition: cfftypes.h:102
CFF_CharsetRec charset
Definition: cfftypes.h:359
FT_UInt num_glyphs
Definition: cfftypes.h:344
const char *(* PS_GetGlyphNameFunc)(FT_Pointer data, FT_UInt string_index)
Definition: svpscmap.h:77
void(* PS_FreeGlyphNameFunc)(FT_Pointer data, const char *name)
Definition: svpscmap.h:85

◆ cff_index_get_sid_string()

return cff_index_get_sid_string ( cff  ,
sid   
)

◆ FT_DEFINE_CMAP_CLASS()

FT_DEFINE_CMAP_CLASS ( cff_cmap_encoding_class_rec  ,
sizeof(CFF_CMapStdRec ,
(FT_CMap_InitFunc cff_cmap_encoding_init,
(FT_CMap_DoneFunc cff_cmap_encoding_done,
(FT_CMap_CharIndexFunc cff_cmap_encoding_char_index,
(FT_CMap_CharNextFunc cff_cmap_encoding_char_next,
(FT_CMap_CharVarIndexFunc NULL,
(FT_CMap_CharVarIsDefaultFunc NULL,
(FT_CMap_VariantListFunc NULL,
(FT_CMap_CharVariantListFunc NULL,
(FT_CMap_VariantCharListFunc NULL 
)

Variable Documentation

◆ charset

CFF_Charset charset = &cff->charset

Definition at line 137 of file cffcmap.c.

Referenced by add_charset(), add_font_to_fonttbl(), cff_charset_cid_to_gindex(), cff_charset_compute_cids(), cff_charset_done(), cff_charset_free_cids(), cff_charset_load(), cff_cmap_unicode_init(), cff_encoding_load(), cff_get_name_index(), CFn_FitCharSet(), CFn_WMCommand(), CFn_WMInitDialog(), cp_from_charset_string(), D3DXCreateFontA(), D3DXCreateFontW(), find_nls(), get_document_charset(), get_glyph_indices(), get_opentype_script(), GetKerningPairsA(), is_cjk(), ITextRange_fnMoveEndUntil(), ITextRange_fnMoveEndWhile(), ITextRange_fnMoveStartUntil(), ITextRange_fnMoveStartWhile(), ITextRange_fnMoveUntil(), ITextRange_fnMoveWhile(), ITextSelection_fnMoveEndUntil(), ITextSelection_fnMoveEndWhile(), ITextSelection_fnMoveStartUntil(), ITextSelection_fnMoveStartWhile(), ITextSelection_fnMoveUntil(), ITextSelection_fnMoveWhile(), load_nls(), font::MakeFont(), map_font(), METADC_ExtTextOut(), MFDRV_ExtTextOut(), MimeInternat_FindCharset(), MimeInternat_GetCharsetInfo(), MimeInternat_Release(), MimeOleFindCharset(), MimeOleGetDefaultCharset(), mlang_getcsetinfo(), nsChannel_SetContentCharset(), nsIOService_NewURI(), OLEFontImpl_put_Charset(), parse_content_type(), RTFCharSetToCodePage(), sic_open(), test_bitmap_font_glyph_index(), test_east_asian_font_selection(), test_font_charset(), test_GdiGetCodePage(), test_GetCharsetInfo_other(), test_margins_default(), test_margins_usefontinfo(), test_nonexistent_font(), test_oemcharset(), and test_stock_fonts().

◆ idx

FT_UInt idx
Initial value:
{
CFF_Font cff = (CFF_Font)face->extra.data

Definition at line 134 of file cffcmap.c.

◆ sid

FT_UInt sid = charset->sids[idx]

Definition at line 138 of file cffcmap.c.

Referenced by _svcauth_des(), add_group_mapping(), add_user_mapping(), AddAccessAllowedAce(), AddAccessAllowedAceEx(), AddAccessAllowedObjectAce(), AddAccessDeniedAce(), AddAccessDeniedAceEx(), AddAccessDeniedObjectAce(), AddAuditAccessAce(), AddAuditAccessAceEx(), AddAuditAccessObjectAce(), AddMandatoryAce(), ADVAPI_GetComputerSid(), AllocateAndInitializeSid(), cache_ref(), cff_encoding_load(), cff_get_glyph_name(), cff_get_name_index(), cff_index_get_sid_string(), check_4_special_identifiers(), check_style_attr_value(), check_token_label(), create_unknownsid(), CreateWellKnownSid(), debugstr_sid(), enum_components(), enum_products(), fetch_machine_component(), fetch_machine_product(), fetch_user_component(), fetch_user_product(), fill_sid(), fnIMLangFontLink2_GetScriptFontInfo(), formatopts_proc(), get_binaryrepresentation(), get_nsstyle_attr(), get_nsstyle_attr_nsval(), get_nsstyle_attr_var(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_style_attr(), GetLengthSid(), GetShellSecurityDescriptor(), GetSidIdentifierAuthority(), GetSidSubAuthority(), GetSidSubAuthorityCount(), GetWindowsAccountDomainSid(), gid_to_sid(), handle_setacl(), InitializeSid(), is_well_known_sid(), IsValidSid(), IsWellKnownSid(), IUnknown_QueryService(), load_default_acl(), map_dacl_2_nfs4acl(), map_name_2_sid(), map_nfs4ace_who(), MsiEnumClientsExA(), MsiEnumClientsExW(), MsiEnumComponentsExA(), MsiEnumComponentsExW(), MsiEnumProductsExA(), MsiEnumProductsExW(), search_for_gid(), set_nsstyle_attr(), set_nsstyle_attr_var(), set_style_attr(), set_style_pos(), set_style_pxattr(), sid_to_uid(), test_CodePageToScriptID(), test_ConvertStringSidToSid(), test_create_process_token(), test_CreateWellKnownSid(), test_EqualDomainSid(), test_GetKernelObjectSecurity(), test_LsaLookupSids(), test_MsiEnumComponentsEx(), test_MsiEnumProductsEx(), test_sid_str(), TestsSeQueryInformationToken(), uid_to_sid(), validate_default_security_descriptor(), and well_known_sid().