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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cidload.c

?? a very goog book
?? C
字號:
/***************************************************************************//*                                                                         *//*  cidload.c                                                              *//*                                                                         *//*    CID-keyed Type1 font loader (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.                                        *//*                                                                         *//***************************************************************************/#include <ft2build.h>#include FT_INTERNAL_DEBUG_H#include FT_CONFIG_CONFIG_H#include FT_MULTIPLE_MASTERS_H#include FT_INTERNAL_TYPE1_TYPES_H#include "cidload.h"#include "ciderrs.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_cidload  /* read a single offset */  FT_LOCAL_DEF( FT_Long )  cid_get_offset( FT_Byte**  start,                  FT_Byte    offsize )  {    FT_Long   result;    FT_Byte*  p = *start;    for ( result = 0; offsize > 0; offsize-- )    {      result <<= 8;      result  |= *p++;    }    *start = p;    return result;  }  FT_LOCAL_DEF( void )  cid_decrypt( FT_Byte*   buffer,               FT_Offset  length,               FT_UShort  seed )  {    while ( length > 0 )    {      FT_Byte  plain;      plain     = (FT_Byte)( *buffer ^ ( seed >> 8 ) );      seed      = (FT_UShort)( ( *buffer + seed ) * 52845U + 22719 );      *buffer++ = plain;      length--;    }  }  /*************************************************************************/  /*************************************************************************/  /*****                                                               *****/  /*****                    TYPE 1 SYMBOL PARSING                      *****/  /*****                                                               *****/  /*************************************************************************/  /*************************************************************************/  static FT_Error  cid_load_keyword( CID_Face        face,                    CID_Loader*     loader,                    const T1_Field  keyword )  {    FT_Error      error;    CID_Parser*   parser = &loader->parser;    FT_Byte*      object;    void*         dummy_object;    CID_FaceInfo  cid = &face->cid;    /* if the keyword has a dedicated callback, call it */    if ( keyword->type == T1_FIELD_TYPE_CALLBACK )    {      keyword->reader( (FT_Face)face, parser );      error = parser->root.error;      goto Exit;    }    /* we must now compute the address of our target object */    switch ( keyword->location )    {    case T1_FIELD_LOCATION_CID_INFO:      object = (FT_Byte*)cid;      break;    case T1_FIELD_LOCATION_FONT_INFO:      object = (FT_Byte*)&cid->font_info;      break;    default:      {        CID_FaceDict  dict;        if ( parser->num_dict < 0 )        {          FT_ERROR(( "cid_load_keyword: invalid use of `%s'!\n",                     keyword->ident ));          error = CID_Err_Syntax_Error;          goto Exit;        }        dict = cid->font_dicts + parser->num_dict;        switch ( keyword->location )        {        case T1_FIELD_LOCATION_PRIVATE:          object = (FT_Byte*)&dict->private_dict;          break;        default:          object = (FT_Byte*)dict;        }      }    }    dummy_object = object;    /* now, load the keyword data in the object's field(s) */    if ( keyword->type == T1_FIELD_TYPE_INTEGER_ARRAY ||         keyword->type == T1_FIELD_TYPE_FIXED_ARRAY   )      error = CID_Load_Field_Table( &loader->parser, keyword,                                    &dummy_object );    else      error = CID_Load_Field( &loader->parser, keyword, &dummy_object );  Exit:    return error;  }  FT_CALLBACK_DEF( FT_Error )  parse_font_bbox( CID_Face     face,                   CID_Parser*  parser )  {    FT_Fixed  temp[4];    FT_BBox*  bbox = &face->cid.font_bbox;    (void)CID_ToFixedArray( parser, 4, temp, 0 );    bbox->xMin = FT_RoundFix( temp[0] );    bbox->yMin = FT_RoundFix( temp[1] );    bbox->xMax = FT_RoundFix( temp[2] );    bbox->yMax = FT_RoundFix( temp[3] );    return CID_Err_Ok;       /* this is a callback function; */                            /* we must return an error code */  }  FT_CALLBACK_DEF( FT_Error )  parse_font_matrix( CID_Face     face,                     CID_Parser*  parser )  {    FT_Matrix*    matrix;    FT_Vector*    offset;    CID_FaceDict  dict;    FT_Face       root = (FT_Face)&face->root;    FT_Fixed      temp[6];    FT_Fixed      temp_scale;    if ( parser->num_dict >= 0 )    {      dict   = face->cid.font_dicts + parser->num_dict;      matrix = &dict->font_matrix;      offset = &dict->font_offset;      (void)CID_ToFixedArray( parser, 6, temp, 3 );      temp_scale = ABS( temp[3] );      /* Set Units per EM based on FontMatrix values.  We set the value to */      /* `1000/temp_scale', because temp_scale was already multiplied by   */      /* 1000 (in t1_tofixed(), from psobjs.c).                            */      root->units_per_EM = (FT_UShort)( FT_DivFix( 0x10000L,                                        FT_DivFix( temp_scale, 1000 ) ) );      /* we need to scale the values by 1.0/temp[3] */      if ( temp_scale != 0x10000L )      {        temp[0] = FT_DivFix( temp[0], temp_scale );        temp[1] = FT_DivFix( temp[1], temp_scale );        temp[2] = FT_DivFix( temp[2], temp_scale );        temp[4] = FT_DivFix( temp[4], temp_scale );        temp[5] = FT_DivFix( temp[5], temp_scale );        temp[3] = 0x10000L;      }      matrix->xx = temp[0];      matrix->yx = temp[1];      matrix->xy = temp[2];      matrix->yy = temp[3];      /* note that the font offsets are expressed in integer font units */      offset->x  = temp[4] >> 16;      offset->y  = temp[5] >> 16;    }    return CID_Err_Ok;       /* this is a callback function; */                            /* we must return an error code */  }  FT_CALLBACK_DEF( FT_Error )  parse_fd_array( CID_Face     face,                  CID_Parser*  parser )  {    CID_FaceInfo  cid    = &face->cid;    FT_Memory     memory = face->root.memory;    FT_Error      error  = CID_Err_Ok;    FT_Long       num_dicts;    num_dicts = CID_ToInt( parser );    if ( !cid->font_dicts )    {      FT_Int  n;      if ( FT_NEW_ARRAY( cid->font_dicts, num_dicts ) )        goto Exit;      cid->num_dicts = (FT_UInt)num_dicts;      /* don't forget to set a few defaults */      for ( n = 0; n < cid->num_dicts; n++ )      {        CID_FaceDict  dict = cid->font_dicts + n;        /* default value for lenIV */        dict->private_dict.lenIV = 4;      }    }  Exit:    return error;  }  static  const T1_FieldRec  cid_field_records[] =  {#include "cidtoken.h"    T1_FIELD_CALLBACK( "FontBBox", parse_font_bbox )    T1_FIELD_CALLBACK( "FDArray", parse_fd_array )    T1_FIELD_CALLBACK( "FontMatrix", parse_font_matrix )    { 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0 }  };  static int  is_alpha( char  c )  {    return ( ft_isalnum( (int)c ) ||             c == '.'             ||             c == '_'             );  }  static FT_Error  cid_parse_dict( CID_Face     face,                  CID_Loader*  loader,                  FT_Byte*     base,                  FT_Long      size )  {    CID_Parser*  parser = &loader->parser;    parser->root.cursor = base;    parser->root.limit  = base + size;    parser->root.error  = 0;    {      FT_Byte*  cur   = base;      FT_Byte*  limit = cur + size;      for ( ;cur < limit; cur++ )      {        /* look for `%ADOBeginFontDict' */        if ( *cur == '%' && cur + 20 < limit &&             ft_strncmp( (char*)cur, "%ADOBeginFontDict", 17 ) == 0 )        {          cur += 17;          /* if /FDArray was found, then cid->num_dicts is > 0, and */          /* we can start increasing parser->num_dict               */          if ( face->cid.num_dicts > 0 )            parser->num_dict++;        }        /* look for immediates */        else if ( *cur == '/' && cur + 2 < limit )        {          FT_Byte*  cur2;          FT_Int    len;          cur++;          cur2 = cur;          while ( cur2 < limit && is_alpha( *cur2 ) )            cur2++;          len = (FT_Int)( cur2 - cur );          if ( len > 0 && len < 22 )          {            /* now compare the immediate name to the keyword table */            T1_Field  keyword = (T1_Field) cid_field_records;            for (;;)            {              FT_Byte*  name;              name = (FT_Byte*)keyword->ident;              if ( !name )                break;              if ( cur[0] == name[0]                          &&                   len == (FT_Int)ft_strlen( (const char*)name ) )              {                FT_Int  n;                for ( n = 1; n < len; n++ )                  if ( cur[n] != name[n] )                    break;                if ( n >= len )                {                  /* we found it - run the parsing callback */                  parser->root.cursor = cur2;                  CID_Skip_Spaces( parser );                  parser->root.error = cid_load_keyword( face,                                                         loader,                                                         keyword );                  if ( parser->root.error )                    return parser->root.error;                  cur = parser->root.cursor;                  break;                }              }              keyword++;            }          }        }      }    }    return parser->root.error;  }  /* read the subrmap and the subrs of each font dict */  static FT_Error  cid_read_subrs( CID_Face  face )  {    CID_FaceInfo  cid    = &face->cid;    FT_Memory     memory = face->root.memory;    FT_Stream     stream = face->root.stream;    FT_Error      error;    FT_Int        n;    CID_Subrs     subr;    FT_UInt       max_offsets = 0;    FT_ULong*     offsets = 0;    if ( FT_NEW_ARRAY( face->subrs, cid->num_dicts ) )      goto Exit;    subr = face->subrs;    for ( n = 0; n < cid->num_dicts; n++, subr++ )    {      CID_FaceDict  dict  = cid->font_dicts + n;      FT_Int        lenIV = dict->private_dict.lenIV;      FT_UInt       count, num_subrs = dict->num_subrs;      FT_ULong      data_len;      FT_Byte*      p;      /* reallocate offsets array if needed */      if ( num_subrs + 1 > max_offsets )      {        FT_UInt  new_max = ( num_subrs + 1 + 3 ) & -4;        if ( FT_RENEW_ARRAY( offsets, max_offsets, new_max ) )          goto Fail;        max_offsets = new_max;      }      /* read the subrmap's offsets */      if ( FT_STREAM_SEEK( cid->data_offset + dict->subrmap_offset ) ||           FT_FRAME_ENTER( ( num_subrs + 1 ) * dict->sd_bytes )   )        goto Fail;      p = (FT_Byte*)stream->cursor;      for ( count = 0; count <= num_subrs; count++ )        offsets[count] = cid_get_offset( &p, (FT_Byte)dict->sd_bytes );      FT_FRAME_EXIT();      /* now, compute the size of subrs charstrings, */      /* allocate, and read them                     */      data_len = offsets[num_subrs] - offsets[0];      if ( FT_NEW_ARRAY( subr->code, num_subrs + 1 ) ||               FT_ALLOC( subr->code[0], data_len )   )        goto Fail;      if ( FT_STREAM_SEEK( cid->data_offset + offsets[0] ) ||           FT_STREAM_READ( subr->code[0], data_len )  )        goto Fail;      /* set up pointers */      for ( count = 1; count <= num_subrs; count++ )      {        FT_UInt  len;        len               = offsets[count] - offsets[count - 1];        subr->code[count] = subr->code[count - 1] + len;      }      /* decrypt subroutines, but only if lenIV >= 0 */      if ( lenIV >= 0 )      {        for ( count = 0; count < num_subrs; count++ )        {          FT_UInt  len;          len = offsets[count + 1] - offsets[count];          cid_decrypt( subr->code[count], len, 4330 );        }      }      subr->num_subrs = num_subrs;    }  Exit:    FT_FREE( offsets );    return error;  Fail:    if ( face->subrs )    {      for ( n = 0; n < cid->num_dicts; n++ )      {        if ( face->subrs[n].code )          FT_FREE( face->subrs[n].code[0] );        FT_FREE( face->subrs[n].code );      }      FT_FREE( face->subrs );    }    goto Exit;  }  static void  t1_init_loader( CID_Loader*  loader,                  CID_Face     face )  {    FT_UNUSED( face );    FT_MEM_SET( loader, 0, sizeof ( *loader ) );  }  static void  t1_done_loader( CID_Loader*  loader )  {    CID_Parser*  parser = &loader->parser;    /* finalize parser */    CID_Done_Parser( parser );  }  FT_LOCAL_DEF( FT_Error )  CID_Open_Face( CID_Face  face )  {    CID_Loader   loader;    CID_Parser*  parser;    FT_Error     error;    t1_init_loader( &loader, face );    parser = &loader.parser;    error = CID_New_Parser( parser, face->root.stream, face->root.memory,                            (PSAux_Service)face->psaux );    if ( error )      goto Exit;    error = cid_parse_dict( face, &loader,                            parser->postscript,                            parser->postscript_len );    if ( error )      goto Exit;    face->cid.data_offset = loader.parser.data_offset;    error = cid_read_subrs( face );  Exit:    t1_done_loader( &loader );    return error;  }/* END */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产日韩亚洲一区| 成人欧美一区二区三区小说| 粉嫩高潮美女一区二区三区| 亚洲精品免费播放| 久久奇米777| 欧美精品在欧美一区二区少妇| 成人午夜视频免费看| 日韩国产高清影视| 亚洲女同女同女同女同女同69| www日韩大片| 欧美精品一卡二卡| 色欧美88888久久久久久影院| 国产一区二区在线观看免费| 三级欧美韩日大片在线看| 亚洲欧美日本在线| 国产精品理论片| 久久综合色综合88| 日韩欧美一区二区三区在线| 欧美日韩一区二区欧美激情| 91污在线观看| 成人免费视频免费观看| 国产一区二区在线观看免费| 久久国产剧场电影| 奇米777欧美一区二区| 亚洲永久精品大片| 有码一区二区三区| 亚洲私人黄色宅男| 国产精品成人免费| 综合激情成人伊人| 一区二区中文字幕在线| 国产精品久久久久久久久免费樱桃| 欧美精品一区二区三区在线播放| 日韩一级成人av| 日韩三级中文字幕| 精品奇米国产一区二区三区| 欧美电影免费观看高清完整版在线 | 香蕉久久一区二区不卡无毒影院| 中文字幕一区二区三区不卡在线| 国产女人18毛片水真多成人如厕| 久久精品视频免费| 国产欧美一区二区精品久导航| 久久久一区二区| 欧美经典一区二区| 国产精品欧美精品| 亚洲另类一区二区| 亚洲黄色免费电影| 日日摸夜夜添夜夜添精品视频| 日韩一区精品视频| 免费在线观看不卡| 国产福利91精品| av不卡在线播放| 日本久久一区二区三区| 欧美日韩一区二区三区高清| 欧美一区二区三区喷汁尤物| 亚洲精品一线二线三线| 欧美经典一区二区| 一区二区三区四区中文字幕| 亚洲123区在线观看| 另类小说视频一区二区| 国产毛片精品视频| 97精品久久久午夜一区二区三区| 欧美性videosxxxxx| 欧美一区二区三区成人| 国产日韩欧美在线一区| 亚洲精品大片www| 日韩高清在线不卡| 国产suv一区二区三区88区| 色欧美乱欧美15图片| 欧美一区二区视频免费观看| 欧美激情一区二区三区不卡| 一区二区久久久| 日本少妇一区二区| 成人伦理片在线| 欧美三级韩国三级日本一级| 久久综合999| 亚洲免费在线电影| 国产在线麻豆精品观看| 91在线国内视频| 日韩一级片在线播放| 中文字幕一区在线观看视频| 日韩精品成人一区二区在线| 国产91精品入口| 欧美久久久久久久久| 国产精品久久久久精k8| 日韩国产欧美视频| 91亚洲大成网污www| 精品奇米国产一区二区三区| 亚洲人成人一区二区在线观看| 免费xxxx性欧美18vr| 色诱视频网站一区| 日韩精品一区二区三区在线| 亚洲视频一区二区在线观看| 精品一区二区三区免费毛片爱| 一本色道**综合亚洲精品蜜桃冫| 精品国产乱码91久久久久久网站| 一区二区三区四区乱视频| 狠狠色丁香婷婷综合| 精品视频一区三区九区| 国产精品视频麻豆| 久久99国内精品| 欧美精品aⅴ在线视频| 最新不卡av在线| 国产一区二区导航在线播放| 欧美理论片在线| 亚洲乱码国产乱码精品精98午夜 | 99久久精品免费| 精品成人一区二区| 视频一区免费在线观看| 99久久精品免费精品国产| 久久久久成人黄色影片| 麻豆精品久久精品色综合| 欧美日韩精品一区二区天天拍小说| ...xxx性欧美| 成人性生交大片免费看在线播放| 欧美videossexotv100| 偷拍日韩校园综合在线| 色国产精品一区在线观看| 国产精品二区一区二区aⅴ污介绍| 国产一区二区看久久| 精品三级av在线| 蜜桃一区二区三区在线观看| 欧美日韩国产123区| 亚洲国产成人av好男人在线观看| 99精品偷自拍| 中文字幕一区二区视频| 成人看片黄a免费看在线| 久久九九久久九九| 国产精品亚洲人在线观看| 2020国产精品自拍| 国内精品第一页| 久久午夜电影网| 国产美女主播视频一区| 久久精品一区四区| 国产毛片精品视频| 国产亲近乱来精品视频| 国产福利一区二区| 中文字幕电影一区| 成人毛片视频在线观看| 亚洲视频一区二区在线| 91激情五月电影| 亚洲va天堂va国产va久| 欧美精品久久99久久在免费线| 日产国产高清一区二区三区 | 成人欧美一区二区三区| 97国产精品videossex| 亚洲免费观看高清完整版在线观看| 一本久久综合亚洲鲁鲁五月天| 综合激情网...| 欧美日韩精品一区视频| 蜜臀av一区二区在线免费观看| www国产亚洲精品久久麻豆| 国产精品一级片| 中文字幕综合网| 欧美日韩第一区日日骚| 久久国产精品99久久久久久老狼| 精品国产乱码久久久久久免费| 国产精品一二三在| 亚洲欧美激情在线| 欧美酷刑日本凌虐凌虐| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品久久久久久久久晋中 | 日韩欧美美女一区二区三区| 狠狠久久亚洲欧美| 国产精品理伦片| 欧美精品一卡二卡| 激情伊人五月天久久综合| 中文字幕中文字幕在线一区| 欧美四级电影网| 国产乱妇无码大片在线观看| 亚洲欧美日韩国产成人精品影院 | 亚洲成人综合视频| 精品处破学生在线二十三| eeuss影院一区二区三区| 亚洲无人区一区| 久久精品这里都是精品| 欧美亚洲综合在线| 国模无码大尺度一区二区三区| 亚洲欧洲成人自拍| 日韩一区二区三区四区| 91亚洲国产成人精品一区二区三 | 欧洲国产伦久久久久久久| 久久精品国产精品亚洲综合| 成人免费在线观看入口| 69久久99精品久久久久婷婷| 粉嫩久久99精品久久久久久夜 | av成人老司机| 久久99国产乱子伦精品免费| 亚洲综合成人在线| 久久久久久免费| 欧洲亚洲精品在线| 国产很黄免费观看久久| 亚洲成人免费av| 综合激情成人伊人| 久久嫩草精品久久久精品| 欧美性色aⅴ视频一区日韩精品| 国产iv一区二区三区| 日韩高清电影一区| 亚洲综合自拍偷拍| 欧美激情一区二区三区不卡 | 欧美日韩精品一区二区三区四区|