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

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

?? ahglobal.c

?? a very goog book
?? C
字號:
/***************************************************************************//*                                                                         *//*  ahglobal.c                                                             *//*                                                                         *//*    Routines used to compute global metrics automatically (body).        *//*                                                                         *//*  Copyright 2000-2001, 2002 Catharon Productions Inc.                    *//*  Author: David Turner                                                   *//*                                                                         *//*  This file is part of the Catharon Typography Project and shall only    *//*  be used, modified, and distributed under the terms of the Catharon     *//*  Open Source License that should come with this file under the name     *//*  `CatharonLicense.txt'.  By continuing to use, modify, or distribute    *//*  this file you indicate that you have read the license and              *//*  understand and accept it fully.                                        *//*                                                                         *//*  Note that this license is compatible with the FreeType license.        *//*                                                                         *//***************************************************************************/#include <ft2build.h>#include FT_INTERNAL_DEBUG_H#include "ahglobal.h"#include "ahglyph.h"#define MAX_TEST_CHARACTERS  12  static  const char*  blue_chars[ah_blue_max] =  {    "THEZOCQS",    "HEZLOCUS",    "xzroesc",    "xzroesc",    "pqgjy"  };  /* simple insertion sort */  static void  sort_values( FT_Int   count,               FT_Pos*  table )  {    FT_Int  i, j, swap;    for ( i = 1; i < count; i++ )    {      for ( j = i; j > 0; j-- )      {        if ( table[j] > table[j - 1] )          break;        swap         = table[j];        table[j]     = table[j - 1];        table[j - 1] = swap;      }    }  }  static FT_Error  ah_hinter_compute_blues( AH_Hinter*  hinter )  {    AH_Blue       blue;    AH_Globals*   globals = &hinter->globals->design;    FT_Pos        flats [MAX_TEST_CHARACTERS];    FT_Pos        rounds[MAX_TEST_CHARACTERS];    FT_Int        num_flats;    FT_Int        num_rounds;    FT_Face       face;    FT_GlyphSlot  glyph;    FT_Error      error;    FT_CharMap    charmap;    face  = hinter->face;    glyph = face->glyph;    /* save current charmap */    charmap = face->charmap;    /* do we have a Unicode charmap in there? */    error = FT_Select_Charmap( face, ft_encoding_unicode );    if ( error )      goto Exit;    /* we compute the blues simply by loading each character from the */    /* 'blue_chars[blues]' string, then compute its top-most and      */    /* bottom-most points                                             */    AH_LOG(( "blue zones computation\n" ));    AH_LOG(( "------------------------------------------------\n" ));    for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )    {      const char*  p     = blue_chars[blue];      const char*  limit = p + MAX_TEST_CHARACTERS;      FT_Pos       *blue_ref, *blue_shoot;      AH_LOG(( "blue %3d: ", blue ));      num_flats  = 0;      num_rounds = 0;      for ( ; p < limit; p++ )      {        FT_UInt     glyph_index;        FT_Vector*  extremum;        FT_Vector*  points;        FT_Vector*  point_limit;        FT_Vector*  point;        FT_Bool     round;        /* exit if we reach the end of the string */        if ( !*p )          break;        AH_LOG(( "`%c'", *p ));        /* load the character in the face -- skip unknown or empty ones */        glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p );        if ( glyph_index == 0 )          continue;        error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );        if ( error || glyph->outline.n_points <= 0 )          continue;        /* now compute min or max point indices and coordinates */        points      = glyph->outline.points;        point_limit = points + glyph->outline.n_points;        point       = points;        extremum    = point;        point++;        if ( AH_IS_TOP_BLUE( blue ) )        {          for ( ; point < point_limit; point++ )            if ( point->y > extremum->y )              extremum = point;        }        else        {          for ( ; point < point_limit; point++ )            if ( point->y < extremum->y )              extremum = point;        }        AH_LOG(( "%5d", (int)extremum->y ));        /* now, check whether the point belongs to a straight or round  */        /* segment; we first need to find in which contour the extremum */        /* lies, then see its previous and next points                  */        {          FT_Int  idx = (FT_Int)( extremum - points );          FT_Int  n;          FT_Int  first, last, prev, next, end;          FT_Pos  dist;          last  = -1;          first = 0;          for ( n = 0; n < glyph->outline.n_contours; n++ )          {            end = glyph->outline.contours[n];            if ( end >= idx )            {              last = end;              break;            }            first = end + 1;          }          /* XXX: should never happen! */          if ( last < 0 )            continue;          /* now look for the previous and next points that are not on the */          /* same Y coordinate.  Threshold the `closeness'...              */          prev = idx;          next = prev;          do          {            if ( prev > first )              prev--;            else              prev = last;            dist = points[prev].y - extremum->y;            if ( dist < -5 || dist > 5 )              break;          } while ( prev != idx );          do          {            if ( next < last )              next++;            else              next = first;            dist = points[next].y - extremum->y;            if ( dist < -5 || dist > 5 )              break;          } while ( next != idx );          /* now, set the `round' flag depending on the segment's kind */          round = FT_BOOL(            FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_Curve_Tag_On ||            FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_Curve_Tag_On );          AH_LOG(( "%c ", round ? 'r' : 'f' ));        }        if ( round )          rounds[num_rounds++] = extremum->y;        else          flats[num_flats++] = extremum->y;      }      AH_LOG(( "\n" ));      /* we have computed the contents of the `rounds' and `flats' tables, */      /* now determine the reference and overshoot position of the blue;   */      /* we simply take the median value after a simple short              */      sort_values( num_rounds, rounds );      sort_values( num_flats,  flats  );      blue_ref   = globals->blue_refs + blue;      blue_shoot = globals->blue_shoots + blue;      if ( num_flats == 0 && num_rounds == 0 )      {        *blue_ref   = -10000;        *blue_shoot = -10000;      }      else if ( num_flats == 0 )      {        *blue_ref   =        *blue_shoot = rounds[num_rounds / 2];      }      else if ( num_rounds == 0 )      {        *blue_ref   =        *blue_shoot = flats[num_flats / 2];      }      else      {        *blue_ref   = flats[num_flats / 2];        *blue_shoot = rounds[num_rounds / 2];      }      /* there are sometimes problems: if the overshoot position of top     */      /* zones is under its reference position, or the opposite for bottom  */      /* zones.  We must thus check everything there and correct the errors */      if ( *blue_shoot != *blue_ref )      {        FT_Pos   ref      = *blue_ref;        FT_Pos   shoot    = *blue_shoot;        FT_Bool  over_ref = FT_BOOL( shoot > ref );        if ( AH_IS_TOP_BLUE( blue ) ^ over_ref )          *blue_shoot = *blue_ref = ( shoot + ref ) / 2;      }      AH_LOG(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));    }    /* reset original face charmap */    FT_Set_Charmap( face, charmap );    error = 0;  Exit:    return error;  }  static FT_Error  ah_hinter_compute_widths( AH_Hinter*  hinter )  {    /* scan the array of segments in each direction */    AH_Outline*  outline = hinter->glyph;    AH_Segment*  segments;    AH_Segment*  limit;    AH_Globals*  globals = &hinter->globals->design;    FT_Pos*      widths;    FT_Int       dimension;    FT_Int*      p_num_widths;    FT_Error     error = 0;    FT_Pos       edge_distance_threshold = 32000;    globals->num_widths  = 0;    globals->num_heights = 0;    /* For now, compute the standard width and height from the `o'       */    /* character.  I started computing the stem width of the `i' and the */    /* stem height of the "-", but it wasn't too good.  Moreover, we now */    /* have a single character that gives us standard width and height.  */    {      FT_UInt   glyph_index;      glyph_index = FT_Get_Char_Index( hinter->face, 'o' );      if ( glyph_index == 0 )        return 0;      error = FT_Load_Glyph( hinter->face, glyph_index, FT_LOAD_NO_SCALE );      if ( error )        goto Exit;      error = ah_outline_load( hinter->glyph, hinter->face );      if ( error )        goto Exit;      ah_outline_compute_segments( hinter->glyph );      ah_outline_link_segments( hinter->glyph );    }    segments     = outline->horz_segments;    limit        = segments + outline->num_hsegments;    widths       = globals->heights;    p_num_widths = &globals->num_heights;    for ( dimension = 1; dimension >= 0; dimension-- )    {      AH_Segment*  seg = segments;      AH_Segment*  link;      FT_Int       num_widths = 0;      for ( ; seg < limit; seg++ )      {        link = seg->link;        /* we only consider stem segments there! */        if ( link && link->link == seg && link > seg )        {          FT_Int  dist;          dist = seg->pos - link->pos;          if ( dist < 0 )            dist = -dist;          if ( num_widths < 12 )            widths[num_widths++] = dist;        }      }      sort_values( num_widths, widths );      *p_num_widths = num_widths;      /* we will now try to find the smallest width */      if ( num_widths > 0 && widths[0] < edge_distance_threshold )        edge_distance_threshold = widths[0];      segments     = outline->vert_segments;      limit        = segments + outline->num_vsegments;      widths       = globals->widths;      p_num_widths = &globals->num_widths;    }    /* Now, compute the edge distance threshold as a fraction of the */    /* smallest width in the font. Set it in `hinter.glyph' too!     */    if ( edge_distance_threshold == 32000 )      edge_distance_threshold = 50;    /* let's try 20% */    hinter->glyph->edge_distance_threshold = edge_distance_threshold / 5;  Exit:    return error;  }  FT_LOCAL_DEF( FT_Error )  ah_hinter_compute_globals( AH_Hinter*  hinter )  {    return ah_hinter_compute_widths( hinter ) ||           ah_hinter_compute_blues ( hinter );  }/* END */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产电影| 91美女视频网站| 蜜臀av一区二区在线观看 | 韩国av一区二区三区在线观看| 亚洲成人一区二区在线观看| 亚洲成在人线免费| 精品一区二区三区视频在线观看| 国产精品91一区二区| 国产精品538一区二区在线| hitomi一区二区三区精品| 成人免费高清在线| 欧美电影影音先锋| 中文字幕欧美日本乱码一线二线 | 成人h精品动漫一区二区三区| 日本欧美一区二区| 国产偷国产偷精品高清尤物| 日韩欧美国产一区二区在线播放| 欧美视频一区在线观看| 日韩一区和二区| 91精品国产色综合久久ai换脸| 久久影音资源网| 一区二区三区四区激情 | 丁香天五香天堂综合| 欧美在线看片a免费观看| 国产日韩一级二级三级| 欧美一区二区三区免费大片| 欧美日韩在线播放三区| 亚洲视频一区二区在线观看| 综合网在线视频| 免费亚洲电影在线| 欧美日韩www| 亚洲成a人片在线观看中文| 99精品欧美一区| 亚洲一区二区三区视频在线| 91女神在线视频| 亚洲资源在线观看| 欧美三级午夜理伦三级中视频| 亚洲三级免费电影| 在线观看免费亚洲| 日韩精品成人一区二区三区| 欧美成人精品1314www| 欧美aa在线视频| 欧美激情在线看| 在线视频欧美精品| 久久99精品国产麻豆婷婷| 久久夜色精品国产噜噜av| 高清在线观看日韩| 亚洲乱码中文字幕| 7777精品伊人久久久大香线蕉的| 免费视频一区二区| 亚洲欧美激情一区二区| 日韩一区二区在线观看视频播放| 国产精品1区2区3区在线观看| 国产精品色呦呦| 日韩视频一区二区| 99久精品国产| 国产成人精品一区二区三区四区 | 色婷婷综合久久| 国产精品白丝jk白祙喷水网站| 一区二区三区日本| 中文字幕av不卡| 久久精品一区二区三区不卡牛牛| 在线观看亚洲成人| 成人app在线| 国产成人午夜视频| 国精产品一区一区三区mba桃花| 亚洲精品一区二区三区影院| 99久久精品国产网站| 国产精品香蕉一区二区三区| 日韩福利视频导航| 蜜桃在线一区二区三区| 亚洲综合丁香婷婷六月香| 亚洲精品你懂的| 亚洲福利视频三区| 男人的j进女人的j一区| 老司机精品视频导航| 国产一区二区剧情av在线| 国产精品538一区二区在线| 国产福利一区二区三区视频| 国产二区国产一区在线观看| www.欧美日韩| 欧美日韩一区二区在线观看| 欧美视频一区二区三区在线观看| 欧美视频在线播放| 久久日韩精品一区二区五区| 国产欧美日韩不卡| 一区二区三区在线免费| 日本中文在线一区| 成人黄色综合网站| 欧美日韩高清一区二区| 国产欧美日韩另类视频免费观看| 亚洲色图19p| 成人自拍视频在线| 在线不卡中文字幕播放| 国产日产欧美一区| 美女看a上一区| 日本韩国欧美国产| 亚洲欧美综合另类在线卡通| 亚洲mv大片欧洲mv大片精品| 粉嫩蜜臀av国产精品网站| 欧美群妇大交群的观看方式| 亚洲婷婷在线视频| av亚洲精华国产精华| 久久先锋影音av鲁色资源网| 亚洲电影你懂得| 欧美午夜精品久久久久久超碰| 久久精品人人爽人人爽| 青青草原综合久久大伊人精品 | 不卡一卡二卡三乱码免费网站| 日韩一区二区麻豆国产| 最近日韩中文字幕| 国产一区二区三区四| 欧美成人精品1314www| 美女精品自拍一二三四| 精品国产三级a在线观看| 韩国视频一区二区| 欧美国产日本韩| 91美女在线观看| 日日夜夜精品视频天天综合网| 欧美性videosxxxxx| 免费成人在线影院| 久久精品视频在线看| 91在线播放网址| 首页综合国产亚洲丝袜| 久久先锋影音av鲁色资源网| eeuss鲁片一区二区三区| 18欧美乱大交hd1984| 91精品国产美女浴室洗澡无遮挡| 日韩成人一级片| 中文字幕欧美一| 精品美女在线播放| 91性感美女视频| 国产乱子轮精品视频| 亚洲第一综合色| 国产精品欧美极品| 日本一区免费视频| 日韩欧美一区在线| 欧美三区在线观看| 日本韩国欧美一区| av不卡一区二区三区| 国产成人小视频| 国产风韵犹存在线视精品| 日本最新不卡在线| 香蕉久久夜色精品国产使用方法| 国产精品美女久久久久久久网站| 欧美一卡二卡在线观看| 91精品一区二区三区久久久久久| 波多野结衣精品在线| 波多野结衣一区二区三区 | 亚洲免费观看高清完整版在线观看熊| 精品国产一区二区三区不卡 | 欧美美女一区二区在线观看| 99精品偷自拍| 99re66热这里只有精品3直播 | 欧美精品一区二区在线观看| 欧美日本韩国一区二区三区视频| 99re8在线精品视频免费播放| 国产福利一区二区三区视频在线| 国产在线麻豆精品观看| 国产在线播精品第三| 国产91高潮流白浆在线麻豆| 高清国产一区二区三区| 色一情一伦一子一伦一区| 欧美亚洲国产bt| 2021中文字幕一区亚洲| 欧美激情一区二区三区全黄| 综合自拍亚洲综合图不卡区| 一区二区欧美国产| 国产精品一区二区黑丝| 91视频在线观看| 精品国产凹凸成av人导航| 国产精品久久久久久久久久免费看| 亚洲精品国产无天堂网2021| 免费高清成人在线| 91在线视频18| 久久久.com| 蜜桃免费网站一区二区三区| 色综合天天综合网国产成人综合天 | 一二三四区精品视频| 国产精品自在欧美一区| 欧美一区二区三区视频免费 | 一区二区高清在线| 成人国产一区二区三区精品| 在线播放视频一区| 亚洲一区二区在线播放相泽| 成人免费毛片片v| 国产精品乱码人人做人人爱| 亚洲免费观看高清在线观看| 成人在线视频一区二区| 国产精品日日摸夜夜摸av| 国产自产v一区二区三区c| 精品免费日韩av| 久久精品国产99久久6| 日韩精品专区在线影院重磅| 99视频一区二区三区| 一区二区三区四区高清精品免费观看| 一级精品视频在线观看宜春院| 九九视频精品免费| 91丨porny丨最新| 国产精品欧美精品|