亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ttload.c

?? 智能設備中PDF閱讀器的源碼!用于windows mobile2003或者WM5以上
?? C
?? 第 1 頁 / 共 4 頁
字號:
/***************************************************************************/
/*                                                                         */
/*  ttload.c                                                               */
/*                                                                         */
/*    Load the basic TrueType tables, i.e., tables that can be either in   */
/*    TTF or OTF fonts (body).                                             */
/*                                                                         */
/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
/*                                                                         */
/*  This file is part of the FreeType project, and may only be used,       */
/*  modified, and distributed under the terms of the FreeType project      */
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
/*  this file you indicate that you have read the license and              */
/*  understand and accept it fully.                                        */
/*                                                                         */
/***************************************************************************/


#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include "ttload.h"

#include "sferrors.h"


  /*************************************************************************/
  /*                                                                       */
  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
  /* messages during execution.                                            */
  /*                                                                       */
#undef  FT_COMPONENT
#define FT_COMPONENT  trace_ttload


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    tt_face_lookup_table                                               */
  /*                                                                       */
  /* <Description>                                                         */
  /*    Looks for a TrueType table by name.                                */
  /*                                                                       */
  /* <Input>                                                               */
  /*    face :: A face object handle.                                      */
  /*                                                                       */
  /*    tag  :: The searched tag.                                          */
  /*                                                                       */
  /* <Return>                                                              */
  /*    A pointer to the table directory entry.  0 if not found.           */
  /*                                                                       */
  FT_LOCAL_DEF( TT_Table  )
  tt_face_lookup_table( TT_Face   face,
                        FT_ULong  tag  )
  {
    TT_Table  entry;
    TT_Table  limit;


    FT_TRACE4(( "tt_face_lookup_table: %08p, `%c%c%c%c' -- ",
                face,
                (FT_Char)( tag >> 24 ),
                (FT_Char)( tag >> 16 ),
                (FT_Char)( tag >> 8  ),
                (FT_Char)( tag       ) ));

    entry = face->dir_tables;
    limit = entry + face->num_tables;

    for ( ; entry < limit; entry++ )
    {
      /* For compatibility with Windows, we consider 0-length */
      /* tables the same as missing tables.                   */
      if ( entry->Tag == tag && entry->Length != 0 )
      {
        FT_TRACE4(( "found table.\n" ));
        return entry;
      }
    }

    FT_TRACE4(( "could not find table!\n" ));
    return 0;
  }


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    tt_face_goto_table                                                 */
  /*                                                                       */
  /* <Description>                                                         */
  /*    Looks for a TrueType table by name, then seek a stream to it.      */
  /*                                                                       */
  /* <Input>                                                               */
  /*    face   :: A face object handle.                                    */
  /*                                                                       */
  /*    tag    :: The searched tag.                                        */
  /*                                                                       */
  /*    stream :: The stream to seek when the table is found.              */
  /*                                                                       */
  /* <Output>                                                              */
  /*    length :: The length of the table if found, undefined otherwise.   */
  /*                                                                       */
  /* <Return>                                                              */
  /*    FreeType error code.  0 means success.                             */
  /*                                                                       */
  FT_LOCAL_DEF( FT_Error )
  tt_face_goto_table( TT_Face    face,
                      FT_ULong   tag,
                      FT_Stream  stream,
                      FT_ULong*  length )
  {
    TT_Table  table;
    FT_Error  error;


    table = tt_face_lookup_table( face, tag );
    if ( table )
    {
      if ( length )
        *length = table->Length;

      if ( FT_STREAM_SEEK( table->Offset ) )
       goto Exit;
    }
    else
      error = SFNT_Err_Table_Missing;

  Exit:
    return error;
  }


  /* Here, we                                                              */
  /*                                                                       */
  /* - check that `num_tables' is valid                                    */
  /* - look for a `head' table, check its size, and parse it to check      */
  /*   whether its `magic' field is correctly set                          */
  /*                                                                       */
  /* When checking directory entries, ignore the tables `glyx' and `locx'  */
  /* which are hacked-out versions of `glyf' and `loca' in some PostScript */
  /* Type 42 fonts, and which are generally invalid.                       */
  /*                                                                       */
  static FT_Error
  check_table_dir( SFNT_Header  sfnt,
                   FT_Stream    stream )
  {
    FT_Error        error;
    FT_UInt         nn;
    FT_UInt         has_head = 0, has_sing = 0, has_meta = 0;
    FT_ULong        offset = sfnt->offset + 12;

    const FT_ULong  glyx_tag = FT_MAKE_TAG( 'g', 'l', 'y', 'x' );
    const FT_ULong  locx_tag = FT_MAKE_TAG( 'l', 'o', 'c', 'x' );

    static const FT_Frame_Field  table_dir_entry_fields[] =
    {
#undef  FT_STRUCTURE
#define FT_STRUCTURE  TT_TableRec

      FT_FRAME_START( 16 ),
        FT_FRAME_ULONG( Tag ),
        FT_FRAME_ULONG( CheckSum ),
        FT_FRAME_ULONG( Offset ),
        FT_FRAME_ULONG( Length ),
      FT_FRAME_END
    };


    if ( sfnt->num_tables == 0                         ||
         offset + sfnt->num_tables * 16 > stream->size )
      return SFNT_Err_Unknown_File_Format;

    if ( FT_STREAM_SEEK( offset ) )
      return error;

    for ( nn = 0; nn < sfnt->num_tables; nn++ )
    {
      TT_TableRec  table;


      if ( FT_STREAM_READ_FIELDS( table_dir_entry_fields, &table ) )
        return error;

      if ( table.Offset + table.Length > stream->size &&
           table.Tag != glyx_tag                      &&
           table.Tag != locx_tag                      )
        return SFNT_Err_Unknown_File_Format;

      if ( table.Tag == TTAG_head || table.Tag == TTAG_bhed )
      {
        FT_UInt32  magic;


#ifndef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
        if ( table.Tag == TTAG_head )
#endif
          has_head = 1;

        /*
         * The table length should be 0x36, but certain font tools make it
         * 0x38, so we will just check that it is greater.
         *
         * Note that according to the specification, the table must be
         * padded to 32-bit lengths, but this doesn't apply to the value of
         * its `Length' field!
         *
         */
        if ( table.Length < 0x36 )
          return SFNT_Err_Unknown_File_Format;

        if ( FT_STREAM_SEEK( table.Offset + 12 ) ||
             FT_READ_ULONG( magic )              )
          return error;

        if ( magic != 0x5F0F3CF5UL )
          return SFNT_Err_Unknown_File_Format;

        if ( FT_STREAM_SEEK( offset + ( nn + 1 ) * 16 ) )
          return error;
      }
      else if ( table.Tag == TTAG_SING )
        has_sing = 1;
      else if ( table.Tag == TTAG_META )
        has_meta = 1;
    }

    /* if `sing' and `meta' tables are present, there is no `head' table */
    if ( has_head || ( has_sing && has_meta ) )
      return SFNT_Err_Ok;
    else
      return SFNT_Err_Unknown_File_Format;
  }


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    tt_face_load_font_dir                                              */
  /*                                                                       */
  /* <Description>                                                         */
  /*    Loads the header of a SFNT font file.                              */
  /*                                                                       */
  /* <Input>                                                               */
  /*    face       :: A handle to the target face object.                  */
  /*                                                                       */
  /*    stream     :: The input stream.                                    */
  /*                                                                       */
  /* <Output>                                                              */
  /*    sfnt       :: The SFNT header.                                     */
  /*                                                                       */
  /* <Return>                                                              */
  /*    FreeType error code.  0 means success.                             */
  /*                                                                       */
  /* <Note>                                                                */
  /*    The stream cursor must be at the beginning of the font directory.  */
  /*                                                                       */
  FT_LOCAL_DEF( FT_Error )
  tt_face_load_font_dir( TT_Face    face,
                         FT_Stream  stream )
  {
    SFNT_HeaderRec  sfnt;
    FT_Error        error;
    FT_Memory       memory = stream->memory;
    TT_TableRec*    entry;
    TT_TableRec*    limit;

    static const FT_Frame_Field  offset_table_fields[] =
    {
#undef  FT_STRUCTURE
#define FT_STRUCTURE  SFNT_HeaderRec

      FT_FRAME_START( 8 ),
        FT_FRAME_USHORT( num_tables ),
        FT_FRAME_USHORT( search_range ),
        FT_FRAME_USHORT( entry_selector ),
        FT_FRAME_USHORT( range_shift ),
      FT_FRAME_END
    };


    FT_TRACE2(( "tt_face_load_font_dir: %08p\n", face ));

    /* read the offset table */

    sfnt.offset = FT_STREAM_POS();

    if ( FT_READ_ULONG( sfnt.format_tag )                    ||
         FT_STREAM_READ_FIELDS( offset_table_fields, &sfnt ) )
      return error;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日av在线不卡| 日本午夜一本久久久综合| 国产精品色婷婷久久58| 日韩女优毛片在线| 精品国产乱码久久久久久夜甘婷婷| 亚洲自拍偷拍综合| 日本道色综合久久| 亚洲线精品一区二区三区八戒| 99vv1com这只有精品| 亚洲综合色噜噜狠狠| 欧美人xxxx| 久久国产生活片100| 国产午夜一区二区三区| 国产成人在线电影| 亚洲视频一区二区在线观看| 欧美精品xxxxbbbb| 日韩成人一级片| 国产亚洲欧美一级| 91麻豆精品一区二区三区| 亚洲在线观看免费| 日韩一级片网址| 99久久伊人网影院| 性感美女极品91精品| 欧美mv和日韩mv的网站| 豆国产96在线|亚洲| 亚洲国产乱码最新视频| 日本一区免费视频| 91精品婷婷国产综合久久| 国产盗摄女厕一区二区三区| 亚洲一区日韩精品中文字幕| 精品少妇一区二区三区在线播放| 99久久免费视频.com| 奇米影视7777精品一区二区| 亚洲欧美日韩国产另类专区| 日韩欧美国产综合一区 | 一区二区三区 在线观看视频| 欧美人妖巨大在线| 在线观看免费成人| 欧美亚洲动漫精品| heyzo一本久久综合| 国产中文字幕一区| 日本一不卡视频| 亚洲一区二区三区视频在线播放 | 成人激情免费视频| 精品一区二区三区免费观看| 日韩国产精品久久久久久亚洲| 最近日韩中文字幕| 国产精品青草久久| 国产精品免费久久| 国产精品全国免费观看高清| 久久伊人中文字幕| 精品第一国产综合精品aⅴ| 欧美成人r级一区二区三区| 欧美精品 国产精品| 制服视频三区第一页精品| 欧美日本一区二区三区四区| 日本精品免费观看高清观看| 在线观看91视频| 欧美日产在线观看| 欧美一区二区美女| 久久―日本道色综合久久| 国产女主播视频一区二区| 欧美激情艳妇裸体舞| 亚洲日本免费电影| 性做久久久久久免费观看| 另类欧美日韩国产在线| 国产高清不卡二三区| 色诱视频网站一区| 日韩亚洲电影在线| 国产精品久久久久影视| 亚洲国产精品精华液网站| 久久99久久99小草精品免视看| 高清av一区二区| 欧美三级乱人伦电影| 久久久www免费人成精品| 亚洲三级小视频| 丁香天五香天堂综合| 91精品久久久久久久久99蜜臂| 久久久久久久久免费| 婷婷夜色潮精品综合在线| 福利一区二区在线| 欧美一级日韩免费不卡| 亚洲男人天堂av| 国产成人福利片| 日韩一区二区精品| 午夜精品视频一区| 91久久精品午夜一区二区| 国产亚洲综合色| 精品一区免费av| 欧美日韩一区二区三区高清| 亚洲视频一区二区在线观看| 丁香五精品蜜臀久久久久99网站| 7799精品视频| 丝瓜av网站精品一区二区| 色爱区综合激月婷婷| 国产精品视频免费| 波多野洁衣一区| 国产精品无码永久免费888| 国产精品88888| 国产日韩欧美在线一区| 成人性生交大片免费看中文网站| 久久综合九色综合久久久精品综合| 三级在线观看一区二区| 欧美日韩午夜影院| 日韩av午夜在线观看| 精品美女在线播放| 国产高清无密码一区二区三区| 久久综合成人精品亚洲另类欧美 | 国产精品一二一区| 欧美激情一二三区| 色一情一伦一子一伦一区| 亚洲午夜精品网| 中文字幕不卡在线观看| www.久久精品| 五月婷婷激情综合| 久久女同精品一区二区| www.亚洲人| 五月天欧美精品| 国产日韩影视精品| 欧美少妇一区二区| 精品一区二区三区视频| 国产精品白丝在线| 欧美视频一区二| 成人黄色在线视频| 午夜电影一区二区三区| 久久亚洲综合色一区二区三区| 国产91露脸合集magnet| 日韩在线一二三区| 最新日韩av在线| 久久久不卡网国产精品一区| 欧美自拍偷拍一区| 国产一区亚洲一区| 亚洲高清中文字幕| 自拍偷拍国产精品| 国产三区在线成人av| 精品少妇一区二区三区免费观看| 91啦中文在线观看| 成人免费精品视频| 国内精品视频666| 日韩电影在线观看网站| 一区二区三区加勒比av| 国产精品美女久久久久久| 国产三级三级三级精品8ⅰ区| 91麻豆精品国产| 日韩欧美电影在线| 欧美一区二区在线不卡| 欧美福利电影网| 欧美精品一卡二卡| 欧美一区二区在线免费播放| 欧美三级电影在线看| 欧美亚洲国产怡红院影院| 欧洲精品中文字幕| 欧美二区三区91| 欧美xingq一区二区| 久久一区二区三区四区| 中文字幕久久午夜不卡| 中文字幕乱码一区二区免费| 中文字幕一区二| 亚洲第一二三四区| 成人av在线一区二区三区| 成人精品视频网站| 在线视频观看一区| 宅男噜噜噜66一区二区66| 91精品久久久久久久99蜜桃| 久久精品人人做| 亚洲综合清纯丝袜自拍| 美女一区二区在线观看| 丁香婷婷综合色啪| 欧美日韩国产一二三| 精品成人a区在线观看| 中文字幕亚洲区| 蜜臀国产一区二区三区在线播放| 久久99蜜桃精品| 欧美少妇性性性| 国产精品嫩草99a| 男男成人高潮片免费网站| 9久草视频在线视频精品| 欧美夫妻性生活| 国产精品色哟哟网站| 久久99精品久久久久久国产越南 | 美国三级日本三级久久99| 99精品在线观看视频| 2014亚洲片线观看视频免费| 亚洲主播在线播放| 99国产精品久| 国产欧美综合在线| 久久99久久久欧美国产| 884aa四虎影成人精品一区| 一区二区三区在线观看视频| 成人综合婷婷国产精品久久| 欧美成人a在线| 美女mm1313爽爽久久久蜜臀| 在线不卡中文字幕| 亚洲国产一二三| 欧美日韩黄色一区二区| 亚洲国产综合人成综合网站| 在线亚洲免费视频| 亚洲电影你懂得| 91精品国产综合久久久久久| 亚洲成人激情自拍|