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

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

?? ttpload.c

?? 智能設(shè)備中PDF閱讀器的源碼!用于windows mobile2003或者WM5以上
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************/
/*                                                                         */
/*  ttpload.c                                                              */
/*                                                                         */
/*    TrueType-specific tables loader (body).                              */
/*                                                                         */
/*  Copyright 1996-2001, 2002, 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_OBJECTS_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H

#include "ttpload.h"

#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
#include "ttgxvar.h"
#endif

#include "tterrors.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_ttpload


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    tt_face_load_loca                                                  */
  /*                                                                       */
  /* <Description>                                                         */
  /*    Load the locations table.                                          */
  /*                                                                       */
  /* <InOut>                                                               */
  /*    face   :: A handle to the target face object.                      */
  /*                                                                       */
  /* <Input>                                                               */
  /*    stream :: The input stream.                                        */
  /*                                                                       */
  /* <Return>                                                              */
  /*    FreeType error code.  0 means success.                             */
  /*                                                                       */
#ifdef FT_OPTIMIZE_MEMORY

  FT_LOCAL_DEF( FT_Error )
  tt_face_load_loca( TT_Face    face,
                     FT_Stream  stream )
  {
    FT_Error  error;
    FT_ULong  table_len;


    /* we need the size of the `glyf' table for malformed `loca' tables */
    error = face->goto_table( face, TTAG_glyf, stream, &face->glyf_len );
    if ( error )
      goto Exit;

    FT_TRACE2(( "Locations " ));
    error = face->goto_table( face, TTAG_loca, stream, &table_len );
    if ( error )
    {
      error = TT_Err_Locations_Missing;
      goto Exit;
    }

    if ( face->header.Index_To_Loc_Format != 0 )
    {
      if ( table_len >= 0x40000L )
      {
        FT_TRACE2(( "table too large!\n" ));
        error = TT_Err_Invalid_Table;
        goto Exit;
      }
      face->num_locations = (FT_UInt)( table_len >> 2 );
    }
    else
    {
      if ( table_len >= 0x20000L )
      {
        FT_TRACE2(( "table too large!\n" ));
        error = TT_Err_Invalid_Table;
        goto Exit;
      }
      face->num_locations = (FT_UInt)( table_len >> 1 );
    }

    /*
     * Extract the frame.  We don't need to decompress it since
     * we are able to parse it directly.
     */
    if ( FT_FRAME_EXTRACT( table_len, face->glyph_locations ) )
      goto Exit;

    FT_TRACE2(( "loaded\n" ));

  Exit:
    return error;
  }


  FT_LOCAL_DEF( FT_ULong )
  tt_face_get_location( TT_Face   face,
                        FT_UInt   gindex,
                        FT_UInt  *asize )
  {
    FT_ULong  pos1, pos2;
    FT_Byte*  p;
    FT_Byte*  p_limit;


    pos1 = pos2 = 0;

    if ( gindex < face->num_locations )
    {
      if ( face->header.Index_To_Loc_Format != 0 )
      {
        p       = face->glyph_locations + gindex * 4;
        p_limit = face->glyph_locations + face->num_locations * 4;

        pos1 = FT_NEXT_ULONG( p );
        pos2 = pos1;

        if ( p + 4 <= p_limit )
          pos2 = FT_NEXT_ULONG( p );
      }
      else
      {
        p       = face->glyph_locations + gindex * 2;
        p_limit = face->glyph_locations + face->num_locations * 2;

        pos1 = FT_NEXT_USHORT( p );
        pos2 = pos1;

        if ( p + 2 <= p_limit )
          pos2 = FT_NEXT_USHORT( p );

        pos1 <<= 1;
        pos2 <<= 1;
      }
    }

    /* It isn't mentioned explicitly that the `loca' table must be  */
    /* ordered, but implicitly it refers to the length of an entry  */
    /* as the difference between the current and the next position. */
    /* Anyway, there do exist (malformed) fonts which don't obey    */
    /* this rule, so we are only able to provide an upper bound for */
    /* the size.                                                    */
    if ( pos2 >= pos1 )
      *asize = (FT_UInt)( pos2 - pos1 );
    else
      *asize = (FT_UInt)( face->glyf_len - pos1 );

    return pos1;
  }


  FT_LOCAL_DEF( void )
  tt_face_done_loca( TT_Face  face )
  {
    FT_Stream  stream = face->root.stream;


    FT_FRAME_RELEASE( face->glyph_locations );
    face->num_locations = 0;
  }


