Example #1
0
  tt_face_load_pclt( TT_Face    face,
                     FT_Stream  stream )
  {
    static const FT_Frame_Field  pclt_fields[] =
    {
#undef  FT_STRUCTURE
#define FT_STRUCTURE  TT_PCLT

      FT_FRAME_START( 54 ),
        FT_FRAME_ULONG ( Version ),
        FT_FRAME_ULONG ( FontNumber ),
        FT_FRAME_USHORT( Pitch ),
        FT_FRAME_USHORT( xHeight ),
        FT_FRAME_USHORT( Style ),
        FT_FRAME_USHORT( TypeFamily ),
        FT_FRAME_USHORT( CapHeight ),
        FT_FRAME_BYTES ( TypeFace, 16 ),
        FT_FRAME_BYTES ( CharacterComplement, 8 ),
        FT_FRAME_BYTES ( FileName, 6 ),
        FT_FRAME_CHAR  ( StrokeWeight ),
        FT_FRAME_CHAR  ( WidthType ),
        FT_FRAME_BYTE  ( SerifStyle ),
        FT_FRAME_BYTE  ( Reserved ),
      FT_FRAME_END
    };

    FT_Error  error;
    TT_PCLT*  pclt = &face->pclt;


    /* optional table */
    error = face->goto_table( face, TTAG_PCLT, stream, 0 );
    if ( error )
      goto Exit;

    if ( FT_STREAM_READ_FIELDS( pclt_fields, pclt ) )
      goto Exit;

  Exit:
    return error;
  }
Example #2
0
      FT_FRAME_SKIP_BYTES( 34 ),
      FT_FRAME_USHORT_LE ( resource_tab_offset ),
      FT_FRAME_USHORT_LE ( rname_tab_offset ),
    FT_FRAME_END
  };

  static
  const FT_Frame_Field  winfnt_header_fields[] =
  {
#undef  FT_STRUCTURE
#define FT_STRUCTURE  WinFNT_Header

    FT_FRAME_START( 134 ),
      FT_FRAME_USHORT_LE( version ),
      FT_FRAME_ULONG_LE ( file_size ),
      FT_FRAME_BYTES    ( copyright, 60 ),
      FT_FRAME_USHORT_LE( file_type ),
      FT_FRAME_USHORT_LE( nominal_point_size ),
      FT_FRAME_USHORT_LE( vertical_resolution ),
      FT_FRAME_USHORT_LE( horizontal_resolution ),
      FT_FRAME_USHORT_LE( ascent ),
      FT_FRAME_USHORT_LE( internal_leading ),
      FT_FRAME_USHORT_LE( external_leading ),
      FT_FRAME_BYTE     ( italic ),
      FT_FRAME_BYTE     ( underline ),
      FT_FRAME_BYTE     ( strike_out ),
      FT_FRAME_USHORT_LE( weight ),
      FT_FRAME_BYTE     ( charset ),
      FT_FRAME_USHORT_LE( pixel_width ),
      FT_FRAME_USHORT_LE( pixel_height ),
      FT_FRAME_BYTE     ( pitch_and_family ),
Example #3
0
File: winfnt.c Project: 1tgr/mobius
    FT_FRAME_SKIP_BYTES( 34 ),
    FT_FRAME_USHORT_LE ( resource_tab_offset ),
    FT_FRAME_USHORT_LE ( rname_tab_offset ),
    FT_FRAME_END
};

static
const FT_Frame_Field  winfnt_header_fields[] =
{
#undef  FT_STRUCTURE
#define FT_STRUCTURE  FT_WinFNT_HeaderRec

    FT_FRAME_START( 146 ),
    FT_FRAME_USHORT_LE( version ),
    FT_FRAME_ULONG_LE ( file_size ),
    FT_FRAME_BYTES    ( copyright, 60 ),
    FT_FRAME_USHORT_LE( file_type ),
    FT_FRAME_USHORT_LE( nominal_point_size ),
    FT_FRAME_USHORT_LE( vertical_resolution ),
    FT_FRAME_USHORT_LE( horizontal_resolution ),
    FT_FRAME_USHORT_LE( ascent ),
    FT_FRAME_USHORT_LE( internal_leading ),
    FT_FRAME_USHORT_LE( external_leading ),
    FT_FRAME_BYTE     ( italic ),
    FT_FRAME_BYTE     ( underline ),
    FT_FRAME_BYTE     ( strike_out ),
    FT_FRAME_USHORT_LE( weight ),
    FT_FRAME_BYTE     ( charset ),
    FT_FRAME_USHORT_LE( pixel_width ),
    FT_FRAME_USHORT_LE( pixel_height ),
    FT_FRAME_BYTE     ( pitch_and_family ),