cid_size_reset( CID_Size size ) { PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size ); FT_Error error = 0; if ( funcs ) error = funcs->set_scale( (PSH_Globals)size->root.internal, size->root.metrics.x_scale, size->root.metrics.y_scale, 0, 0 ); return error; }
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; } }
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; } }
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; }
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; }
cid_size_init( CID_Size size ) { FT_Error error = 0; PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size ); if ( funcs ) { PSH_Globals globals; CID_Face face = (CID_Face)size->root.face; CID_FaceDict dict = face->cid.font_dicts + face->root.face_index; PS_Private priv = &dict->private_dict; error = funcs->create( size->root.face->memory, priv, &globals ); if ( !error ) size->root.internal = (FT_Size_Internal)(void*)globals; } return error; }