#else /* !FT_OPTIMIZE_MEMORY */


  FT_LOCAL_DEF( FT_Error )
  tt_face_load_loca( TT_Face    face,
                     FT_Stream  stream )
  {
    FT_Error   error;
    FT_Memory  memory = stream->memory;
    FT_Short   LongOffsets;
    FT_ULong   table_len;


    /* we need the size of the `glyf' table for malformed `loca' tables */
    error = face->goto_table( face, TTAG_glyf, stream, &face->glyf_len );
    if ( error )
      goto Exit;

    FT_TRACE2(( "Locations " ));
    LongOffsets = face->header.Index_To_Loc_Format;

    error = face->goto_table( face, TTAG_loca, stream, &table_len );
    if ( error )
    {
      error = TT_Err_Locations_Missing;
      goto Exit;
    }

    if ( LongOffsets != 0 )
    {
      face->num_locations = (FT_UShort)( table_len >> 2 );

      FT_TRACE2(( "(32bit offsets): %12d ", face->num_locations ));

      if ( FT_NEW_ARRAY( face->glyph_locations, face->num_locations ) )
        goto Exit;

      if ( FT_FRAME_ENTER( face->num_locations * 4L ) )
        goto Exit;

      {
        FT_Long*  loc   = face->glyph_locations;
        FT_Long*  limit = loc + face->num_locations;


        for ( ; loc < limit; loc++ )
          *loc = FT_GET_LONG();
      }

      FT_FRAME_EXIT();
    }
    else
    {
      face->num_locations = (FT_UShort)( table_len >> 1 );

      FT_TRACE2(( "(16bit offsets): %12d ", face->num_locations ));

      if ( FT_NEW_ARRAY( face->glyph_locations, face->num_locations ) )
        goto Exit;

      if ( FT_FRAME_ENTER( face->num_locations * 2L ) )
        goto Exit;

      {
        FT_Long*  loc   = face->glyph_locations;
        FT_Long*  limit = loc + face->num_locations;


        for ( ; loc < limit; loc++ )
          *loc = (FT_Long)( (FT_ULong)FT_GET_USHORT() * 2 );
      }

      FT_FRAME_EXIT();
    }

    FT_TRACE2(( "loaded\n" ));

  Exit:
    return error;
  }


  FT_LOCAL_DEF( FT_ULong )
  tt_face_get_location( TT_Face   face,
                        FT_UInt   gindex,
                        FT_UInt  *asize )
  {
    FT_ULong  offset;
    FT_UInt   count;


    offset = face->glyph_locations[gindex];
    count  = 0;

    if ( gindex < (FT_UInt)face->num_locations - 1 )
    {
      FT_ULong  offset1 = face->glyph_locations[gindex + 1];


      /* It isn't mentioned explicitly that the `loca' table must be  */
      /* ordered, but implicitly it refers to the length of an entry  */
      /* as the difference between the current and the next position. */
      /* Anyway, there do exist (malformed) fonts which don't obey    */
      /* this rule, so we are only able to provide an upper bound for */
      /* the size.                                                    */
      if ( offset1 >= offset )
        count = (FT_UInt)( offset1 - offset );
      else
        count = (FT_UInt)( face->glyf_len - offset );
    }

    *asize = count;
    return offset;
  }


  FT_LOCAL_DEF( void )
  tt_face_done_loca( TT_Face  face )
  {
    FT_Memory  memory = face->root.memory;


    FT_FREE( face->glyph_locations );
    face->num_locations = 0;
  }


