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

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

?? ftxsbit.c

?? 字體縮放顯示
?? C
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************* * *  ftxsbit.c * *    Embedded bitmap API extension * *  Copyright 1996-2001 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. * * *  This extension is used to load the embedded bitmaps present *  in certain TrueType files. * ******************************************************************/#include "ftxsbit.h"#include "ttobjs.h"#include "ttfile.h"#include "ttload.h"#include "ttmemory.h"#include "tttags.h"#include "ttextend.h"#include "ttdebug.h"#define SBIT_ID  Build_Extension_ID( 's', 'b', 'i', 't' )/* Required by the tracing mode */#undef  TT_COMPONENT#define TT_COMPONENT  trace_bitmap/* In all functions, the stream is taken from the 'face' object */#define DEFINE_LOCALS           DEFINE_LOAD_LOCALS( face->stream )#define DEFINE_LOCALS_WO_FRAME  DEFINE_LOAD_LOCALS_WO_FRAME( face->stream )/*************************** * * miscellaneous functions * ***************************//******************************************************************* * *  Function:  Load_BitmapData * *  Bit-aligned bitmap data -> Byte-aligned bitmap data when pad is 0 * ******************************************************************/  static TT_Error  Load_BitmapData( TT_SBit_Image*  image,                   Int             image_size,                   Byte            x_offset,                   Byte            y_offset,                   UShort          source_width,                   UShort          source_height,                   Bool            byte_padded,                   PFace           face )  {    DEFINE_LOCALS;    Int     count;   /* number of bits left in rows              */    Int     loaded;  /* number of bits loaded in the accumulator */    UShort  buff;    /* accumulator                              */    PByte   line;     /* target write cursor */    PByte   limit;    if ( ( y_offset + source_height > image->map.rows ) ||         ( x_offset + source_width > image->map.width ) )      return TT_Err_Invalid_Argument;    if ( ACCESS_Frame( image_size ) )      return error;    buff   = 0;    loaded = 0;    line   = (PByte)image->map.bitmap +               y_offset * image->map.cols;    limit  = (PByte)image->map.bitmap +               ( y_offset + source_height ) * image->map.cols;    for ( ; line < limit; line += image->map.cols )    {      PByte  ptr;      ptr   = line + x_offset / 8;      count = source_width;      /* We may assume that `loaded' is less than 8 */      buff  >>= x_offset % 8;      loaded += x_offset % 8;      /* first of all, read all consecutive bytes */      while ( count >= 8 )      {        if ( loaded < 8 )        {          buff   |= ((UShort)GET_Byte()) << (8 - loaded);          loaded += 8;        }        *ptr++ |= (Byte)(buff >> 8);        buff  <<= 8;        loaded -= 8;        count  -= 8;      }      /* now write remaining bits (i.e. end of line with count < 8) */      if ( count > 0 )      {        if ( loaded < count )        {          buff   |= ((UShort)GET_Byte()) << (8 - loaded);          loaded += 8;        }        *ptr   |= ((Byte)(buff >> 8)) & ~(0xFF >> count);        buff  <<= count;        loaded -= count;      }      if ( byte_padded )      {        buff   = 0;        loaded = 0;      }    }    FORGET_Frame();    return TT_Err_Ok;  }/******************************************************************* * *  Function:  Crop_Bitmap * ******************************************************************/  static void  Crop_Bitmap( TT_SBit_Image*  image )  {    /*******************************************************/    /* In the following situation, some bounding boxes of  */    /* embedded bitmaps are too large.  We need to crop it */    /* to a reasonable size.                               */    /*                                                     */    /*      ---------                                      */    /*      |       |                -----                 */    /*      |  ***  |                |***|                 */    /*      |   *   |    ----->      | * |                 */    /*      |   *   |                | * |                 */    /*      |   *   |                | * |                 */    /*      |   *   |                | * |                 */    /*      |  ***  |                |***|                 */    /*      ---------                -----                 */    /*                                                     */    /*******************************************************/    Int    rows, count;    Long   line_len;    PByte  line;    /********************************************************************/    /*                                                                  */    /* first of all, check the top-most lines of the bitmap and remove  */    /* them if they're empty.                                           */    /*                                                                  */    {      line     = (PByte)image->map.bitmap;      rows     = image->map.rows;      line_len = image->map.cols;      for ( count = 0; count < rows; count++ )      {        PByte  cur   = line;        PByte  limit = line + line_len;        for ( ; cur < limit; cur++ )          if ( cur[0] )            goto Found_Top;        /* the current line was empty -- skip to next one */        line = limit;      }    Found_Top:      /* check that we have at least one filled line */      if ( count >= rows )        goto Empty_Bitmap;      /* now, crop the empty upper lines */      if ( count > 0 )      {        line = (PByte)image->map.bitmap;        MEM_Move( line, line + count*line_len, (rows-count) * line_len );        image->metrics.bbox.yMax    -= count;        image->metrics.vertBearingY -= count;        image->metrics.horiBearingY -= count;        image->map.rows             -= count;        rows                        -= count;      }    }    /*******************************************************************/    /*                                                                 */    /* second, crop the lower lines                                    */    /*                                                                 */    {      line = (PByte)image->map.bitmap + (rows-1) * line_len;      for ( count = 0; count < rows; count++ )      {        PByte  cur   = line;        PByte  limit = line + line_len;        for ( ; cur < limit; cur++ )          if ( cur[0] )            goto Found_Bottom;        /* the current line was empty -- skip to previous one */        line -= line_len;      }    Found_Bottom:      if ( count > 0 )      {        image->metrics.bbox.yMin += count;        image->map.rows          -= count;        rows                     -= count;      }    }    /*******************************************************************/    /*                                                                 */    /* third, get rid of the space on the left side of the glyph       */    /*                                                                 */    do    {      PByte  limit;      line  = (PByte)image->map.bitmap;      limit = line + rows * line_len;      for ( ; line < limit; line += line_len )        if ( line[0] & 0x80 )          goto Found_Left;      /* shift the whole glyph one pixel to the left */      line  = (PByte)image->map.bitmap;      limit = line + rows * line_len;      for ( ; line < limit; line += line_len )      {        Int    n, width = image->map.width;        Byte   old;        PByte  cur = line;        old = cur[0] << 1;        for ( n = 8; n < width; n += 8 )        {          Byte  val;          val    = cur[1];          cur[0] = old | (val >> 7);          old    = val << 1;          cur++;        }        cur[0] = old;      }      image->map.width--;      image->metrics.horiBearingX++;      image->metrics.vertBearingX++;      image->metrics.bbox.xMin++;    } while ( image->map.width > 0 );  Found_Left:    /*********************************************************************/    /*                                                                   */    /* finally, crop the bitmap width to get rid of the space on the     */    /* right side of the glyph.                                          */    /*                                                                   */    do    {      Int    right = image->map.width-1;      PByte  limit;      Byte   mask;      line  = (PByte)image->map.bitmap + (right >> 3);      limit = line + rows*line_len;      mask  = 0x80 >> (right & 7);      for ( ; line < limit; line += line_len )        if ( line[0] & mask )          goto Found_Right;      /* crop the whole glyph on the right */      image->map.width--;      image->metrics.bbox.xMax--;    } while ( image->map.width > 0 );  Found_Right:    /* all right, the bitmap was cropped */    return;  Empty_Bitmap:    image->map.width = 0;    image->map.rows  = 0;    image->map.cols  = 0;    image->map.size  = 0;  }/************* * * Main body * *************/  static TT_Error  Load_Range_Codes( TT_SBit_Range*  range,                    PFace           face,                    Bool            load_offsets )  {    DEFINE_LOCALS;    ULong  count, n, size;    (void)face;    /* read glyph count */    if ( ACCESS_Frame( 4L ) )      goto Exit;    count = GET_ULong();    FORGET_Frame();    range->num_glyphs = count;    /* Allocate glyph offsets table if needed */    if ( load_offsets )    {      if ( ALLOC_ARRAY( range->glyph_offsets, count, ULong ) )        goto Exit;      size = count * 4L;    }    else      size = count * 2L;    /* Allocate glyph codes table and access frame */    if ( ALLOC_ARRAY ( range->glyph_codes, count, UShort ) ||         ACCESS_Frame( size )                              )      goto Exit;    for ( n = 0; n < count; n++ )    {      range->glyph_codes[n] = GET_UShort();      if ( load_offsets )        range->glyph_offsets[n] = (ULong)range->image_offset + GET_UShort();    }    FORGET_Frame();  Exit:    return error;  }  static TT_Error  Load_SBit_Range( TT_SBit_Strike*  strike,                   TT_SBit_Range*   range,                   PFace            face )  {    DEFINE_LOCALS;    UShort  format;    (void)face;    (void)strike;    format = range->index_format;    PTRACE6(( "Index Format: %d\n", format ));    switch( format )    {    case 1:   /* variable metrics with 4-byte offsets */    case 3:   /* variable metrics with 2-byte offsets */      {        UShort  num_glyphs, size_elem;        Bool    large = (format == 1);        ULong*  cur;        num_glyphs = range->last_glyph - range->first_glyph + 1;        PTRACE5(( "  num glyphs: %hu\n", num_glyphs ));        range->num_glyphs = num_glyphs;        num_glyphs++;  /* BEWARE */        size_elem = large ? 4 : 2;        if ( ALLOC_ARRAY( range->glyph_offsets, num_glyphs, ULong ) ||             ACCESS_Frame( num_glyphs * size_elem )                 )          return error;        cur = range->glyph_offsets;        while ( num_glyphs > 0 )        {          cur[0] = (TT_ULong)( range->image_offset +                               (large ? GET_ULong() : GET_UShort()) );          PTRACE7(( "  offset: %d\n", cur[0] ));          cur++;          num_glyphs--;        }        FORGET_Frame();      }      break;    case 2:   /* all glyphs have identical metrics */    case 4:    case 5:      {        error = 0;        if ( format != 4 )  /* read constant metrics, formats 2 and 5 */        {          TT_SBit_Metrics*  metrics;          if ( ACCESS_Frame( 12L ) )            return error;          range->image_size = GET_ULong();          metrics           = &range->metrics;          metrics->height = GET_Byte();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美高清视频一二三区 | 亚洲视频图片小说| 午夜精品久久久久久久蜜桃app | 日韩欧美国产系列| 一区二区三区精品| 成人精品gif动图一区| 欧美一区二区私人影院日本| 中文字幕在线不卡一区 | 99久久久免费精品国产一区二区| 日韩欧美区一区二| 婷婷综合另类小说色区| av在线这里只有精品| 久久久综合视频| 男人的天堂亚洲一区| 在线观看视频一区二区欧美日韩 | 欧美一区二区三区啪啪| 亚洲一区二区三区精品在线| 97精品国产97久久久久久久久久久久| 日韩精品一区在线| 日韩精品免费视频人成| 日本道色综合久久| 亚洲日穴在线视频| 97se亚洲国产综合自在线| 亚洲国产精品黑人久久久| 国产一区二区毛片| 精品毛片乱码1区2区3区| 美女国产一区二区三区| 欧美一区二区三区四区视频| 亚洲精品日韩综合观看成人91| 99久久综合99久久综合网站| 亚洲国产高清在线观看视频| 粉嫩绯色av一区二区在线观看| 久久精品一区二区三区不卡牛牛| 久久精品国内一区二区三区| 精品美女一区二区| 国产精品一区二区久久不卡| 国产日韩欧美综合在线| 粉嫩一区二区三区性色av| 国产精品天天看| av色综合久久天堂av综合| 一区二区中文字幕在线| 91视频.com| 午夜a成v人精品| 在线综合+亚洲+欧美中文字幕| 日本怡春院一区二区| 日韩欧美国产一区在线观看| 九色|91porny| 国产欧美一区二区精品仙草咪| 成人精品高清在线| 亚洲自拍偷拍麻豆| 欧美成人bangbros| 国产99精品国产| 亚洲黄色性网站| 91麻豆精品国产91久久久资源速度 | 国产午夜一区二区三区| 成人免费视频一区二区| 亚洲精品va在线观看| 7799精品视频| 国产v综合v亚洲欧| 亚洲国产精品嫩草影院| 欧美成人女星排名| 99国产精品久| 麻豆国产精品一区二区三区| 国产喂奶挤奶一区二区三区| 日本乱人伦aⅴ精品| 久久99精品久久只有精品| 国产精品成人免费在线| 91精品国产91热久久久做人人| 国产精品自拍av| 夜夜精品浪潮av一区二区三区| 欧美一区二区三区四区在线观看| 福利视频网站一区二区三区| 丝袜美腿亚洲一区二区图片| 中文无字幕一区二区三区| 欧美日韩成人激情| 99免费精品在线| 久久国产综合精品| 亚洲综合久久av| 中文字幕免费观看一区| 欧美精品欧美精品系列| 不卡一二三区首页| 久久成人久久鬼色| 亚洲地区一二三色| 国产精品久久久99| 久久奇米777| 欧美一区二区三区喷汁尤物| 色婷婷av一区二区三区软件| 精品一区二区三区影院在线午夜 | 国产精品网站在线| 日韩欧美精品在线| 欧美日韩国产在线观看| 99国产精品国产精品毛片| 国产精品一区二区黑丝| 日本成人在线网站| 亚洲一区二区在线免费看| 国产精品久久久久久久久图文区| 精品国产成人在线影院| 欧美一区二区三区视频| 精品视频资源站| 在线看日本不卡| 99在线热播精品免费| 国产成人午夜精品5599| 国内欧美视频一区二区| 日本成人在线视频网站| 视频在线观看91| 午夜精品在线看| 天天影视色香欲综合网老头| 亚洲一区二区精品视频| 亚洲精品视频在线看| 亚洲欧美另类久久久精品| 成人免费一区二区三区视频 | 久久亚洲私人国产精品va媚药| 欧美精品丝袜久久久中文字幕| 在线一区二区三区四区五区 | 丁香一区二区三区| 国产东北露脸精品视频| 国产精品亚洲专一区二区三区| 国产精选一区二区三区| 成人网在线播放| 成人18视频在线播放| 91猫先生在线| 欧美中文一区二区三区| 欧美日韩中字一区| 欧美一区二区精品在线| www精品美女久久久tv| 欧美精品一区二区不卡| 国产日韩精品视频一区| 国产欧美久久久精品影院| 国产精品乱码久久久久久| 亚洲日本青草视频在线怡红院| 亚洲欧美激情插| 日日夜夜精品视频免费| 老司机精品视频一区二区三区| 国产精品一区一区三区| voyeur盗摄精品| 欧美综合久久久| 日韩欧美在线影院| 国产日韩精品一区二区浪潮av| 亚洲丝袜另类动漫二区| 午夜欧美视频在线观看| 狠狠色丁香婷婷综合| 97精品电影院| 欧美一区二区视频免费观看| 久久久另类综合| 樱花草国产18久久久久| 精品综合久久久久久8888| 国产不卡在线视频| 欧美性一区二区| 亚洲精品一区在线观看| 亚洲精品视频免费看| 极品美女销魂一区二区三区免费| 懂色av一区二区在线播放| 欧美伦理影视网| 国产午夜亚洲精品不卡| 一区二区三区.www| 国产真实乱对白精彩久久| 97久久超碰国产精品| 精品久久五月天| 一个色综合网站| 国产在线视频一区二区| 欧美日韩专区在线| 国产精品天干天干在线综合| 人人精品人人爱| 91片黄在线观看| 久久婷婷国产综合国色天香| 亚洲综合自拍偷拍| 国产福利一区二区三区| 欧美日韩卡一卡二| 亚洲免费观看高清完整版在线观看熊 | 亚洲成人免费影院| www.在线欧美| 久久午夜国产精品| 三级精品在线观看| 欧美午夜电影一区| 亚洲人精品一区| 国产精品亚洲专一区二区三区| 欧美精品久久天天躁| 亚洲欧美日韩一区| 处破女av一区二区| 久久久久久久综合日本| 午夜精品久久久久影视| 欧美在线一二三| 一区二区三区四区精品在线视频 | 中文在线免费一区三区高中清不卡| 日本成人中文字幕| 欧美日韩亚洲国产综合| 亚洲美腿欧美偷拍| 色婷婷一区二区| 亚洲欧美aⅴ...| 97se狠狠狠综合亚洲狠狠| 国产精品你懂的在线| 成熟亚洲日本毛茸茸凸凹| 国产性做久久久久久| 国产精品中文字幕日韩精品 | 国产米奇在线777精品观看| 69堂成人精品免费视频| 日韩在线一区二区| 7777精品久久久大香线蕉| 日本成人在线一区| 精品av久久707|