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

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

?? pshalgo2.c

?? a very goog book
?? C
?? 第 1 頁 / 共 3 頁
字號:
/***************************************************************************//*                                                                         *//*  pshalgo2.c                                                             *//*                                                                         *//*    PostScript hinting algorithm 2 (body).                               *//*                                                                         *//*  Copyright 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_OBJECTS_H#include FT_INTERNAL_DEBUG_H#include "pshalgo2.h"#undef  FT_COMPONENT#define FT_COMPONENT  trace_pshalgo2#ifdef DEBUG_HINTER  extern PSH2_Hint_Table  ps2_debug_hint_table = 0;  extern PSH2_HintFunc    ps2_debug_hint_func  = 0;  extern PSH2_Glyph       ps2_debug_glyph      = 0;#endif  /*************************************************************************/  /*************************************************************************/  /*****                                                               *****/  /*****                  BASIC HINTS RECORDINGS                       *****/  /*****                                                               *****/  /*************************************************************************/  /*************************************************************************/  /* return true iff two stem hints overlap */  static FT_Int  psh2_hint_overlap( PSH2_Hint  hint1,                     PSH2_Hint  hint2 )  {    return ( hint1->org_pos + hint1->org_len >= hint2->org_pos &&             hint2->org_pos + hint2->org_len >= hint1->org_pos );  }  /* destroy hints table */  static void  psh2_hint_table_done( PSH2_Hint_Table  table,                        FT_Memory        memory )  {    FT_FREE( table->zones );    table->num_zones = 0;    table->zone      = 0;    FT_FREE( table->sort );    FT_FREE( table->hints );    table->num_hints   = 0;    table->max_hints   = 0;    table->sort_global = 0;  }  /* deactivate all hints in a table */  static void  psh2_hint_table_deactivate( PSH2_Hint_Table  table )  {    FT_UInt   count = table->max_hints;    PSH2_Hint  hint  = table->hints;    for ( ; count > 0; count--, hint++ )    {      psh2_hint_deactivate( hint );      hint->order = -1;    }  }  /* internal function used to record a new hint */  static void  psh2_hint_table_record( PSH2_Hint_Table  table,                          FT_UInt          idx )  {    PSH2_Hint  hint = table->hints + idx;    if ( idx >= table->max_hints )    {      FT_ERROR(( "%s.activate: invalid hint index %d\n", idx ));      return;    }    /* ignore active hints */    if ( psh2_hint_is_active( hint ) )      return;    psh2_hint_activate( hint );    /* now scan the current active hint set in order to determine */    /* if we are overlapping with another segment                 */    {      PSH2_Hint*  sorted = table->sort_global;      FT_UInt     count  = table->num_hints;      PSH2_Hint   hint2;      hint->parent = 0;      for ( ; count > 0; count--, sorted++ )      {        hint2 = sorted[0];        if ( psh2_hint_overlap( hint, hint2 ) )        {          hint->parent = hint2;          break;        }      }    }    if ( table->num_hints < table->max_hints )      table->sort_global[table->num_hints++] = hint;    else      FT_ERROR(( "%s.activate: too many sorted hints!  BUG!\n",                 "ps.fitter" ));  }  static void  psh2_hint_table_record_mask( PSH2_Hint_Table  table,                               PS_Mask          hint_mask )  {    FT_Int    mask = 0, val = 0;    FT_Byte*  cursor = hint_mask->bytes;    FT_UInt   idx, limit;    limit = hint_mask->num_bits;    for ( idx = 0; idx < limit; idx++ )    {      if ( mask == 0 )      {        val  = *cursor++;        mask = 0x80;      }      if ( val & mask )        psh2_hint_table_record( table, idx );      mask >>= 1;    }  }  /* create hints table */  static FT_Error  psh2_hint_table_init( PSH2_Hint_Table  table,                        PS_Hint_Table    hints,                        PS_Mask_Table    hint_masks,                        PS_Mask_Table    counter_masks,                        FT_Memory        memory )  {    FT_UInt   count = hints->num_hints;    FT_Error  error;    FT_UNUSED( counter_masks );    /* allocate our tables */    if ( FT_NEW_ARRAY( table->sort,  2 * count     ) ||         FT_NEW_ARRAY( table->hints,     count     ) ||         FT_NEW_ARRAY( table->zones, 2 * count + 1 ) )      goto Exit;    table->max_hints   = count;    table->sort_global = table->sort + count;    table->num_hints   = 0;    table->num_zones   = 0;    table->zone        = 0;    /* now, initialize the "hints" array */    {      PSH2_Hint  write = table->hints;      PS_Hint    read  = hints->hints;      for ( ; count > 0; count--, write++, read++ )      {        write->org_pos = read->pos;        write->org_len = read->len;        write->flags   = read->flags;      }    }    /* we now need to determine the initial "parent" stems; first  */    /* activate the hints that are given by the initial hint masks */    if ( hint_masks )    {      FT_UInt  Count = hint_masks->num_masks;      PS_Mask  Mask  = hint_masks->masks;      table->hint_masks = hint_masks;      for ( ; Count > 0; Count--, Mask++ )        psh2_hint_table_record_mask( table, Mask );    }    /* now, do a linear parse in case some hints were left alone */    if ( table->num_hints != table->max_hints )    {      FT_UInt   Index, Count;      FT_ERROR(( "%s.init: missing/incorrect hint masks!\n" ));      Count = table->max_hints;      for ( Index = 0; Index < Count; Index++ )        psh2_hint_table_record( table, Index );    }  Exit:    return error;  }  static void  psh2_hint_table_activate_mask( PSH2_Hint_Table  table,                                 PS_Mask          hint_mask )  {    FT_Int    mask = 0, val = 0;    FT_Byte*  cursor = hint_mask->bytes;    FT_UInt   idx, limit, count;    limit = hint_mask->num_bits;    count = 0;    psh2_hint_table_deactivate( table );    for ( idx = 0; idx < limit; idx++ )    {      if ( mask == 0 )      {        val  = *cursor++;        mask = 0x80;      }      if ( val & mask )      {        PSH2_Hint  hint = &table->hints[idx];        if ( !psh2_hint_is_active( hint ) )        {          FT_UInt     count2;#if 0          PSH2_Hint*  sort = table->sort;          PSH2_Hint   hint2;          for ( count2 = count; count2 > 0; count2--, sort++ )          {            hint2 = sort[0];            if ( psh2_hint_overlap( hint, hint2 ) )              FT_ERROR(( "%s.activate_mask: found overlapping hints\n",                         "psf.hint" ));          }#else          count2 = 0;#endif          if ( count2 == 0 )          {            psh2_hint_activate( hint );            if ( count < table->max_hints )              table->sort[count++] = hint;            else              FT_ERROR(( "%s.activate_mask: too many active hints\n",                         "psf.hint" ));          }        }      }      mask >>= 1;    }    table->num_hints = count;    /* now, sort the hints; they are guaranteed to not overlap */    /* so we can compare their "org_pos" field directly        */    {      FT_Int      i1, i2;      PSH2_Hint   hint1, hint2;      PSH2_Hint*  sort = table->sort;      /* a simple bubble sort will do, since in 99% of cases, the hints */      /* will be already sorted -- and the sort will be linear          */      for ( i1 = 1; i1 < (FT_Int)count; i1++ )      {        hint1 = sort[i1];        for ( i2 = i1 - 1; i2 >= 0; i2-- )        {          hint2 = sort[i2];          if ( hint2->org_pos < hint1->org_pos )            break;          sort[i2 + 1] = hint2;          sort[i2]     = hint1;        }      }    }  }  /*************************************************************************/  /*************************************************************************/  /*****                                                               *****/  /*****               HINTS GRID-FITTING AND OPTIMIZATION             *****/  /*****                                                               *****/  /*************************************************************************/  /*************************************************************************/#ifdef DEBUG_HINTER  static void  ps2_simple_scale( PSH2_Hint_Table  table,                    FT_Fixed         scale,                    FT_Fixed         delta,                    FT_Int           dimension )  {    PSH2_Hint  hint;    FT_UInt    count;    for ( count = 0; count < table->max_hints; count++ )    {      hint = table->hints + count;      hint->cur_pos = FT_MulFix( hint->org_pos, scale ) + delta;      hint->cur_len = FT_MulFix( hint->org_len, scale );      if ( ps2_debug_hint_func )        ps2_debug_hint_func( hint, dimension );    }  }#endif  static void  psh2_hint_align( PSH2_Hint    hint,                   PSH_Globals  globals,                   FT_Int       dimension )  {    PSH_Dimension  dim   = &globals->dimension[dimension];    FT_Fixed       scale = dim->scale_mult;    FT_Fixed       delta = dim->scale_delta;    if ( !psh2_hint_is_fitted(hint) )    {      FT_Pos  pos = FT_MulFix( hint->org_pos, scale ) + delta;      FT_Pos  len = FT_MulFix( hint->org_len, scale );      FT_Pos  fit_center;      FT_Pos  fit_len;      PSH_AlignmentRec  align;      /* compute fitted width/height */      fit_len = 0;      if ( hint->org_len )      {        fit_len = psh_dimension_snap_width( dim, hint->org_len );        if ( fit_len < 64 )          fit_len = 64;        else          fit_len = ( fit_len + 32 ) & -64;      }      hint->cur_len = fit_len;      /* check blue zones for horizontal stems */      align.align = PSH_BLUE_ALIGN_NONE;      align.align_bot = align.align_top = 0;      if ( dimension == 1 )        psh_blues_snap_stem( &globals->blues,                             hint->org_pos + hint->org_len,                             hint->org_pos,                             &align );      switch ( align.align )      {      case PSH_BLUE_ALIGN_TOP:        /* the top of the stem is aligned against a blue zone */        hint->cur_pos = align.align_top - fit_len;        break;      case PSH_BLUE_ALIGN_BOT:        /* the bottom of the stem is aligned against a blue zone */        hint->cur_pos = align.align_bot;        break;      case PSH_BLUE_ALIGN_TOP | PSH_BLUE_ALIGN_BOT:        /* both edges of the stem are aligned against blue zones */        hint->cur_pos = align.align_bot;        hint->cur_len = align.align_top - align.align_bot;        break;      default:        {          PSH2_Hint  parent = hint->parent;          if ( parent )          {            FT_Pos  par_org_center, par_cur_center;            FT_Pos  cur_org_center, cur_delta;            /* ensure that parent is already fitted */            if ( !psh2_hint_is_fitted( parent ) )              psh2_hint_align( parent, globals, dimension );            par_org_center = parent->org_pos + ( parent->org_len / 2);            par_cur_center = parent->cur_pos + ( parent->cur_len / 2);            cur_org_center = hint->org_pos   + ( hint->org_len   / 2);            cur_delta = FT_MulFix( cur_org_center - par_org_center, scale );#if 0            if ( cur_delta >= 0 )              cur_delta = ( cur_delta + 16 ) & -64;            else              cur_delta = -( (-cur_delta + 16 ) & -64 );#endif            pos = par_cur_center + cur_delta - ( len >> 1 );          }          /* normal processing */          if ( ( fit_len / 64 ) & 1 )          {            /* odd number of pixels */            fit_center = ( ( pos + ( len >> 1 ) ) & -64 ) + 32;          }          else          {            /* even number of pixels */            fit_center = ( pos + ( len >> 1 ) + 32 ) & -64;          }          hint->cur_pos = fit_center - ( fit_len >> 1 );        }      }      psh2_hint_set_fitted( hint );#ifdef DEBUG_HINTER      if ( ps2_debug_hint_func )        ps2_debug_hint_func( hint, dimension );#endif    }  }  static void  psh2_hint_table_align_hints( PSH2_Hint_Table  table,                               PSH_Globals      globals,                               FT_Int           dimension )  {    PSH2_Hint      hint;    FT_UInt        count;#ifdef DEBUG_HINTER    PSH_Dimension  dim   = &globals->dimension[dimension];    FT_Fixed       scale = dim->scale_mult;    FT_Fixed       delta = dim->scale_delta;    if ( ps_debug_no_vert_hints && dimension == 0 )    {      ps2_simple_scale( table, scale, delta, dimension );      return;    }    if ( ps_debug_no_horz_hints && dimension == 1 )    {      ps2_simple_scale( table, scale, delta, dimension );      return;    }#endif    hint  = table->hints;    count = table->max_hints;    for ( ; count > 0; count--, hint++ )      psh2_hint_align( hint, globals, dimension );  }  /*************************************************************************/  /*************************************************************************/  /*****                                                               *****/  /*****                POINTS INTERPOLATION ROUTINES                  *****/  /*****                                                               *****/  /*************************************************************************/  /*************************************************************************/#define PSH2_ZONE_MIN  -3200000#define PSH2_ZONE_MAX  +3200000#define xxDEBUG_ZONES

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区四区在线观看| 18欧美亚洲精品| 久久精品一区四区| 亚洲欧洲三级电影| 天天综合天天综合色| 激情丁香综合五月| 99re这里都是精品| 欧美高清精品3d| 久久精品在线观看| 亚洲chinese男男1069| 青椒成人免费视频| 99精品一区二区三区| 欧美电影在线免费观看| 久久免费国产精品| 一区二区三区日韩欧美精品| 久久精品国产99| 91一区二区三区在线观看| 欧美一区二区三区免费视频| 欧美国产精品一区二区| 午夜精品久久久| 成人av资源站| 日韩色视频在线观看| 成人欧美一区二区三区| 美女在线视频一区| 色狠狠一区二区三区香蕉| 26uuu精品一区二区三区四区在线| 亚洲日本一区二区三区| 精品一区二区精品| 在线观看日韩电影| 久久久国产精品不卡| 视频一区在线播放| 91色|porny| 久久久久久久久一| 日本视频免费一区| 色哟哟精品一区| 国产亚洲制服色| 免费观看30秒视频久久| 日本韩国欧美国产| 国产精品久久久久久久久图文区| 免费观看30秒视频久久| 在线观看日韩国产| 中文字幕一区二区在线观看| 韩国午夜理伦三级不卡影院| 欧美蜜桃一区二区三区| 亚洲日本中文字幕区| 国产成人午夜精品影院观看视频 | 欧美视频你懂的| 国产精品天美传媒沈樵| 国内外成人在线| 欧美一区二区三区性视频| 亚洲永久免费av| 波多野结衣欧美| 久久久亚洲精品石原莉奈| 午夜电影一区二区| 91国产福利在线| 亚洲免费在线播放| 99国产欧美另类久久久精品| 久久综合久久综合久久| 美国十次了思思久久精品导航| 欧美亚洲国产一区在线观看网站| 中文字幕一区二区三区在线播放 | 69av一区二区三区| 亚洲自拍与偷拍| 色婷婷综合久久久中文字幕| 亚洲欧洲性图库| zzijzzij亚洲日本少妇熟睡| 欧美国产日韩在线观看| 高清在线观看日韩| 中文一区二区完整视频在线观看| 国产一区欧美日韩| 欧美精品一区二区三区很污很色的| 日本不卡视频在线| 日韩欧美激情在线| 捆绑变态av一区二区三区| 91精品国产乱| 免费观看成人鲁鲁鲁鲁鲁视频| 91精品国产欧美一区二区| 三级影片在线观看欧美日韩一区二区 | 欧美男人的天堂一二区| 午夜精品aaa| 在线不卡a资源高清| 日韩精品一二区| 日韩丝袜美女视频| 久久av老司机精品网站导航| 亚洲精品一区二区三区影院| 国产一区日韩二区欧美三区| 国产拍欧美日韩视频二区| 成人白浆超碰人人人人| 亚洲男人都懂的| 欧美日韩亚洲综合一区二区三区| 日韩成人av影视| 久久综合色8888| www.一区二区| 亚洲最新在线观看| 91精品国产综合久久香蕉麻豆| 蜜桃一区二区三区在线观看| 久久久www免费人成精品| 国产精品主播直播| 亚洲视频一区二区在线观看| 精品视频在线免费观看| 蜜臀久久99精品久久久画质超高清 | 久久久精品人体av艺术| 成a人片国产精品| 亚洲午夜久久久久久久久电影网 | 夜夜揉揉日日人人青青一国产精品| 欧美日韩一级二级三级| 免费成人美女在线观看.| 久久久久久久电影| 一本大道综合伊人精品热热| 日韩制服丝袜av| 久久精品无码一区二区三区| 99国内精品久久| 日本欧美大码aⅴ在线播放| 久久毛片高清国产| 欧美激情综合网| 在线一区二区视频| 久久成人久久鬼色| 综合久久一区二区三区| 91精品国产综合久久久蜜臀图片| 国产成人av一区二区三区在线观看| 亚洲欧美另类在线| 日韩精品一区二区三区视频 | 中文字幕免费一区| 欧美日韩中文字幕一区二区| 国产一区二区电影| 亚洲国产视频网站| 国产喂奶挤奶一区二区三区| 欧美日韩精品免费| 成人午夜激情影院| 免费成人小视频| 亚洲女爱视频在线| 久久网站热最新地址| 欧美午夜不卡视频| 国产美女精品一区二区三区| 亚洲国产日韩一级| 国产精品美女久久福利网站| 欧美日本不卡视频| 波多野结衣的一区二区三区| 开心九九激情九九欧美日韩精美视频电影 | 亚洲特黄一级片| 26uuu精品一区二区三区四区在线| 欧洲一区在线观看| 风流少妇一区二区| 免费成人美女在线观看| 亚洲人成网站色在线观看| 精品国产一区二区三区四区四| 一本在线高清不卡dvd| 国产成人综合自拍| 美女性感视频久久| 亚洲综合视频网| 亚洲丝袜自拍清纯另类| 久久一日本道色综合| 6080午夜不卡| 欧美亚一区二区| 99re热这里只有精品视频| 国产中文字幕一区| 蜜桃精品视频在线| 日韩专区欧美专区| 亚洲成人动漫精品| 亚洲日本青草视频在线怡红院| 久久精品在线观看| www国产亚洲精品久久麻豆| 欧美日韩日本视频| 91激情在线视频| 99国产精品一区| 成人av电影在线| 丁香天五香天堂综合| 久久99国产精品久久99| 蜜臀av一区二区三区| 五月婷婷久久丁香| 午夜精品久久久久影视| 亚洲高清免费观看高清完整版在线观看 | 日韩**一区毛片| 亚洲成人在线免费| 亚洲成人第一页| 亚洲国产视频a| 香港成人在线视频| 亚洲国产日日夜夜| 亚洲成人一二三| 午夜精品久久久久久久久久 | 欧美日韩国产经典色站一区二区三区| 色综合欧美在线视频区| 色综合天天综合网天天狠天天| 成人开心网精品视频| 成人一级视频在线观看| 国产高清视频一区| 丰满少妇久久久久久久| 成人18视频日本| 91香蕉视频污在线| 在线看国产一区二区| 在线观看不卡一区| 欧美色区777第一页| 欧美日韩高清一区二区三区| 欧美精品第一页| 日韩视频免费观看高清完整版| 精品少妇一区二区三区在线播放 | 国产自产2019最新不卡| 国产传媒一区在线| 97久久超碰精品国产| 欧美亚男人的天堂|