本文整理汇总了C++中FT_CMAP_FACE函数的典型用法代码示例。如果您正苦于以下问题:C++ FT_CMAP_FACE函数的具体用法?C++ FT_CMAP_FACE怎么用?C++ FT_CMAP_FACE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FT_CMAP_FACE函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cff_get_cmap_info
/*
* TT CMAP INFO
*
* If the charmap is a synthetic Unicode encoding cmap or
* a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO
* service defined in SFNT module.
*
* Otherwise call the service function in the sfnt module.
*
*/
static FT_Error
cff_get_cmap_info( FT_CharMap charmap,
TT_CMapInfo *cmap_info )
{
FT_CMap cmap = FT_CMAP( charmap );
FT_Error error = CFF_Err_Ok;
cmap_info->language = 0;
if ( cmap->clazz != &cff_cmap_encoding_class_rec &&
cmap->clazz != &cff_cmap_unicode_class_rec )
{
FT_Face face = FT_CMAP_FACE( cmap );
FT_Library library = FT_FACE_LIBRARY( face );
FT_Module sfnt = FT_Get_Module( library, "sfnt" );
FT_Service_TTCMaps service =
(FT_Service_TTCMaps)ft_module_get_service( sfnt,
FT_SERVICE_ID_TT_CMAP );
if ( service && service->get_cmap_info )
error = service->get_cmap_info( charmap, cmap_info );
}
return error;
}
示例2: cff_get_cmap_info
/*
* TT CMAP INFO
*
* If the charmap is a synthetic Unicode encoding cmap or
* a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO
* service defined in SFNT module.
*
* Otherwise call the service function in the sfnt module.
*
*/
static FT_Error
cff_get_cmap_info( FT_CharMap charmap,
TT_CMapInfo *cmap_info )
{
FT_CMap cmap = FT_CMAP( charmap );
FT_Error error = CFF_Err_Ok;
FT_Face face = FT_CMAP_FACE( cmap );
FT_Library library = FT_FACE_LIBRARY( face );
cmap_info->language = 0;
cmap_info->format = 0;
if ( cmap->clazz != &FT_CFF_CMAP_ENCODING_CLASS_REC_GET &&
cmap->clazz != &FT_CFF_CMAP_UNICODE_CLASS_REC_GET )
{
FT_Module sfnt = FT_Get_Module( library, "sfnt" );
FT_Service_TTCMaps service =
(FT_Service_TTCMaps)ft_module_get_service( sfnt,
FT_SERVICE_ID_TT_CMAP );
if ( service && service->get_cmap_info )
error = service->get_cmap_info( charmap, cmap_info );
}
return error;
}
示例3: t1_cmap_unicode_done
t1_cmap_unicode_done( PS_Unicodes unicodes )
{
FT_Face face = FT_CMAP_FACE( unicodes );
FT_Memory memory = FT_FACE_MEMORY( face );
FT_FREE( unicodes->maps );
unicodes->num_maps = 0;
}
示例4: t1_cmap_unicode_char_next
t1_cmap_unicode_char_next( PS_Unicodes unicodes,
FT_UInt32 *pchar_code )
{
T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes );
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
return psnames->unicodes_char_next( unicodes, pchar_code );
}
示例5: cff_cmap_unicode_char_next
cff_cmap_unicode_char_next( PS_Unicodes unicodes,
FT_UInt32 *pchar_code )
{
TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
CFF_Font cff = (CFF_Font)face->extra.data;
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
return psnames->unicodes_char_next( unicodes, pchar_code );
}
示例6: cff_cmap_encoding_init
cff_cmap_encoding_init( CFF_CMapStd cmap )
{
TT_Face face = (TT_Face)FT_CMAP_FACE( cmap );
CFF_Font cff = (CFF_Font)face->extra.data;
CFF_Encoding encoding = &cff->encoding;
cmap->gids = encoding->codes;
return 0;
}
示例7: fnt_cmap_init
static FT_Error
fnt_cmap_init( FNT_CMap cmap )
{
FNT_Face face = (FNT_Face)FT_CMAP_FACE( cmap );
FNT_Font font = face->font;
cmap->first = (FT_UInt32) font->header.first_char;
cmap->count = (FT_UInt32)( font->header.last_char - cmap->first + 1 );
return 0;
}
示例8: t1_cmap_unicode_init
t1_cmap_unicode_init( PS_Unicodes unicodes, FT_Pointer init_data ) /* XXX EMSCRIPTEN */
{
T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes );
FT_Memory memory = FT_FACE_MEMORY( face );
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
FT_UNUSED(init_data); /* XXX EMSCRIPTEN */
return psnames->unicodes_init( memory,
unicodes,
face->type1.num_glyphs,
(PS_GetGlyphNameFunc)&t1_get_glyph_name,
(PS_FreeGlyphNameFunc)NULL,
(FT_Pointer)face );
}
示例9: t1_cmap_unicode_init
t1_cmap_unicode_init( PS_Unicodes unicodes )
{
T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes );
FT_Memory memory = FT_FACE_MEMORY( face );
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
return psnames->unicodes_init( memory,
unicodes,
face->type1.num_glyphs,
(PS_GetGlyphNameFunc)&psaux_get_glyph_name,
(PS_FreeGlyphNameFunc)NULL,
(FT_Pointer)face );
}
示例10: t1_cmap_custom_init
t1_cmap_custom_init( T1_CMapCustom cmap, FT_Pointer init_data ) /* XXX EMSCRIPTEN */
{
T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
T1_Encoding encoding = &face->type1.encoding;
FT_UNUSED(init_data); /* XXX EMSCRIPTEN */
cmap->first = encoding->code_first;
cmap->count = (FT_UInt)( encoding->code_last - cmap->first );
cmap->indices = encoding->char_index;
FT_ASSERT( cmap->indices != NULL );
FT_ASSERT( encoding->code_first <= encoding->code_last );
return 0;
}
示例11: t1_cmap_custom_init
t1_cmap_custom_init( T1_CMapCustom cmap )
{
T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
T1_Encoding encoding = &face->type1.encoding;
cmap->first = encoding->code_first;
cmap->count = (FT_UInt)( encoding->code_last - cmap->first );
cmap->indices = encoding->char_index;
FT_ASSERT( cmap->indices != NULL );
FT_ASSERT( encoding->code_first <= encoding->code_last );
return 0;
}
示例12: t1_cmap_std_init
static void
t1_cmap_std_init( T1_CMapStd cmap,
FT_Int is_expert )
{
T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
cmap->num_glyphs = face->type1.num_glyphs;
cmap->glyph_names = (const char* const*)face->type1.glyph_names;
cmap->sid_to_string = psnames->adobe_std_strings;
cmap->code_to_sid = is_expert ? psnames->adobe_expert_encoding
: psnames->adobe_std_encoding;
FT_ASSERT( cmap->code_to_sid != NULL );
}
示例13: cff_cmap_unicode_init
cff_cmap_unicode_init( PS_Unicodes unicodes )
{
TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
FT_Memory memory = FT_FACE_MEMORY( face );
CFF_Font cff = (CFF_Font)face->extra.data;
CFF_Charset charset = &cff->charset;
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
/* can't build Unicode map for CID-keyed font */
if ( !charset->sids )
return CFF_Err_Invalid_Argument;
return psnames->unicodes_init( memory,
unicodes,
cff->num_glyphs,
(PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
(PS_FreeGlyphNameFunc)&cff_sid_free_glyph_name,
(FT_Pointer)face );
}
示例14: cff_cmap_unicode_init
cff_cmap_unicode_init( PS_Unicodes unicodes )
{
TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
FT_Memory memory = FT_FACE_MEMORY( face );
CFF_Font cff = (CFF_Font)face->extra.data;
CFF_Charset charset = &cff->charset;
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
/* can't build Unicode map for CID-keyed font */
/* because we don't know glyph names. */
if ( !charset->sids )
return FT_THROW( No_Unicode_Glyph_Name );
return psnames->unicodes_init( memory,
unicodes,
cff->num_glyphs,
(PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
(PS_FreeGlyphNameFunc)NULL,
(FT_Pointer)face );
}