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

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

?? ahglyph.c

?? a very goog book
?? C
?? 第 1 頁 / 共 3 頁
字號:
/***************************************************************************//*                                                                         *//*  ahglyph.c                                                              *//*                                                                         *//*    Routines used to load and analyze a given glyph before hinting       *//*    (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 "ahglyph.h"#include "ahangles.h"#include "ahglobal.h"#include "aherrors.h"#ifdef AH_DEBUG#include <stdio.h>  void  ah_dump_edges( AH_Outline*  outline )  {    AH_Edge*     edges;    AH_Edge*     edge_limit;    AH_Segment*  segments;    FT_Int       dimension;    edges      = outline->horz_edges;    edge_limit = edges + outline->num_hedges;    segments   = outline->horz_segments;    for ( dimension = 1; dimension >= 0; dimension-- )    {      AH_Edge*  edge;      printf ( "Table of %s edges:\n",               !dimension ? "vertical" : "horizontal" );      printf ( "  [ index |  pos |  dir  | link |"               " serif | blue | opos  |  pos  ]\n" );      for ( edge = edges; edge < edge_limit; edge++ )      {        printf ( "  [ %5d | %4d | %5s | %4d | %5d |  %c  | %5.2f | %5.2f ]\n",                 edge - edges,                 (int)edge->fpos,                 edge->dir == ah_dir_up                   ? "up"                   : ( edge->dir == ah_dir_down                         ? "down"                         : ( edge->dir == ah_dir_left                               ? "left"                               : ( edge->dir == ah_dir_right                                     ? "right"                                     : "none" ) ) ),                 edge->link ? ( edge->link - edges ) : -1,                 edge->serif ? ( edge->serif - edges ) : -1,                 edge->blue_edge ? 'y' : 'n',                 edge->opos / 64.0,                 edge->pos / 64.0 );      }      edges      = outline->vert_edges;      edge_limit = edges + outline->num_vedges;      segments   = outline->vert_segments;    }  }  /* A function used to dump the array of linked segments */  void  ah_dump_segments( AH_Outline*  outline )  {    AH_Segment*  segments;    AH_Segment*  segment_limit;    AH_Point*    points;    FT_Int       dimension;    points        = outline->points;    segments      = outline->horz_segments;    segment_limit = segments + outline->num_hsegments;    for ( dimension = 1; dimension >= 0; dimension-- )    {      AH_Segment*  seg;      printf ( "Table of %s segments:\n",               !dimension ? "vertical" : "horizontal" );      printf ( "  [ index |  pos |  dir  | link | serif |"               " numl | first | start ]\n" );      for ( seg = segments; seg < segment_limit; seg++ )      {        printf ( "  [ %5d | %4d | %5s | %4d | %5d | %4d | %5d | %5d ]\n",                 seg - segments,                 (int)seg->pos,                 seg->dir == ah_dir_up                   ? "up"                   : ( seg->dir == ah_dir_down                         ? "down"                         : ( seg->dir == ah_dir_left                               ? "left"                               : ( seg->dir == ah_dir_right                                     ? "right"                                     : "none" ) ) ),                 seg->link ? (seg->link-segments) : -1,                 seg->serif ? (seg->serif-segments) : -1,                 (int)seg->num_linked,                 seg->first - points,                 seg->last - points );      }      segments      = outline->vert_segments;      segment_limit = segments + outline->num_vsegments;    }  }#endif /* AH_DEBUG */  /* compute the direction value of a given vector.. */  static AH_Direction  ah_compute_direction( FT_Pos  dx,                        FT_Pos  dy )  {    AH_Direction  dir;    FT_Pos        ax = ABS( dx );    FT_Pos        ay = ABS( dy );    dir = ah_dir_none;    /* test for vertical direction */    if ( ax * 12 < ay )    {      dir = dy > 0 ? ah_dir_up : ah_dir_down;    }    /* test for horizontal direction */    else if ( ay * 12 < ax )    {      dir = dx > 0 ? ah_dir_right : ah_dir_left;    }    return dir;  }  /* this function is used by ah_get_orientation (see below) to test */  /* the fill direction of a given bbox extrema                      */  static int  ah_test_extrema( FT_Outline*  outline,                   int          n )  {    FT_Vector  *prev, *cur, *next;    FT_Pos      product;    FT_Int      first, last, c;    /* we need to compute the `previous' and `next' point */    /* for these extrema                                  */    cur  = outline->points + n;    prev = cur - 1;    next = cur + 1;    first = 0;    for ( c = 0; c < outline->n_contours; c++ )    {      last  = outline->contours[c];      if ( n == first )        prev = outline->points + last;      if ( n == last )        next = outline->points + first;      first = last + 1;    }    product = FT_MulDiv( cur->x  - prev->x,  /* in.x  */                         next->y - cur->y,   /* out.y */                         0x40 )              -              FT_MulDiv( cur->y  - prev->y,  /* in.y  */                         next->x - cur->x,   /* out.x */                         0x40 );    if ( product )      product = product > 0 ? 2 : 1;    return product;  }  /* Compute the orientation of path filling.  It differs between TrueType */  /* and Type1 formats.  We could use the `ft_outline_reverse_fill' flag,  */  /* but it is better to re-compute it directly (it seems that this flag   */  /* isn't correctly set for some weird composite glyphs currently).       */  /*                                                                       */  /* We do this by computing bounding box points, and computing their      */  /* curvature.                                                            */  /*                                                                       */  /* The function returns either 1 or -1.                                  */  /*                                                                       */  static int  ah_get_orientation( FT_Outline*  outline )  {    FT_BBox  box;    FT_BBox  indices;    int      n, last;    indices.xMin = -1;    indices.yMin = -1;    indices.xMax = -1;    indices.yMax = -1;    box.xMin = box.yMin =  32767L;    box.xMax = box.yMax = -32768L;    /* is it empty? */    if ( outline->n_contours < 1 )      return 1;    last = outline->contours[outline->n_contours - 1];    for ( n = 0; n <= last; n++ )    {      FT_Pos  x, y;      x = outline->points[n].x;      if ( x < box.xMin )      {        box.xMin     = x;        indices.xMin = n;      }      if ( x > box.xMax )      {        box.xMax     = x;        indices.xMax = n;      }      y = outline->points[n].y;      if ( y < box.yMin )      {        box.yMin     = y;        indices.yMin = n;      }      if ( y > box.yMax )      {        box.yMax     = y;        indices.yMax = n;      }    }    /* test orientation of the xmin */    n = ah_test_extrema( outline, indices.xMin );    if ( n )      goto Exit;    n = ah_test_extrema( outline, indices.yMin );    if ( n )      goto Exit;    n = ah_test_extrema( outline, indices.xMax );    if ( n )      goto Exit;    n = ah_test_extrema( outline, indices.yMax );    if ( !n )      n = 1;  Exit:    return n;  }  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    ah_outline_new                                                     */  /*                                                                       */  /* <Description>                                                         */  /*    Creates a new and empty AH_Outline object.                         */  /*                                                                       */  FT_LOCAL_DEF( FT_Error )  ah_outline_new( FT_Memory     memory,                  AH_Outline**  aoutline )  {    FT_Error     error;    AH_Outline*  outline;    if ( !FT_NEW( outline ) )    {      outline->memory = memory;      *aoutline = outline;    }    return error;  }  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    ah_outline_done                                                    */  /*                                                                       */  /* <Description>                                                         */  /*    Destroys a given AH_Outline object.                                */  /*                                                                       */  FT_LOCAL_DEF( void )  ah_outline_done( AH_Outline*  outline )  {    FT_Memory memory = outline->memory;    FT_FREE( outline->horz_edges );    FT_FREE( outline->horz_segments );    FT_FREE( outline->contours );    FT_FREE( outline->points );    FT_FREE( outline );  }  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    ah_outline_save                                                    */  /*                                                                       */  /* <Description>                                                         */  /*    Saves the content of a given AH_Outline object into a face's glyph */  /*    slot.                                                              */  /*                                                                       */  FT_LOCAL_DEF( void )  ah_outline_save( AH_Outline*  outline,                   AH_Loader    gloader )  {    AH_Point*   point       = outline->points;    AH_Point*   point_limit = point + outline->num_points;    FT_Vector*  vec         = gloader->current.outline.points;    char*       tag         = gloader->current.outline.tags;    /* we assume that the glyph loader has already been checked for storage */    for ( ; point < point_limit; point++, vec++, tag++ )    {      vec->x = point->x;      vec->y = point->y;      if ( point->flags & ah_flag_conic )        tag[0] = FT_Curve_Tag_Conic;      else if ( point->flags & ah_flag_cubic )        tag[0] = FT_Curve_Tag_Cubic;      else        tag[0] = FT_Curve_Tag_On;    }  }  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    ah_outline_load                                                    */  /*                                                                       */  /* <Description>                                                         */  /*    Loads an unscaled outline from a glyph slot into an AH_Outline     */  /*    object.                                                            */  /*                                                                       */  FT_LOCAL_DEF( FT_Error )  ah_outline_load( AH_Outline*  outline,                   FT_Face      face )  {    FT_Memory   memory       = outline->memory;    FT_Error    error        = AH_Err_Ok;    FT_Outline* source       = &face->glyph->outline;    FT_Int      num_points   = source->n_points;    FT_Int      num_contours = source->n_contours;    AH_Point*   points;    /* check arguments */    if ( !face                                          ||         !face->size                                    ||         face->glyph->format != ft_glyph_format_outline )      return AH_Err_Invalid_Argument;    /* first of all, reallocate the contours array if necessary */    if ( num_contours > outline->max_contours )    {      FT_Int  new_contours = ( num_contours + 3 ) & -4;      if ( FT_RENEW_ARRAY( outline->contours,                           outline->max_contours,                           new_contours ) )        goto Exit;      outline->max_contours = new_contours;    }    /* then, reallocate the points, segments & edges arrays if needed -- */    /* note that we reserved two additional point positions, used to     */    /* hint metrics appropriately                                        */    /*                                                                   */    if ( num_points + 2 > outline->max_points )    {      FT_Int  news = ( num_points + 2 + 7 ) & -8;      FT_Int  max  = outline->max_points;      if ( FT_RENEW_ARRAY( outline->points,        max,     news     ) ||           FT_RENEW_ARRAY( outline->horz_edges,    max * 2, news * 2 ) ||           FT_RENEW_ARRAY( outline->horz_segments, max * 2, news * 2 ) )        goto Exit;      /* readjust some pointers */      outline->vert_edges    = outline->horz_edges    + news;      outline->vert_segments = outline->horz_segments + news;      outline->max_points    = news;    }    outline->num_points   = num_points;    outline->num_contours = num_contours;    outline->num_hedges    = 0;    outline->num_vedges    = 0;    outline->num_hsegments = 0;    outline->num_vsegments = 0;    /* We can't rely on the value of `FT_Outline.flags' to know the fill  */    /* direction used for a glyph, given that some fonts are broken (e.g. */    /* the Arphic ones). We thus recompute it each time we need to.       */    /*                                                                    */    outline->vert_major_dir = ah_dir_up;    outline->horz_major_dir = ah_dir_left;    if ( ah_get_orientation( source ) > 1 )    {      outline->vert_major_dir = ah_dir_down;      outline->horz_major_dir = ah_dir_right;    }    outline->x_scale = face->size->metrics.x_scale;    outline->y_scale = face->size->metrics.y_scale;    points = outline->points;    if ( outline->num_points == 0 )      goto Exit;    {      /* do one thing at a time -- it is easier to understand, and */      /* the code is clearer                                       */      AH_Point*  point;      AH_Point*  point_limit = points + outline->num_points;      /* compute coordinates */      {        FT_Vector*  vec     = source->points;        FT_Fixed    x_scale = outline->x_scale;        FT_Fixed    y_scale = outline->y_scale;        for ( point = points; point < point_limit; vec++, point++ )        {          point->fx = vec->x;          point->fy = vec->y;          point->ox = point->x = FT_MulFix( vec->x, x_scale );

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品视频免费| 秋霞电影一区二区| 中文幕一区二区三区久久蜜桃| 日韩欧美一二三四区| 欧美一级国产精品| 日韩午夜在线观看| 精品日韩av一区二区| 精品国产乱码久久久久久夜甘婷婷| 91精品国产综合久久精品麻豆| 欧美日韩国产影片| 在线成人免费观看| 欧美成人精品福利| 久久久久久9999| 国产精品你懂的在线欣赏| 国产精品久久久久影院亚瑟| 欧美国产禁国产网站cc| 中文字幕一区三区| 一区二区三区免费在线观看| 亚洲国产三级在线| 性做久久久久久免费观看| 日韩福利视频导航| 国产在线乱码一区二区三区| 国产成人亚洲综合a∨婷婷| 国产一区视频导航| av电影在线观看不卡| 欧洲一区二区三区在线| 日韩一区二区影院| 国产亚洲短视频| 亚洲免费在线视频| 日韩精品电影在线| 国产精品88888| 一本久道中文字幕精品亚洲嫩| 欧美日韩在线播放三区| 欧美电影免费观看高清完整版在线 | 中文字幕一区二区日韩精品绯色| 中文字幕亚洲区| 亚洲福利电影网| 久久99国产精品成人| 成人精品视频一区二区三区| 欧美中文字幕一区| 精品国产污网站| 亚洲色图色小说| 美女视频网站黄色亚洲| 国产成人免费视| 欧美性色aⅴ视频一区日韩精品| 欧美电影免费观看高清完整版在线| 国产精品乱子久久久久| 午夜精品福利一区二区三区av | 91精品欧美久久久久久动漫| 久久夜色精品国产噜噜av| 自拍偷拍国产亚洲| 另类小说视频一区二区| 99视频一区二区三区| 91精品视频网| 亚洲欧洲日本在线| 久久国产剧场电影| 欧美亚洲一区二区在线观看| 久久午夜电影网| 亚洲午夜精品久久久久久久久| 国产精品亚洲第一区在线暖暖韩国| 91黄色免费版| 久久蜜臀中文字幕| 亚州成人在线电影| 91亚洲精品一区二区乱码| 日韩精品专区在线影院重磅| 亚洲你懂的在线视频| 韩国三级在线一区| 欧美日韩亚洲综合一区| 综合欧美一区二区三区| 国产中文字幕一区| 欧美一区二区美女| 亚洲乱码国产乱码精品精98午夜 | 九一九一国产精品| 91免费精品国自产拍在线不卡| 精品乱码亚洲一区二区不卡| 亚洲午夜久久久久久久久电影院 | 欧美一卡2卡3卡4卡| 亚洲卡通动漫在线| 成人午夜av影视| 欧美精品一区二区三区一线天视频| 亚洲永久精品国产| 成人av在线资源网站| 国产亚洲一二三区| 精品一区二区久久久| 91精品国产色综合久久不卡电影| 亚洲欧美日韩在线| www.一区二区| 亚洲国产成人午夜在线一区| 精品一区中文字幕| 日韩欧美国产精品一区| 天堂成人国产精品一区| 欧洲av一区二区嗯嗯嗯啊| 亚洲欧美在线视频| 成人毛片在线观看| 中文字幕av不卡| 国产成人av网站| 久久精品亚洲乱码伦伦中文| 极品少妇xxxx精品少妇| 日韩午夜三级在线| 日本欧美在线观看| 日韩欧美综合在线| 久久99九九99精品| 欧美成人福利视频| 久久国产剧场电影| 久久蜜桃av一区二区天堂| 欧洲精品一区二区三区在线观看| 一区二区三区不卡视频| 91小视频免费看| 亚洲激情在线播放| 欧美性猛交一区二区三区精品| 一区二区三区欧美视频| 欧美日韩一区二区三区四区五区| 一区二区三区四区高清精品免费观看 | 国内成人免费视频| 欧美大胆人体bbbb| 国产美女视频一区| 国产精品二三区| 99re视频精品| 亚洲一区在线电影| 欧美日本一道本| 久久成人免费电影| 中文字幕巨乱亚洲| 一本一道综合狠狠老| 亚洲电影一级片| 日韩欧美亚洲国产精品字幕久久久| 久久99久久99小草精品免视看| 国产亚洲成av人在线观看导航| 成人性色生活片| 亚洲激情综合网| 91精品国产综合久久福利| 国产在线不卡视频| 亚洲欧洲精品成人久久奇米网| 色噜噜狠狠一区二区三区果冻| 天天影视色香欲综合网老头| 久久伊人中文字幕| 99re亚洲国产精品| 日本系列欧美系列| 国产视频一区二区在线| 色综合久久久久综合体桃花网| 午夜精品久久久久久久久| 26uuu色噜噜精品一区二区| heyzo一本久久综合| 亚洲电影第三页| 久久蜜臀精品av| 欧美亚日韩国产aⅴ精品中极品| 秋霞午夜鲁丝一区二区老狼| 国产欧美日韩在线| 欧美人xxxx| 国产成人精品一区二| 亚洲国产欧美在线| 久久久不卡影院| 欧美日韩国产另类不卡| 国产黄色成人av| 亚洲动漫第一页| 国产视频不卡一区| 88在线观看91蜜桃国自产| 不卡的av电影| 毛片基地黄久久久久久天堂| 综合中文字幕亚洲| 26uuu成人网一区二区三区| 色吊一区二区三区| 国产馆精品极品| 天天综合色天天综合| 国产精品久久久久久久久图文区| 制服.丝袜.亚洲.另类.中文| 99国产精品久久久久久久久久 | 欧美在线一区二区三区| 国产美女在线精品| 日本午夜一区二区| 一区二区三区精品视频在线| 国产欧美一区二区三区网站| 欧美另类高清zo欧美| aaa亚洲精品| 国产精品影音先锋| 日韩中文欧美在线| 亚洲精品国产a| 中文字幕免费不卡| 精品国产免费一区二区三区四区| 欧美日韩一区不卡| 91在线视频官网| 成人精品视频.| 黑人精品欧美一区二区蜜桃| 日韩成人午夜电影| 亚洲午夜激情网页| 亚洲久草在线视频| 国产精品福利一区| 久久久www免费人成精品| 日韩欧美国产电影| 欧美夫妻性生活| 欧美视频一区二区在线观看| 91丨九色丨尤物| 成人综合婷婷国产精品久久免费| 久久av老司机精品网站导航| 日本网站在线观看一区二区三区 | 亚洲成人黄色小说| 亚洲精选免费视频| 一区二区三区在线影院| 国产精品久久久久影院亚瑟 | 亚洲激情网站免费观看| 国产精品久久久久一区|