#endif /* !FT_OPTIMIZE_MEMORY */


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    tt_face_load_cvt                                                   */
  /*                                                                       */
  /* <Description>                                                         */
  /*    Load the control value table into a face object.                   */
  /*                                                                       */
  /* <InOut>                                                               */
  /*    face   :: A handle to the target face object.                      */
  /*                                                                       */
  /* <Input>                                                               */
  /*    stream :: A handle to the input stream.                            */
  /*                                                                       */
  /* <Return>                                                              */
  /*    FreeType error code.  0 means success.                             */
  /*                                                                       */
  FT_LOCAL_DEF( FT_Error )
  tt_face_load_cvt( TT_Face    face,
                    FT_Stream  stream )
  {
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER

    FT_Error   error;
    FT_Memory  memory = stream->memory;
    FT_ULong   table_len;


    FT_TRACE2(( "CVT " ));

    error = face->goto_table( face, TTAG_cvt, stream, &table_len );
    if ( error )
    {
      FT_TRACE2(( "is missing!\n" ));

      face->cvt_size = 0;
      face->cvt      = NULL;
      error          = TT_Err_Ok;

      goto Exit;
    }

    face->cvt_size = table_len / 2;

    if ( FT_NEW_ARRAY( face->cvt, face->cvt_size ) )
      goto Exit;

    if ( FT_FRAME_ENTER( face->cvt_size * 2L ) )
      goto Exit;

    {
      FT_Short*  cur   = face->cvt;
      FT_Short*  limit = cur + face->cvt_size;


      for ( ; cur <  limit; cur++ )
        *cur = FT_GET_SHORT();
    }

    FT_FRAME_EXIT();

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产综合| 北岛玲一区二区三区四区| 国产精品一级在线| 91视频免费观看| 欧美一级午夜免费电影| 国产精品欧美综合在线| 亚洲妇女屁股眼交7| 美腿丝袜亚洲一区| 不卡视频免费播放| 91精品综合久久久久久| 国产欧美一区二区精品秋霞影院| 亚洲精品菠萝久久久久久久| 奇米精品一区二区三区在线观看 | 国产精品国产三级国产| 亚洲国产综合色| 国产精品一区二区在线播放| 91久久免费观看| 久久免费美女视频| 亚洲mv在线观看| 国产精品99久久久久久久vr | 视频一区欧美精品| 成熟亚洲日本毛茸茸凸凹| 欧美日韩视频在线第一区 | 成人av免费在线观看| 欧美日韩不卡一区二区| 国产精品入口麻豆原神| 蜜臀国产一区二区三区在线播放| 99久久久久久99| 久久综合色之久久综合| 性久久久久久久久| 99久久精品免费看国产免费软件| 欧美成人女星排行榜| 亚洲一区二区三区四区中文字幕| 国产精品一区二区在线播放| 欧美日韩一区二区在线视频| 中文字幕成人在线观看| 美女视频一区在线观看| 欧美日韩一区不卡| 亚洲人成小说网站色在线| 国产在线播放一区| 五月婷婷综合在线| 色综合色综合色综合色综合色综合| 欧美成人一区二区三区| 午夜一区二区三区视频| 91视频一区二区三区| 欧美激情资源网| 免费成人在线影院| 欧美日韩不卡一区| 亚洲综合精品自拍| 91亚洲国产成人精品一区二三| 久久久国产精品麻豆| 男女性色大片免费观看一区二区 | 亚洲第一成年网| 色香蕉久久蜜桃| 亚洲欧美在线视频观看| 成人综合在线视频| 国产色爱av资源综合区| 国产在线看一区| 精品少妇一区二区三区| 日本大胆欧美人术艺术动态 | 久久av中文字幕片| 日韩亚洲电影在线| 午夜日韩在线电影| 欧美伦理影视网| 调教+趴+乳夹+国产+精品| 欧美日韩国产综合一区二区三区| 国产精品久久久久久一区二区三区 | 成人黄色电影在线| 国产日本一区二区| 国产99久久精品| 久久久美女艺术照精彩视频福利播放 | 成人激情免费视频| 国产精品女主播av| av成人免费在线| 亚洲欧美一区二区三区久本道91| 99精品久久只有精品| 亚洲精选免费视频| 欧洲日韩一区二区三区| 亚洲一区二区中文在线| 精品1区2区3区| 日韩av电影天堂| 亚洲精品一区二区精华| 国产精品1024久久| 中文字幕乱码日本亚洲一区二区 | 日韩精品一区二区三区视频| 麻豆精品国产传媒mv男同| 26uuu久久综合| 国产精品中文字幕欧美| 国产视频亚洲色图| 不卡一卡二卡三乱码免费网站| 亚洲欧洲日韩女同| 欧美在线观看18| 奇米一区二区三区| 久久精品视频网| 国产精品久久久久久久久久免费看 | 91精品国产色综合久久ai换脸| 日本不卡一二三区黄网| www欧美成人18+| 成人性生交大合| 一区二区三区91| 91精品国产综合久久精品app | 国产欧美精品一区| 日本精品免费观看高清观看| 日本不卡的三区四区五区| 久久综合九色综合97婷婷女人| 成人美女视频在线观看| 一区二区国产视频| 日韩女优av电影| 不卡的av在线| 图片区小说区国产精品视频| 欧美精品一区二区三区在线 | 亚洲国产日日夜夜| 日韩精品在线一区二区| 99久久综合国产精品| 三级成人在线视频| 国产精品乱人伦| 欧美日韩国产一级| 国产成人精品亚洲日本在线桃色| 亚洲欧美成aⅴ人在线观看| 欧美大胆一级视频| 色婷婷激情综合| 精品中文字幕一区二区小辣椒| 中文字幕五月欧美| 欧美一级午夜免费电影| av中文字幕不卡| 久久国产欧美日韩精品| 日韩毛片一二三区| 欧美电影免费观看高清完整版在线观看 | 欧美日韩黄色影视| 国产精品911| 亚洲h动漫在线| 国产精品久久久久aaaa| 91精品欧美福利在线观看| 9人人澡人人爽人人精品| 美腿丝袜一区二区三区| 一区2区3区在线看| 国产精品麻豆一区二区| 日韩亚洲欧美综合| 欧美性感一类影片在线播放| 成人一区在线看| 日本美女视频一区二区| 成人精品gif动图一区| 日本道精品一区二区三区| 日韩在线一区二区三区| 色天天综合色天天久久| 91麻豆精品国产91久久久久久| 久久婷婷国产综合精品青草| 欧美国产日韩在线观看| 亚洲综合久久久久| 国产精品1024| 日韩欧美中文一区二区| 日本一区二区三区在线不卡| 亚洲成人免费影院| 欧美日产在线观看| 午夜精品免费在线| 日韩欧美电影一二三| 91精品91久久久中77777| 国产成人av影院| 美女免费视频一区二区| 午夜日韩在线电影| 亚洲黄一区二区三区| 国产精品乱码一区二区三区软件| 日韩欧美一区电影| 欧美二区在线观看| 欧美日韩一区小说| 欧美日韩一区不卡| 欧美日韩在线综合| 欧美午夜精品理论片a级按摩| 97se亚洲国产综合自在线| 成人性生交大片免费看视频在线 | 欧美精选午夜久久久乱码6080| 91麻豆国产精品久久| 成人av网址在线| 成人免费视频播放| 国产aⅴ综合色| 国产69精品一区二区亚洲孕妇| 国产麻豆精品95视频| 国产伦精一区二区三区| 国产精品一线二线三线| 国产制服丝袜一区| 国产精品亚洲综合一区在线观看| 久国产精品韩国三级视频| 精品一区二区免费| 欧美人妖巨大在线| 6080日韩午夜伦伦午夜伦| 欧美精品aⅴ在线视频| 欧美精品自拍偷拍| 91精品国产色综合久久ai换脸| 欧美一区永久视频免费观看| 5858s免费视频成人| 欧美一级二级在线观看| 精品久久久久一区| 国产性色一区二区| 国产精品视频免费| 综合久久久久久| 亚洲精品国产精华液| 亚洲成av人片在线观看| 天堂av在线一区| 美女一区二区三区在线观看| 国产一区二区三区免费在线观看|