Exemplo n.º 1
0
  T1_Size_Reset( T1_Size  size )
  {
    PSH_Globals_Funcs  funcs = T1_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;
  }
Exemplo n.º 2
0
  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;
    }
  }
Exemplo n.º 3
0
  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;
  }
Exemplo n.º 4
0
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;
    }
}
Exemplo n.º 5
0
  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;
    }
  }
Exemplo n.º 6
0
  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;
  }
Exemplo n.º 7
0
  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;
  }
Exemplo n.º 8
0
  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;
  }