本文整理汇总了C++中PSH_Globals_Funcs::create方法的典型用法代码示例。如果您正苦于以下问题:C++ PSH_Globals_Funcs::create方法的具体用法?C++ PSH_Globals_Funcs::create怎么用?C++ PSH_Globals_Funcs::create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PSH_Globals_Funcs
的用法示例。
在下文中一共展示了PSH_Globals_Funcs::create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
CFF_Size_Init( CFF_Size size )
{
FT_Error error = 0;
PSH_Globals_Funcs funcs = CFF_Size_Get_Globals_Funcs( size );
if ( funcs )
{
PSH_Globals globals;
CFF_Face face = (CFF_Face)size->face;
CFF_Font font = (CFF_FontRec *)face->extra.data;
CFF_SubFont subfont = &font->top_font;
CFF_Private cpriv = &subfont->private_dict;
PS_PrivateRec priv;
/* IMPORTANT: The CFF and Type1 private dictionaries have */
/* slightly different structures; we need to */
/* synthetize a type1 dictionary on the fly here. */
{
FT_UInt n, count;
FT_MEM_SET( &priv, 0, sizeof ( priv ) );
count = priv.num_blue_values = cpriv->num_blue_values;
for ( n = 0; n < count; n++ )
priv.blue_values[n] = (FT_Short)cpriv->blue_values[n];
count = priv.num_other_blues = cpriv->num_other_blues;
for ( n = 0; n < count; n++ )
priv.other_blues[n] = (FT_Short)cpriv->other_blues[n];
count = priv.num_family_blues = cpriv->num_family_blues;
for ( n = 0; n < count; n++ )
priv.family_blues[n] = (FT_Short)cpriv->family_blues[n];
count = priv.num_family_other_blues = cpriv->num_family_other_blues;
for ( n = 0; n < count; n++ )
priv.family_other_blues[n] = (FT_Short)cpriv->family_other_blues[n];
priv.blue_scale = cpriv->blue_scale;
priv.blue_shift = cpriv->blue_shift;
priv.blue_fuzz = cpriv->blue_fuzz;
priv.standard_width[0] = (FT_UShort)cpriv->standard_width;
priv.standard_height[0] = (FT_UShort)cpriv->standard_height;
count = priv.num_snap_widths = cpriv->num_snap_widths;
for ( n = 0; n < count; n++ )
priv.snap_widths[n] = (FT_Short)cpriv->snap_widths[n];
count = priv.num_snap_heights = cpriv->num_snap_heights;
for ( n = 0; n < count; n++ )
priv.snap_heights[n] = (FT_Short)cpriv->snap_heights[n];
priv.force_bold = cpriv->force_bold;
priv.language_group = cpriv->language_group;
priv.lenIV = cpriv->lenIV;
}
error = funcs->create( size->face->memory, &priv, &globals );
if ( !error )
size->internal = (FT_Size_Internal)(void*)globals;
}
return error;
}