Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->系统管理 ->正文

GDK Reference Manual

来源:Linux-cn.com 作者:Webmaster 时间:2007-05-05 点击: [收藏] [投稿]


gdk_fontset_load ()
GdkFont*gdk_fontset_load(gchar *fontset_name); 

  Loads a fontset.

  Currently this function will always return a new font, however, in the future, it may be changed to look up the font in a cache. You should make no assumptions about the initial reference count.

  fontset_name : a comma-separated list of XLFDs describing the component fonts of the fontset to load.

  Returns : a GdkFont, or NULL if the fontset could not be loaded.


gdk_font_ref ()
GdkFont*gdk_font_ref(GdkFont *font); 

  Increase the reference count of a count by one.

  font : a GdkFont

  Returns : font


gdk_font_unref ()
voidgdk_font_unref(GdkFont *font); 

  Decrease the reference count of a count by one. If the result is zero, destroys the font.

  font : a GdkFont


gdk_font_id ()
gintgdk_font_id (const GdkFont *font); 

  Returns the X Font ID for the given font.

  font : a GdkFont.

  Returns : the numeric X Font ID


gdk_font_equal ()
gintgdk_font_equal(const GdkFont *fonta,const GdkFont *fontb); 

  Compares two fonts for equality. Single fonts compare equal if they have the same X font ID. This operation does not currently work correctly for fontsets.

  fonta : a GdkFont.

  fontb : another GdkFont.

  Returns : TRUE if the fonts are equal.


gdk_string_extents ()
voidgdk_string_extents(GdkFont *font,const gchar *string,gint *lbearing,
gint *rbearing,gint *width,gint *ascent,gint *descent); 

  Returns the metrics of a NULL-terminated string.

  font : a GdkFont.

  string : the NULL-terminated string to measure.

  lbearing : the left bearing of the string.

  rbearing : the right bearing of the string.

  width : the width of the string.

  ascent : the ascent of the string.

  descent : the descent of the string.


gdk_text_extents ()
voidgdk_text_extents(GdkFont *font,
const gchar *text,gint text_length,gint *lbearing,gint *rbearing,
gint *width,gint *ascent,gint *descent); 

  Returns the metrics of a string.

  font : a GdkFont

  text : the text to measure

  text_length : the length of the text in bytes. (If the font is a 16-bit font, this is twice the length of the text in characters.)

  lbearing : the left bearing of the string.

  rbearing : the right bearing of the string.

  width : the width of the string.

  ascent : the ascent of the string.

  descent : the descent of the string.


gdk_text_extents_wc ()
voidgdk_text_extents_wc (GdkFont *font,const GdkWChar *text,
gint text_length,gint *lbearing,gint *rbearing,
gint *width,gint *ascent,gint *descent); 

  Returns the metrics of a string of wide characters.

  font : a GdkFont

  text : the text to measure.

  text_length : the length of the text in character.

  lbearing : the left bearing of the string.

  rbearing : the right bearing of the string.

  width : the width of the string.

  ascent : the ascent of the string.

  descent : the descent of the string.


gdk_string_width ()
gintgdk_string_width(GdkFont *font,const gchar *string); 

  Determine the width of a NULL-terminated string. (The distance from the origin of the string to the point where the next string in a sequence of strings should be drawn)

  font : a GdkFont

  string : the NULL-terminated string to measure

  Returns : the width of the string in pixels.


gdk_text_width ()
gintgdk_text_width(GdkFont *font,const gchar *text,gint text_length); 


 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:GTK v1.2 Tutorial(英文)   下一篇:Java入门(12) 事件与错误处理

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章