本文整理汇总了C++中PSH_Globals_Funcs类的典型用法代码示例。如果您正苦于以下问题:C++ PSH_Globals_Funcs类的具体用法?C++ PSH_Globals_Funcs怎么用?C++ PSH_Globals_Funcs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PSH_Globals_Funcs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cff_size_done
cff_size_done( FT_Size cffsize ) /* CFF_Size */
{
CFF_Size size = (CFF_Size)cffsize;
CFF_Face face = (CFF_Face)size->root.face;
CFF_Font font = (CFF_Font)face->extra.data;
CFF_Internal internal = (CFF_Internal)cffsize->internal;
if ( internal )
{
PSH_Globals_Funcs funcs;
funcs = cff_size_get_globals_funcs( size );
if ( funcs )
{
FT_UInt i;
funcs->destroy( internal->topfont );
for ( i = font->num_subfonts; i > 0; i-- )
funcs->destroy( internal->subfonts[i - 1] );
}
/* `internal' is freed by destroy_size (in ftobjs.c) */
}
}
示例2: cff_size_select
cff_size_select( FT_Size size,
FT_ULong strike_index )
{
CFF_Size cffsize = (CFF_Size)size;
PSH_Globals_Funcs funcs;
cffsize->strike_index = strike_index;
FT_Select_Metrics( size->face, strike_index );
funcs = cff_size_get_globals_funcs( cffsize );
if ( funcs )
{
CFF_Face face = (CFF_Face)size->face;
CFF_Font font = (CFF_Font)face->extra.data;
CFF_Internal internal = (CFF_Internal)size->internal;
FT_ULong top_upm = font->top_font.font_dict.units_per_em;
FT_UInt i;
funcs->set_scale( internal->topfont,
size->metrics.x_scale, size->metrics.y_scale,
0, 0 );
for ( i = font->num_subfonts; i > 0; i-- )
{
CFF_SubFont sub = font->subfonts[i - 1];
FT_ULong sub_upm = sub->font_dict.units_per_em;
FT_Pos x_scale, y_scale;
if ( top_upm != sub_upm )
{
x_scale = FT_MulDiv( size->metrics.x_scale, top_upm, sub_upm );
y_scale = FT_MulDiv( size->metrics.y_scale, top_upm, sub_upm );
}
else
{
x_scale = size->metrics.x_scale;
y_scale = size->metrics.y_scale;
}
funcs->set_scale( internal->subfonts[i - 1],
x_scale, y_scale, 0, 0 );
}
}
return FT_Err_Ok;
}
示例3: cid_size_done
cid_size_done( CID_Size size )
{
if ( size->root.internal )
{
PSH_Globals_Funcs funcs;
funcs = cid_size_get_globals_funcs( size );
if ( funcs )
funcs->destroy( (PSH_Globals)size->root.internal );
size->root.internal = 0;
}
}
示例4: T1_Size_Done
FT_LOCAL_DEF void
T1_Size_Done( T1_Size size )
{
if ( size->root.internal )
{
PSH_Globals_Funcs funcs;
funcs = T1_Size_Get_Globals_Funcs( size );
if ( funcs )
funcs->destroy( (PSH_Globals)size->root.internal );
size->root.internal = 0;
}
}
示例5: cff_size_init
cff_size_init( FT_Size cffsize ) /* CFF_Size */
{
CFF_Size size = (CFF_Size)cffsize;
FT_Error error = FT_Err_Ok;
PSH_Globals_Funcs funcs = cff_size_get_globals_funcs( size );
if ( funcs )
{
CFF_Face face = (CFF_Face)cffsize->face;
CFF_Font font = (CFF_Font)face->extra.data;
CFF_Internal internal = NULL;
PS_PrivateRec priv;
FT_Memory memory = cffsize->face->memory;
FT_UInt i;
if ( FT_NEW( internal ) )
goto Exit;
cff_make_private_dict( &font->top_font, &priv );
error = funcs->create( cffsize->face->memory, &priv,
&internal->topfont );
if ( error )
goto Exit;
for ( i = font->num_subfonts; i > 0; i-- )
{
CFF_SubFont sub = font->subfonts[i - 1];
cff_make_private_dict( sub, &priv );
error = funcs->create( cffsize->face->memory, &priv,
&internal->subfonts[i - 1] );
if ( error )
goto Exit;
}
cffsize->internal = (FT_Size_Internal)(void*)internal;
}
size->strike_index = 0xFFFFFFFFUL;
Exit:
return error;
}
示例6: T1_Size_Request
T1_Size_Request( T1_Size size,
FT_Size_Request req )
{
PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size );
FT_Request_Metrics( size->root.face, req );
if ( funcs )
funcs->set_scale( (PSH_Globals)size->root.internal,
size->root.metrics.x_scale,
size->root.metrics.y_scale,
0, 0 );
return T1_Err_Ok;
}
示例7: T1_Size_Done
T1_Size_Done( FT_Size t1size ) /* T1_Size */
{
T1_Size size = (T1_Size)t1size;
if ( size->root.internal )
{
PSH_Globals_Funcs funcs;
funcs = T1_Size_Get_Globals_Funcs( size );
if ( funcs )
funcs->destroy( (PSH_Globals)size->root.internal );
size->root.internal = 0;
}
}
示例8: T1_Size_Request
T1_Size_Request( FT_Size t1size, /* T1_Size */
FT_Size_Request req )
{
T1_Size size = (T1_Size)t1size;
PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size );
FT_Request_Metrics( size->root.face, req );
if ( funcs )
funcs->set_scale( (PSH_Globals)t1size->internal->module_data,
size->root.metrics.x_scale,
size->root.metrics.y_scale,
0, 0 );
return FT_Err_Ok;
}
示例9: cid_size_done
cid_size_done( FT_Size cidsize ) /* CID_Size */
{
CID_Size size = (CID_Size)cidsize;
if ( cidsize->internal )
{
PSH_Globals_Funcs funcs;
funcs = cid_size_get_globals_funcs( size );
if ( funcs )
funcs->destroy( (PSH_Globals)cidsize->internal );
cidsize->internal = 0;
}
}
示例10: T1_Size_Done
T1_Size_Done( FT_Size t1size ) /* T1_Size */
{
T1_Size size = (T1_Size)t1size;
if ( t1size->internal->module_data )
{
PSH_Globals_Funcs funcs;
funcs = T1_Size_Get_Globals_Funcs( size );
if ( funcs )
funcs->destroy( (PSH_Globals)t1size->internal->module_data );
t1size->internal->module_data = NULL;
}
}
示例11: cid_size_request
cid_size_request( FT_Size size,
FT_Size_Request req )
{
PSH_Globals_Funcs funcs;
FT_Request_Metrics( size->face, req );
funcs = cid_size_get_globals_funcs( (CID_Size)size );
if ( funcs )
funcs->set_scale( (PSH_Globals)size->internal,
size->metrics.x_scale,
size->metrics.y_scale,
0, 0 );
return CID_Err_Ok;
}
示例12: cid_size_reset
cid_size_reset( FT_Size cidsize, /* CID_Size */
FT_UInt char_width,
FT_UInt char_height )
{
CID_Size size = (CID_Size)cidsize;
PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
FT_Error error = 0;
FT_UNUSED( char_width );
FT_UNUSED( char_height );
if ( funcs )
error = funcs->set_scale( (PSH_Globals)cidsize->internal,
cidsize->metrics.x_scale,
cidsize->metrics.y_scale,
0, 0 );
return error;
}
示例13: T1_Size_Init
T1_Size_Init( T1_Size size )
{
FT_Error error = 0;
PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size );
if ( funcs )
{
PSH_Globals globals;
T1_Face face = (T1_Face)size->root.face;
error = funcs->create( size->root.face->memory,
&face->type1.private_dict, &globals );
if ( !error )
size->root.internal = (FT_Size_Internal)(void*)globals;
}
return error;
}
示例14: T1_Size_Init
T1_Size_Init( FT_Size t1size ) /* T1_Size */
{
T1_Size size = (T1_Size)t1size;
FT_Error error = FT_Err_Ok;
PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size );
if ( funcs )
{
PSH_Globals globals;
T1_Face face = (T1_Face)size->root.face;
error = funcs->create( size->root.face->memory,
&face->type1.private_dict, &globals );
if ( !error )
t1size->internal->module_data = globals;
}
return error;
}
示例15: cid_size_init
cid_size_init( FT_Size cidsize ) /* CID_Size */
{
CID_Size size = (CID_Size)cidsize;
FT_Error error = 0;
PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
if ( funcs )
{
PSH_Globals globals;
CID_Face face = (CID_Face)cidsize->face;
CID_FaceDict dict = face->cid.font_dicts + face->root.face_index;
PS_Private priv = &dict->private_dict;
error = funcs->create( cidsize->face->memory, priv, &globals );
if ( !error )
cidsize->internal = (FT_Size_Internal)(void*)globals;
}
return error;
}