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

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

?? t1parse.c

?? a very goog book
?? C
字號:
/***************************************************************************//*                                                                         *//*  t1parse.c                                                              *//*                                                                         *//*    Type 1 parser (body).                                                *//*                                                                         *//*  Copyright 1996-2001, 2002 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.                                        *//*                                                                         *//***************************************************************************/  /*************************************************************************/  /*                                                                       */  /* The Type 1 parser is in charge of the following:                      */  /*                                                                       */  /*  - provide an implementation of a growing sequence of objects called  */  /*    a `T1_Table' (used to build various tables needed by the loader).  */  /*                                                                       */  /*  - opening .pfb and .pfa files to extract their top-level and private */  /*    dictionaries.                                                      */  /*                                                                       */  /*  - read numbers, arrays & strings from any dictionary.                */  /*                                                                       */  /* See `t1load.c' to see how data is loaded from the font file.          */  /*                                                                       */  /*************************************************************************/#include <ft2build.h>#include FT_INTERNAL_DEBUG_H#include FT_INTERNAL_CALC_H#include FT_INTERNAL_STREAM_H#include FT_INTERNAL_POSTSCRIPT_AUX_H#include "t1parse.h"#include "t1errors.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_t1parse  /*************************************************************************/  /*************************************************************************/  /*************************************************************************/  /*****                                                               *****/  /*****                   INPUT STREAM PARSER                         *****/  /*****                                                               *****/  /*************************************************************************/  /*************************************************************************/  /*************************************************************************/#define IS_T1_WHITESPACE( c )  ( (c) == ' '  || (c) == '\t' )#define IS_T1_LINESPACE( c )   ( (c) == '\r' || (c) == '\n' )#define IS_T1_SPACE( c )  ( IS_T1_WHITESPACE( c ) || IS_T1_LINESPACE( c ) )  typedef struct  PFB_Tag_  {    FT_UShort  tag;    FT_Long    size;  } PFB_Tag;#undef  FT_STRUCTURE#define FT_STRUCTURE  PFB_Tag  static  const FT_Frame_Field  pfb_tag_fields[] =  {    FT_FRAME_START( 6 ),      FT_FRAME_USHORT ( tag ),      FT_FRAME_LONG_LE( size ),    FT_FRAME_END  };  static FT_Error  read_pfb_tag( FT_Stream   stream,                FT_UShort*  tag,                FT_Long*    size )  {    FT_Error  error;    PFB_Tag   head;    *tag  = 0;    *size = 0;    if ( !FT_STREAM_READ_FIELDS( pfb_tag_fields, &head ) )    {      if ( head.tag == 0x8001U || head.tag == 0x8002U )      {        *tag  = head.tag;        *size = head.size;      }    }    return error;  }  FT_LOCAL_DEF( FT_Error )  T1_New_Parser( T1_Parser      parser,                 FT_Stream      stream,                 FT_Memory      memory,                 PSAux_Service  psaux )  {    FT_Error   error;    FT_UShort  tag;    FT_Long    size;    psaux->ps_parser_funcs->init( &parser->root,0, 0, memory );    parser->stream       = stream;    parser->base_len     = 0;    parser->base_dict    = 0;    parser->private_len  = 0;    parser->private_dict = 0;    parser->in_pfb       = 0;    parser->in_memory    = 0;    parser->single_block = 0;    /******************************************************************/    /*                                                                */    /* Here a short summary of what is going on:                      */    /*                                                                */    /*   When creating a new Type 1 parser, we try to locate and load */    /*   the base dictionary if this is possible (i.e. for PFB        */    /*   files).  Otherwise, we load the whole font into memory.      */    /*                                                                */    /*   When `loading' the base dictionary, we only setup pointers   */    /*   in the case of a memory-based stream.  Otherwise, we         */    /*   allocate and load the base dictionary in it.                 */    /*                                                                */    /*   parser->in_pfb is set if we are in a binary (".pfb") font.   */    /*   parser->in_memory is set if we have a memory stream.         */    /*                                                                */    /* try to compute the size of the base dictionary;   */    /* look for a Postscript binary file tag, i.e 0x8001 */    if ( FT_STREAM_SEEK( 0L ) )      goto Exit;    error = read_pfb_tag( stream, &tag, &size );    if ( error )      goto Exit;    if ( tag != 0x8001U )    {      /* assume that this is a PFA file for now; an error will */      /* be produced later when more things are checked        */      if ( FT_STREAM_SEEK( 0L ) )        goto Exit;      size = stream->size;    }    else      parser->in_pfb = 1;    /* now, try to load `size' bytes of the `base' dictionary we */    /* found previously                                          */    /* if it is a memory-based resource, set up pointers */    if ( !stream->read )    {      parser->base_dict = (FT_Byte*)stream->base + stream->pos;      parser->base_len  = size;      parser->in_memory = 1;      /* check that the `size' field is valid */      if ( FT_STREAM_SKIP( size ) )        goto Exit;    }    else    {      /* read segment in memory */      if ( FT_ALLOC( parser->base_dict, size )     ||           FT_STREAM_READ( parser->base_dict, size ) )        goto Exit;      parser->base_len = size;    }    /* Now check font format; we must see `%!PS-AdobeFont-1' */    /* or `%!FontType'                                       */    {      if ( size <= 16                                       ||           ( ft_strncmp( (const char*)parser->base_dict,                         "%!PS-AdobeFont-1", 16 )        &&             ft_strncmp( (const char*)parser->base_dict,                         "%!FontType", 10 )              )  )      {        FT_TRACE2(( "[not a Type1 font]\n" ));        error = T1_Err_Unknown_File_Format;      }      else      {        parser->root.base   = parser->base_dict;        parser->root.cursor = parser->base_dict;        parser->root.limit  = parser->root.cursor + parser->base_len;      }    }  Exit:    if ( error && !parser->in_memory )      FT_FREE( parser->base_dict );    return error;  }  FT_LOCAL_DEF( void )  T1_Finalize_Parser( T1_Parser  parser )  {    FT_Memory  memory = parser->root.memory;    /* always free the private dictionary */    FT_FREE( parser->private_dict );    /* free the base dictionary only when we have a disk stream */    if ( !parser->in_memory )      FT_FREE( parser->base_dict );    parser->root.funcs.done( &parser->root );  }  /* return the value of an hexadecimal digit */  static int  hexa_value( char  c )  {    unsigned int  d;    d = (unsigned int)( c - '0' );    if ( d <= 9 )      return (int)d;    d = (unsigned int)( c - 'a' );    if ( d <= 5 )      return (int)( d + 10 );    d = (unsigned int)( c - 'A' );    if ( d <= 5 )      return (int)( d + 10 );    return -1;  }  FT_LOCAL_DEF( FT_Error )  T1_Get_Private_Dict( T1_Parser      parser,                       PSAux_Service  psaux )  {    FT_Stream  stream = parser->stream;    FT_Memory  memory = parser->root.memory;    FT_Error   error  = 0;    FT_Long    size;    if ( parser->in_pfb )    {      /* in the case of the PFB format, the private dictionary can be  */      /* made of several segments.  We thus first read the number of   */      /* segments to compute the total size of the private dictionary  */      /* then re-read them into memory.                                */      FT_Long    start_pos = FT_STREAM_POS();      FT_UShort  tag;      parser->private_len = 0;      for (;;)      {        error = read_pfb_tag( stream, &tag, &size );        if ( error )          goto Fail;        if ( tag != 0x8002U )          break;        parser->private_len += size;        if ( FT_STREAM_SKIP( size ) )          goto Fail;      }      /* Check that we have a private dictionary there */      /* and allocate private dictionary buffer        */      if ( parser->private_len == 0 )      {        FT_ERROR(( "T1_Get_Private_Dict:" ));        FT_ERROR(( " invalid private dictionary section\n" ));        error = T1_Err_Invalid_File_Format;        goto Fail;      }      if ( FT_STREAM_SEEK( start_pos )                             ||           FT_ALLOC( parser->private_dict, parser->private_len ) )        goto Fail;      parser->private_len = 0;      for (;;)      {        error = read_pfb_tag( stream, &tag, &size );        if ( error || tag != 0x8002U )        {          error = T1_Err_Ok;          break;        }        if ( FT_STREAM_READ( parser->private_dict + parser->private_len, size ) )          goto Fail;        parser->private_len += size;      }    }    else    {      /* we have already `loaded' the whole PFA font file into memory; */      /* if this is a memory resource, allocate a new block to hold    */      /* the private dict. Otherwise, simply overwrite into the base   */      /* dictionary block in the heap.                                 */      /* first of all, look at the `eexec' keyword */      FT_Byte*  cur   = parser->base_dict;      FT_Byte*  limit = cur + parser->base_len;      FT_Byte   c;      for (;;)      {        c = cur[0];        if ( c == 'e' && cur + 9 < limit )  /* 9 = 5 letters for `eexec' + */                                            /* newline + 4 chars           */        {          if ( cur[1] == 'e' && cur[2] == 'x' &&               cur[3] == 'e' && cur[4] == 'c' )          {            cur += 6; /* we skip the newling after the `eexec' */            /* XXX: Some fonts use DOS-linefeeds, i.e. \r\n; we need to */            /*      skip the extra \n if we find it                     */            if ( cur[0] == '\n' )              cur++;            break;          }        }        cur++;        if ( cur >= limit )        {          FT_ERROR(( "T1_Get_Private_Dict:" ));          FT_ERROR(( " could not find `eexec' keyword\n" ));          error = T1_Err_Invalid_File_Format;          goto Exit;        }      }      /* now determine where to write the _encrypted_ binary private  */      /* dictionary.  We overwrite the base dictionary for disk-based */      /* resources and allocate a new block otherwise                 */      size = (FT_Long)( parser->base_len - ( cur - parser->base_dict ) );      if ( parser->in_memory )      {        /* note that we allocate one more byte to put a terminating `0' */        if ( FT_ALLOC( parser->private_dict, size + 1 ) )          goto Fail;        parser->private_len = size;      }      else      {        parser->single_block = 1;        parser->private_dict = parser->base_dict;        parser->private_len  = size;        parser->base_dict    = 0;        parser->base_len     = 0;      }      /* now determine whether the private dictionary is encoded in binary */      /* or hexadecimal ASCII format -- decode it accordingly              */      /* we need to access the next 4 bytes (after the final \r following */      /* the `eexec' keyword); if they all are hexadecimal digits, then   */      /* we have a case of ASCII storage                                  */      if ( ( hexa_value( cur[0] ) | hexa_value( cur[1] ) |             hexa_value( cur[2] ) | hexa_value( cur[3] ) ) < 0 )        /* binary encoding -- `simply' copy the private dict */        FT_MEM_COPY( parser->private_dict, cur, size );      else      {        /* ASCII hexadecimal encoding */        FT_Byte*  write;        FT_Int    count;        write = parser->private_dict;        count = 0;        for ( ;cur < limit; cur++ )        {          int  hex1;          /* check for newline */          if ( cur[0] == '\r' || cur[0] == '\n' )            continue;          /* exit if we have a non-hexadecimal digit that isn't a newline */          hex1 = hexa_value( cur[0] );          if ( hex1 < 0 || cur + 1 >= limit )            break;          /* otherwise, store byte */          *write++ = (FT_Byte)( ( hex1 << 4 ) | hexa_value( cur[1] ) );          count++;          cur++;        }        /* put a safeguard */        parser->private_len = (FT_Int)( write - parser->private_dict );        *write++ = 0;      }    }    /* we now decrypt the encoded binary private dictionary */    psaux->t1_decrypt( parser->private_dict, parser->private_len, 55665U );    parser->root.base   = parser->private_dict;    parser->root.cursor = parser->private_dict;    parser->root.limit  = parser->root.cursor + parser->private_len;  Fail:  Exit:    return error;  }/* END */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合在线观看视频| 午夜影院久久久| 韩日欧美一区二区三区| 日韩欧美一区中文| 秋霞国产午夜精品免费视频| 欧美日韩卡一卡二| 日韩经典一区二区| 在线不卡中文字幕| 午夜精品一区二区三区免费视频| 欧洲色大大久久| 午夜精品在线视频一区| 欧美精品123区| 亚洲自拍偷拍九九九| 欧美色中文字幕| 亚洲成av人片在www色猫咪| 欧美在线影院一区二区| 亚洲欧美日韩国产成人精品影院| 91免费看片在线观看| 国产精品成人免费精品自在线观看| 成人激情小说网站| 国产精品每日更新| 91免费看片在线观看| 亚洲一区二区三区在线| 欧美一级免费大片| 亚洲777理论| 欧美va天堂va视频va在线| 国产毛片精品视频| 亚洲欧洲日产国码二区| 99re热这里只有精品免费视频| 中文字幕一区视频| 欧美视频在线观看一区二区| 视频一区二区三区入口| 91精品一区二区三区久久久久久 | 欧美国产日韩一二三区| 国产成人综合视频| 亚洲欧美一区二区三区孕妇| 3d动漫精品啪啪1区2区免费 | 中文字幕精品—区二区四季| 色系网站成人免费| 日韩**一区毛片| 国产精品网曝门| 在线精品视频免费观看| 久久99国产精品免费| 国产欧美日韩激情| 欧美日韩午夜在线视频| 国产伦精一区二区三区| 亚洲激情图片qvod| 欧美图片一区二区三区| 国内久久精品视频| 一区二区激情视频| 欧美精品一区二区在线观看| 从欧美一区二区三区| 亚洲高清不卡在线观看| 国产日韩av一区| 91超碰这里只有精品国产| 亚洲国产日韩一区二区| 国产欧美日产一区| 51午夜精品国产| www.日韩在线| 3atv在线一区二区三区| 在线精品观看国产| 国产在线精品一区二区| 亚洲中国最大av网站| 欧美一区二区免费观在线| 99精品欧美一区二区三区小说| 麻豆精品一区二区三区| 一区二区日韩av| 国产精品久久看| 久久久久久夜精品精品免费| 在线成人午夜影院| 免费成人av在线| 亚洲一二三区不卡| 亚洲欧美日韩电影| 久久精品欧美一区二区三区不卡 | 国产精品护士白丝一区av| 国产亚洲婷婷免费| 国产精品久久三区| 亚洲欧美偷拍三级| 亚洲综合在线电影| 首页国产欧美久久| 免费成人美女在线观看| 久久电影国产免费久久电影| 久久超碰97中文字幕| 国产一区在线视频| 粉嫩蜜臀av国产精品网站| 成人av在线电影| 91热门视频在线观看| 欧美午夜精品一区二区蜜桃| 91久久精品网| 在线播放91灌醉迷j高跟美女| 日韩一区二区三区四区五区六区 | 国产一区二区精品久久99| 国产精品一区在线观看乱码| 成人激情电影免费在线观看| 99精品视频在线观看| 欧美中文字幕一区| 日韩美女天天操| 国产欧美日韩视频在线观看| 亚洲欧美另类在线| 午夜精品视频一区| 国产精品一区二区无线| 色一情一伦一子一伦一区| 欧美日韩精品一区视频| 久久这里只有精品视频网| 中文天堂在线一区| 亚洲成人激情综合网| 精品一二线国产| 色综合天天综合在线视频| 欧美一区二区视频在线观看2022| 久久综合国产精品| 亚洲最新视频在线播放| 国产毛片精品国产一区二区三区| 91麻豆高清视频| 日韩欧美卡一卡二| 亚洲欧美日韩在线| 久草在线在线精品观看| 99在线热播精品免费| 日韩一区二区免费电影| 亚洲丝袜美腿综合| 精品在线你懂的| 欧美色窝79yyyycom| 国产女同互慰高潮91漫画| 亚洲午夜日本在线观看| 国产精品香蕉一区二区三区| 欧美色图片你懂的| 国产精品视频你懂的| 亚洲va欧美va人人爽| 成人永久免费视频| 欧美一级免费观看| 亚洲人精品午夜| 国产精品一区一区| 337p亚洲精品色噜噜| 一区二区三区四区蜜桃 | 成人免费在线观看入口| 久久精品国产99久久6| 色婷婷亚洲一区二区三区| 国产亚洲精品aa午夜观看| 五月天欧美精品| 91久久久免费一区二区| 国产精品情趣视频| 狠狠色狠狠色综合系列| 欧美日韩一区二区三区在线| 国产精品毛片久久久久久| 精品中文av资源站在线观看| 欧美丰满美乳xxx高潮www| 亚洲精品国产精华液| k8久久久一区二区三区| 久久久国产精华| 精品无码三级在线观看视频| 51精品久久久久久久蜜臀| 性欧美疯狂xxxxbbbb| 一本色道久久综合精品竹菊| 中文字幕制服丝袜成人av| 国产成人免费xxxxxxxx| 久久精品亚洲乱码伦伦中文| 狠狠色丁香久久婷婷综| 精品国产自在久精品国产| 日本美女一区二区三区| 91精品婷婷国产综合久久性色 | 卡一卡二国产精品| 日韩一区二区三区视频在线观看 | 亚洲色图色小说| 波多野结衣精品在线| 国产精品色哟哟| 国产盗摄视频一区二区三区| 日韩欧美的一区| 久久精品国产99国产精品| 精品捆绑美女sm三区| 国产一区二区精品久久99| 久久先锋影音av鲁色资源| 国产在线麻豆精品观看| 欧美精品一区二区三| 国产精品1区二区.| 国产福利一区二区三区视频| 精品一区二区在线观看| 中文字幕视频一区| 一区二区激情小说| 欧美色大人视频| 视频一区二区不卡| 精品国产一区久久| 国产美女视频一区| 中文字幕一区二区三区色视频| 99久久久免费精品国产一区二区| 亚洲蜜桃精久久久久久久| 欧美伊人久久大香线蕉综合69| 亚洲.国产.中文慕字在线| 欧美一区永久视频免费观看| 国产在线观看免费一区| 日本一二三四高清不卡| 欧美性做爰猛烈叫床潮| 精品一区二区三区蜜桃| 中日韩免费视频中文字幕| 欧美性猛片aaaaaaa做受| 日本va欧美va精品| 中文字幕不卡在线播放| 欧美精品丝袜久久久中文字幕| 久久99日本精品| 亚洲欧美日本在线| 欧美变态口味重另类| 96av麻豆蜜桃一区二区|