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

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

?? pango-ot-buffer.c

?? GTK+-2.0源碼之pango-1.15.6.tar.gz
?? C
字號:
/* Pango * pango-ot-buffer.c: Buffer of glyphs for shaping/positioning * * Copyright (C) 2004 Red Hat Software * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */#include <config.h>#include "pango-ot-private.h"#define PANGO_SCALE_26_6 (PANGO_SCALE / (1<<6))#define PANGO_UNITS_26_6(d) (PANGO_SCALE_26_6 * (d))/** * pango_ot_buffer_new * @font: a #PangoFcFont * * Creates a new #PangoOTBuffer for the given OpenType font. * * Return value: the newly allocated #PangoOTBuffer, which should *               be freed with pango_ot_buffer_destroy(). * * Since: 1.4 **/PangoOTBuffer *pango_ot_buffer_new (PangoFcFont *font){  /* We lock the font here immediately for the silly reason   * of getting the FT_Memory; otherwise we'd have to   * add a new operation to PangoFcFontmap; callers will   * probably already have the font locked, however,   * so there is little performance penalty.   */  PangoOTBuffer *buffer = g_slice_new (PangoOTBuffer);  FT_Face face = pango_fc_font_lock_face (font);  if (hb_buffer_new (face->memory, &buffer->buffer) != FT_Err_Ok)    g_warning ("Allocation of HB_Buffer failed"); /* this doesn't happen */  buffer->font = g_object_ref (font);  buffer->applied_gpos = FALSE;  buffer->rtl = FALSE;  buffer->zero_width_marks = FALSE;  pango_fc_font_unlock_face (font);  return buffer;}/** * pango_ot_buffer_destroy * @buffer: a #PangoOTBuffer * * Destroys a #PangoOTBuffer and free all associated memory. * * Since: 1.4 **/voidpango_ot_buffer_destroy (PangoOTBuffer *buffer){  hb_buffer_free (buffer->buffer);  g_object_unref (buffer->font);  g_slice_free (PangoOTBuffer, buffer);}/** * pango_ot_buffer_clear * @buffer: a #PangoOTBuffer * * Empties a #PangoOTBuffer, make it ready to add glyphs to. * * Since: 1.4 **/voidpango_ot_buffer_clear (PangoOTBuffer *buffer){  hb_buffer_clear (buffer->buffer);  buffer->applied_gpos = FALSE;}/** * pango_ot_buffer_add_glyph * @buffer: a #PangoOTBuffer * @glyph: the glyph index to add, like a #PangoGlyph * @properties: the glyph properties * @cluster: the cluster that this glyph belongs to * * Appends a glyph to a #PangoOTBuffer, with @properties identifying which * features should be applied on this glyph.  See pango_ruleset_add_feature(). * * Since: 1.4 **/voidpango_ot_buffer_add_glyph (PangoOTBuffer *buffer,			   guint          glyph,			   guint          properties,			   guint          cluster){  hb_buffer_add_glyph (buffer->buffer,			glyph, properties, cluster);}/** * pango_ot_buffer_set_rtl * @buffer: a #PangoOTBuffer * @rtl: %TRUE for right-to-left text * * Sets whether glyphs will be rendered right-to-left.  This setting * is needed for proper horizontal positioning of right-to-left scripts. * * Since: 1.4 **/voidpango_ot_buffer_set_rtl (PangoOTBuffer *buffer,			 gboolean       rtl){  buffer->rtl = rtl != FALSE;}/** * pango_ot_buffer_set_zero_width_marks * @buffer: a #PangoOTBuffer * @zero_width_marks: %TRUE if characters with a mark class should *  be forced to zero width. * * Sets whether characters with a mark class should be forced to zero width. * This setting is needed for proper positioning of Arabic accents, * but will produce incorrect results with standard OpenType Indic * fonts. * * Since: 1.6 **/voidpango_ot_buffer_set_zero_width_marks (PangoOTBuffer     *buffer,				      gboolean           zero_width_marks){  buffer->zero_width_marks = zero_width_marks != FALSE;}/** * pango_ot_buffer_get_glyphs * @buffer: a #PangoOTBuffer * @glyphs: location to store the array of glyphs, or %NULL * @n_glyphs: location to store the number of glyphs, or %NULL * * Gets the glyph array contained in a #PangoOTBuffer.  The glyphs are * owned by the buffer and should not be freed, and are only valid as long * as buffer is not modified. * * Since: 1.4 **/voidpango_ot_buffer_get_glyphs (PangoOTBuffer  *buffer,			    PangoOTGlyph  **glyphs,			    int            *n_glyphs){  if (glyphs)    *glyphs = (PangoOTGlyph *)buffer->buffer->in_string;  if (n_glyphs)    *n_glyphs = buffer->buffer->in_length;}static voidswap_range (PangoGlyphString *glyphs, int start, int end){  int i, j;  for (i = start, j = end - 1; i < j; i++, j--)    {      PangoGlyphInfo glyph_info;      gint log_cluster;      glyph_info = glyphs->glyphs[i];      glyphs->glyphs[i] = glyphs->glyphs[j];      glyphs->glyphs[j] = glyph_info;      log_cluster = glyphs->log_clusters[i];      glyphs->log_clusters[i] = glyphs->log_clusters[j];      glyphs->log_clusters[j] = log_cluster;    }}static voidapply_gpos_ltr (PangoGlyphString *glyphs,		HB_Position      positions){  int i;  for (i = 0; i < glyphs->num_glyphs; i++)    {      FT_Pos x_pos = positions[i].x_pos;      FT_Pos y_pos = positions[i].y_pos;      int back = i;      int j;      while (positions[back].back != 0)	{	  back  -= positions[back].back;	  x_pos += positions[back].x_pos;	  y_pos += positions[back].y_pos;	}      for (j = back; j < i; j++)	glyphs->glyphs[i].geometry.x_offset -= glyphs->glyphs[j].geometry.width;      glyphs->glyphs[i].geometry.x_offset += PANGO_UNITS_26_6(x_pos);      glyphs->glyphs[i].geometry.y_offset -= PANGO_UNITS_26_6(y_pos);      if (positions[i].new_advance)	glyphs->glyphs[i].geometry.width  = PANGO_UNITS_26_6(positions[i].x_advance);      else	glyphs->glyphs[i].geometry.width += PANGO_UNITS_26_6(positions[i].x_advance);    }}static voidapply_gpos_rtl (PangoGlyphString *glyphs,		HB_Position      positions){  int i;  for (i = 0; i < glyphs->num_glyphs; i++)    {      int i_rev = glyphs->num_glyphs - i - 1;      int back_rev = i_rev;      int back;      FT_Pos x_pos = positions[i_rev].x_pos;      FT_Pos y_pos = positions[i_rev].y_pos;      int j;      while (positions[back_rev].back != 0)	{	  back_rev -= positions[back_rev].back;	  x_pos += positions[back_rev].x_pos;	  y_pos += positions[back_rev].y_pos;	}      back = glyphs->num_glyphs - back_rev - 1;      for (j = i; j < back; j++)	glyphs->glyphs[i].geometry.x_offset += glyphs->glyphs[j].geometry.width;      glyphs->glyphs[i].geometry.x_offset += PANGO_UNITS_26_6(x_pos);      glyphs->glyphs[i].geometry.y_offset -= PANGO_UNITS_26_6(y_pos);      if (positions[i_rev].new_advance)	glyphs->glyphs[i].geometry.width  = PANGO_UNITS_26_6(positions[i_rev].x_advance);      else	glyphs->glyphs[i].geometry.width += PANGO_UNITS_26_6(positions[i_rev].x_advance);    }}/** * pango_ot_buffer_output * @buffer: a #PangoOTBuffer * @glyphs: a #PangoGlyphString * * Exports the glyphs in a #PangoOTBuffer into a #PangoGlyphString.  This is * typically used after the OpenType layout processing is over, to convert the * resulting glyphs into a generic Pango glyph string. * * Since: 1.4 **/voidpango_ot_buffer_output (PangoOTBuffer    *buffer,			PangoGlyphString *glyphs){  FT_Face face;  PangoOTInfo *info;  HB_GDEF gdef = NULL;  unsigned int i;  int last_cluster;  face = pango_fc_font_lock_face (buffer->font);  g_assert (face);  /* Copy glyphs into output glyph string */  pango_glyph_string_set_size (glyphs, buffer->buffer->in_length);  last_cluster = -1;  for (i = 0; i < buffer->buffer->in_length; i++)    {      HB_GlyphItem item = &buffer->buffer->in_string[i];      glyphs->glyphs[i].glyph = item->gindex;      glyphs->log_clusters[i] = item->cluster;      if (glyphs->log_clusters[i] != last_cluster)	glyphs->glyphs[i].attr.is_cluster_start = 1;      else	glyphs->glyphs[i].attr.is_cluster_start = 0;      last_cluster = glyphs->log_clusters[i];    }  info = pango_ot_info_get (face);  gdef = pango_ot_info_get_gdef (info);  /* Apply default positioning */  for (i = 0; i < (unsigned int)glyphs->num_glyphs; i++)    {      if (glyphs->glyphs[i].glyph)	{	  PangoRectangle logical_rect;	  FT_UShort property;	  if (buffer->zero_width_marks &&	      gdef &&	      HB_GDEF_Get_Glyph_Property (gdef, glyphs->glyphs[i].glyph, &property) == FT_Err_Ok &&	      (property == HB_GDEF_MARK || (property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS) != 0))	    {	      glyphs->glyphs[i].geometry.width = 0;	    }	  else	    {	      pango_font_get_glyph_extents ((PangoFont *)buffer->font, glyphs->glyphs[i].glyph, NULL, &logical_rect);	      glyphs->glyphs[i].geometry.width = logical_rect.width;	    }	}      else	glyphs->glyphs[i].geometry.width = 0;      glyphs->glyphs[i].geometry.x_offset = 0;      glyphs->glyphs[i].geometry.y_offset = 0;    }  if (buffer->rtl)    {      /* Swap all glyphs */      swap_range (glyphs, 0, glyphs->num_glyphs);    }  if (buffer->applied_gpos)    {      if (buffer->rtl)	apply_gpos_rtl (glyphs, buffer->buffer->positions);      else	apply_gpos_ltr (glyphs, buffer->buffer->positions);    }  else    pango_fc_font_kern_glyphs (buffer->font, glyphs);  pango_fc_font_unlock_face (buffer->font);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久国产综合精品麻豆| 色拍拍在线精品视频8848| 成人激情av网| 日韩欧美卡一卡二| 亚洲不卡一区二区三区| 成人av午夜电影| 久久婷婷成人综合色| 日韩精品欧美精品| 色素色在线综合| 国产精品情趣视频| 国产精品一区二区在线看| 91精品啪在线观看国产60岁| 亚洲一区二区在线观看视频| 不卡一区在线观看| 国产肉丝袜一区二区| 狠狠色综合日日| 欧美一区二区大片| 日韩不卡一区二区三区| 在线国产电影不卡| 一区二区三区产品免费精品久久75| 国产一区福利在线| 久久亚洲一级片| 日韩精品久久理论片| 欧美性极品少妇| 亚洲精品日韩专区silk| av一区二区三区| 国产精品入口麻豆九色| 福利电影一区二区| 国产午夜亚洲精品不卡| 国产一区二区三区蝌蚪| 国产三级欧美三级日产三级99| 精品一区二区免费| 精品国产一区二区精华| 精品在线视频一区| 久久香蕉国产线看观看99| 国产麻豆精品久久一二三| 久久综合五月天婷婷伊人| 激情综合色综合久久综合| 精品国产91久久久久久久妲己| 精品一区二区在线看| 国产精品久久久久永久免费观看| 国内国产精品久久| 国产亚洲成年网址在线观看| 成人黄色在线网站| 亚洲日本电影在线| 欧美三级视频在线| 日韩高清电影一区| 久久亚洲精精品中文字幕早川悠里| 麻豆91免费看| 国产精品污污网站在线观看| 99久久精品国产网站| 亚洲成人精品一区二区| 精品美女一区二区三区| 国产精品18久久久| 夜夜嗨av一区二区三区网页| 制服丝袜一区二区三区| 国产乱子轮精品视频| 中文字幕日本不卡| 在线电影欧美成精品| 色一区在线观看| 亚洲综合小说图片| 精品美女一区二区| 色婷婷亚洲婷婷| 久久激情五月激情| 亚洲情趣在线观看| 精品国产三级a在线观看| 丰满亚洲少妇av| 天天av天天翘天天综合网| 久久久精品国产99久久精品芒果| 99re视频这里只有精品| 蜜桃久久久久久久| 亚洲男同性视频| 精品国产免费人成在线观看| 99re成人在线| 久久av中文字幕片| 亚洲国产视频网站| 国产亚洲制服色| 欧美日韩视频第一区| 粉嫩嫩av羞羞动漫久久久| 国产美女一区二区三区| 亚洲午夜在线观看视频在线| 久久亚洲精品国产精品紫薇| 欧美色图在线观看| av综合在线播放| 狠狠色综合日日| 日韩 欧美一区二区三区| 亚洲区小说区图片区qvod| 久久久99精品久久| 欧美成人精品二区三区99精品| 91黄色免费网站| 懂色av中文一区二区三区| 久久精品国产秦先生| 五月婷婷色综合| 亚洲精品国产a| 中文字幕亚洲在| 国产精品欧美一区二区三区| 欧美一二三四在线| 在线观看精品一区| 97精品国产97久久久久久久久久久久| 麻豆精品一区二区综合av| 香蕉成人啪国产精品视频综合网| 中文字幕一区二区三区乱码在线 | 日韩高清不卡在线| 亚洲一级在线观看| 一区二区三区91| 亚洲天堂福利av| 亚洲欧洲日本在线| 中文字幕第一区第二区| 久久久久久免费毛片精品| 欧美mv日韩mv亚洲| 久久新电视剧免费观看| www国产精品av| 精品日韩在线观看| 精品久久久久香蕉网| 日韩一区国产二区欧美三区| 8x福利精品第一导航| 欧美日本一区二区| 精品视频999| 久久久久高清精品| 久久久青草青青国产亚洲免观| 精品国产乱码久久久久久蜜臀| 日韩一区二区在线观看视频| 日韩视频一区二区在线观看| 欧美成人一区二区三区片免费| 91麻豆精品国产综合久久久久久| 5858s免费视频成人| 555夜色666亚洲国产免| 日韩欧美国产精品| 久久久久88色偷偷免费 | 欧美日韩视频专区在线播放| 欧洲生活片亚洲生活在线观看| 91久久人澡人人添人人爽欧美| 在线亚洲人成电影网站色www| 在线视频国内自拍亚洲视频| 精品视频999| 欧美va亚洲va香蕉在线| 国产日韩av一区| 亚洲精品国产无套在线观| 亚洲123区在线观看| 国产一区二区三区免费观看| 国产a区久久久| 91精品91久久久中77777| 欧美三级蜜桃2在线观看| 精品国产免费一区二区三区四区 | 欧美国产综合一区二区| 一区二区三区四区不卡在线 | 亚洲欧洲另类国产综合| 亚洲精品第1页| 久久精品国产亚洲a| 粉嫩aⅴ一区二区三区四区 | 久久精品日韩一区二区三区| 中文字幕在线一区| 丝袜美腿一区二区三区| 国产美女一区二区三区| 在线观看视频欧美| 精品第一国产综合精品aⅴ| 亚洲人xxxx| 极品少妇一区二区| 欧美午夜精品久久久久久超碰| 欧美电视剧免费观看| 亚洲三级在线观看| 久久99热99| 欧美专区日韩专区| 久久这里只精品最新地址| 亚洲综合色在线| 国产成人综合视频| 欧美精品色一区二区三区| 国产日韩精品视频一区| 另类小说一区二区三区| 色综合久久久久久久久| 久久网这里都是精品| 天堂影院一区二区| 7777精品伊人久久久大香线蕉经典版下载| 久久综合狠狠综合久久激情 | 91精品福利在线一区二区三区 | 最新中文字幕一区二区三区| 奇米一区二区三区| 色诱亚洲精品久久久久久| 日本一区二区免费在线| 美女看a上一区| 欧美日韩国产综合视频在线观看| 国产精品你懂的在线| 加勒比av一区二区| 日韩三级精品电影久久久| 亚洲国产aⅴ天堂久久| 99精品欧美一区二区三区综合在线| 精品国产免费一区二区三区香蕉| 天堂成人免费av电影一区| 欧美性生活影院| 午夜伦欧美伦电影理论片| 99久久99久久久精品齐齐| 国产欧美视频在线观看| 韩国精品主播一区二区在线观看| 欧美天天综合网| 一区二区三区成人| 在线视频欧美区| 午夜电影一区二区三区| 欧美男男青年gay1069videost| 亚洲国产一二三| 欧美日韩一区二区在线观看视频 |