Scroll to navigation

XLoadFont(3X11) XLIB FUNCTIONS XLoadFont(3X11)

̾Á°

XLoadFont, XQueryFont, XLoadQueryFont, XFreeFont, XGetFontProperty, XUnloadFont, XCharStruct, XFontProp, XChar2b, XFontStruct - ¥Õ¥©¥ó¥È¤Î¥í¡¼¥É¤È¥¢¥ó¥í¡¼¥É¡¢¥Õ¥©¥ó¥ÈÀ£Ë¡¹½Â¤ÂÎ

½ñ¼°

Font XLoadFont(display, name)
Display *display;
char *name;

XFontStruct *XQueryFont(display, font_ID)
Display *display;
XID font_ID;

XFontStruct *XLoadQueryFont(display, name)
Display *display;
char *name;

XFreeFont(display, font_struct)
Display *display;
XFontStruct *font_struct;

Bool XGetFontProperty(font_struct, atom, value_return)
XFontStruct *font_struct;
Atom atom;
unsigned long *value_return;

XUnloadFont(display, font)
Display *display;
Font font;

°ú¤­¿ô

µá¤á¤ë¥×¥í¥Ñ¥Æ¥£Ì¾¤ËÂФ¹¤ë¥¢¥È¥à¤ò»ØÄê¡£
X ¥µ¡¼¥Ð¤Ø¤ÎÀܳ¤ò»ØÄê¡£
¥Õ¥©¥ó¥È¤ò»ØÄê¡£
¥Õ¥©¥ó¥È ID ¤« GContext ID ¤ò»ØÄê¡£
¥Õ¥©¥ó¥È¤ËÂбþ¤¹¤ë¹½Â¤ÂΤò»ØÄê¡£
GC ¤ò»ØÄê¡£
¥Õ¥©¥ó¥È¤Î̾Á°¤ò»ØÄê¡£ ¤³¤ì¤ÏNULL¤Ç½ª¤ëʸ»úÎó¤Ç¤¢¤ë¡£
¥Õ¥©¥ó¥È¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ¬ÊÖ¤µ¤ì¤ë¡£

ÀâÌÀ

´Ø¿ô XLoadFont ¤Ï»ØÄꤷ¤¿¥Õ¥©¥ó¥È¤ò¥í¡¼¥É¤·¡¢Âбþ¤¹¤ë¥Õ¥©¥ó¥ÈID¤òÊÖ¤¹¡£ ¥Õ¥©¥ó¥È̾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤¬¥Û¥¹¥È¥Ý¡¼¥¿¥Ö¥ëʸ»ú¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ç¤Ê ¤¤¾ì¹ç¡¢¼Â¹Ô·ë²Ì¤Ï¼ÂÁõ°Í¸¤Ç¤¢¤ë¡£ Âçʸ»ú¤ä¾®Ê¸»ú¤Î»ÈÍѤÏÌäÂê¤Ê¤¤¡£ ¥Õ¥©¥ó¥È̾¤Ëʸ»ú ``?'' ¤ä ``*'' ¤¬ÍѤ¤¤é¤ì¤¿»þ¡¢¥Ñ¥¿¡¼¥ó¥Þ¥Ã¥Á¥ó¥°¤¬¹Ô ¤ï¤ì¥Þ¥Ã¥Á¤·¤¿¥Õ¥©¥ó¥È¤Î¤É¤ì¤«¤¬»ÈÍѤµ¤ì¤ë¡£ ¥Ñ¥¿¡¼¥óÃæ¤Çʸ»ú ``?'' ¤ÏǤ°Õ¤Î1ʸ»ú¤Ë¥Þ¥Ã¥Á¤·¡¢Ê¸»ú ``*'' ¤ÏǤ°Õ¤Î¿ô ¤Îʸ»ú¤Ë¥Þ¥Ã¥Á¤¹¤ë¡£ ¥Õ¥©¥ó¥È̾¤Î¹½Â¤²½¥Õ¥©¡¼¥Þ¥Ã¥È¤ÏX¥³¥ó¥½¡¼¥·¥¢¥àɸ½à¤Î X Logical Font Description Conventions ¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ë¡£ XLoadFont ¤¬»ØÄꤷ¤¿¥Õ¥©¥ó¥È¤Î¥í¡¼¥É¤Ë¼ºÇÔ¤·¤¿¾ì¹ç¡¢¥¨¥é¡¼ BadName ¤¬µ¯¤³¤ë¡£ ¥Õ¥©¥ó¥È¤ÏÆÃÄê¤Î¥¹¥¯¥ê¡¼¥ó¤Ë´ØÏ¢¤Å¤±¤µ¤ì¤Ê¤¤¡£°ìÊý¡¢Ç¤°Õ¤Î GC ¤Î¥³¥ó¥Ý¡¼ ¥Í¥ó¥È¤È¤·¤Æ³ÊǼ¤¹¤ë¤³¤È¤Ï¤Ç¤­¤ë¡£ ¥Õ¥©¥ó¥È¤¬ÉÔÍפˤʤ俾ì¹ç¤Ï XUnloadFont ¤ò¸Æ¤Ó½Ð¤¹¤³¤È¡£

XLoadFont ¤Ï¥¨¥é¡¼ BadAlloc, BadName ¤òµ¯¤³¤¹¤³¤È¤¬¤¢¤ë¡£

XQueryFont ´Ø¿ô¤Ï XFontStruct ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£ ¤³¤Î¹½Â¤ÂΤϥե©¥ó¥È¤Ë´ØÏ¢¤¹¤ë¾ðÊó¤ò»ý¤Ã¤Æ¤¤¤ë¡£ ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥Õ¥©¥ó¥È¤äGC¤Ë³ÊǼ¤µ¤ì¤Æ¤¤¤ë¥Õ¥©¥ó¥È¤òÌ䤤¹ç¤ï¤»¤ë¤³¤È¤¬ ¤Ç¤­¤ë¡£ XFontStruct ¹½Â¤ÂΤ˴ޤޤì¤ë¥Õ¥©¥ó¥ÈID¤Ï GContext ¤ÎID¤Ç¤¢¤ê¡¢Â¾¤Î´Ø¿ô¤Ç¤³¤Î GC ¤ò»È¤¦¤È¤­¤Ë¤ÏÃí°Õ¤¹¤ëɬÍפ¬¤¢¤ë( XGContextFromGC ¤ò»²¾È)¡£ ¥Õ¥©¥ó¥È¤¬Â¸ºß¤·¤Ê¤±¤ì¤Ð XQueryFont ¤Ï NULL ¤òÊÖ¤¹¡£ ¤³¤Î¥Ç¡¼¥¿¤ò²òÊü¤¹¤ë¤Ë¤Ï XFreeFontInfo ¤ò»ÈÍѤ¹¤ë¤³¤È¡£

XLoadQueryFont ¤Ï¥¨¥é¡¼ BadAlloc ¤òµ¯¤³¤¹¤³¤È¤¬¤¢¤ë¡£

´Ø¿ô XLoadQueryFont ¤Ï¥Õ¥©¥ó¥È¤Ë¥¢¥¯¥»¥¹¤¹¤ë¼êÃʤΤ¦¤Á¡¢ºÇ¤â°ìÈÌŪ¤Ê¤â¤Î¤Ç¤¢¤ë¡£ XLoadQueryFont ¤Ï»ØÄꤷ¤¿¥Õ¥©¥ó¥È¤ò¥ª¡¼¥×¥ó(¥í¡¼¥É)¤·¡¢Å¬ÀÚ¤Ê XFontStruct ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£ ¥Õ¥©¥ó¥È̾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤¬¥Û¥¹¥È¥Ý¡¼¥¿¥Ö¥ëʸ»ú¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ç¤Ê ¤¤¾ì¹ç¡¢¼Â¹Ô·ë²Ì¤Ï¼ÂÁõ°Í¸¤Ç¤¢¤ë¡£ ¥Õ¥©¥ó¥È¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç XLoadQueryFont ¤Ï NULL ¤òÊÖ¤¹¡£

´Ø¿ô XFreeFont ¤Ï¥Õ¥©¥ó¥È¤Î¥ê¥½¡¼¥¹ID¤È»ØÄꤷ¤¿¥Õ¥©¥ó¥È¤Î´ØÏ¢¤òºï½ü¤·¡¢ XFontStruct ¹½Â¤ÂΤò²òÊü¤¹¤ë¡£ ¥Õ¥©¥ó¥È¤½¤Î¤â¤Î¤Ï¾¤Î¥ê¥½¡¼¥¹¤«¤é»²¾È¤µ¤ì¤Ê¤¯¤Ê¤Ã¤¿¤È¤­¤Ë²òÊü¤µ¤ì¤ë¡£ ¤³¤Î¥Ç¡¼¥¿¤È¥Õ¥©¥ó¥È¤ÏºÆ¤Ó»²¾È¤·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£

XFreeFont ¤Ï¥¨¥é¡¼ BadFont ¤òµ¯¤³¤¹¤³¤È¤¬¤¢¤ë¡£

¥×¥í¥Ñ¥Æ¥£¤ËÂФ¹¤ë¥¢¥È¥à¤òÍ¿¤¨¤ë¤È¡¢ XGetFontProperty ¤Ï»ØÄꤷ¤¿¥Õ¥©¥ó¥È¥×¥í¥Ñ¥Æ¥£¤ÎÃͤòÊÖ¤¹¡£ XGetFontProperty ¤Ï¥×¥í¥Ñ¥Æ¥£¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð False ¤òÊÖ¤·¡¢ÄêµÁ¤µ¤ì¤Æ¤¤¤ì¤Ð True ¤òÊÖ¤¹¡£ ¥Õ¥©¥ó¥È¥×¥í¥Ñ¥Æ¥£¤È¤·¤Æͽ¤áÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥¢¥È¥à¤¬¤¢¤ê¡¢¤³¤ì¤Ï <X11/Xatom.h> ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£ ¤³¤ì¤é¤Î¥¢¥È¥à¤Ë¤Ï¥Õ¥©¥ó¥È¤Ë´ØÏ¢¤¹¤ëɸ½àŪ¤Ê¥×¥í¥Ñ¥Æ¥£¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¡£ ÊݾڤϤµ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢Í½¤áÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥Õ¥©¥ó¥È¥×¥í¥Ñ¥Æ¥£¤Ï¤¿¤¤¤Æ¤¤Â¸ ºß¤¹¤ë¡£

´Ø¿ô XUnloadFont ¤Ï¥Õ¥©¥ó¥È¥ê¥½¡¼¥¹ID¤È»ØÄꤷ¤¿¥Õ¥©¥ó¥È¤Î´ØÏ¢¤òºï½ü¤¹¤ë¡£ ¥Õ¥©¥ó¥È¤½¤Î¤â¤Î¤Ï¾¤Î¥ê¥½¡¼¥¹¤«¤é»²¾È¤µ¤ì¤Ê¤¯¤Ê¤Ã¤¿¤È¤­¤Ë²òÊü¤µ¤ì¤ë¡£ ¤³¤Î¥Õ¥©¥ó¥È¤òºÆ¤Ó»²¾È¤·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£

XUnloadFont ¤Ï¥¨¥é¡¼ BadFont ¤òµ¯¤³¤¹¤³¤È¤¬¤¢¤ë¡£

¹½Â¤ÂÎ

XFontStruct ¹½Â¤ÂΤˤϥե©¥ó¥È¤Î¾ðÊó¤¬Á´¤Æ´Þ¤Þ¤ì¤ë¡£¤³¤Î¹½Â¤ÂΤϡ¢¥Õ¥©¥ó¥È¸ÇÍ­¤Î¾ð Êó¤ä XCharStruct ¹½Â¤ÂÎ(¥Õ¥©¥ó¥È¤Ë´Þ¤Þ¤ì¤ëʸ»ú¤Î¾ðÊó)¤ÎÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤«¤é¹½À®¤µ¤ì¤Æ¤¤ ¤ë¡£ XFontStruct, XFontProp, XCharStruct ¤Î³Æ¹½Â¤ÂΤÎÆâÍƤò°Ê²¼¤Ë¼¨¤¹¡£

typedef struct {
	short lbearing;	
	short rbearing;	
	short width;	
	short ascent;	
	short descent;	
	unsigned short attributes;	
} XCharStruct;


typedef struct {
	Atom	name;
	unsigned long card32;
} XFontProp;


typedef struct {	

unsigned char byte1;
unsigned char byte2; } XChar2b;

typedef struct {
	XExtData *ext_data;	
	Font fid;	
	unsigned direction;	
	unsigned min_char_or_byte2;	
	unsigned max_char_or_byte2;	
	unsigned min_byte1;	
	unsigned max_byte1;	
	Bool all_chars_exist;	
	unsigned default_char;	
	int n_properties;	
	XFontProp *properties;	
	XCharStruct min_bounds;	
	XCharStruct max_bounds;	
	XCharStruct *per_char;	
	int ascent;	
	int descent;	
} XFontStruct;


X ¤Ï 1¥Ð¥¤¥È/ʸ»ú¤Î·Á¼°¡¢2¥Ð¥¤¥È/ʸ»ú¤Î¹ÔÎó·Á¼°¤È¡¢16¥Ó¥Ã¥Èʸ»ú·Á¼°¤Î ¥Æ¥­¥¹¥ÈÁàºî¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£ ¤¢¤ë¥Õ¥©¥ó¥È¤Ï¤³¤ì¤é¤Î·Á¼°¤Î¤¤¤º¤ì¤Ç¤â»ÈÍѤǤ­¤ë¤¬¡¢1¥Ð¥¤¥È/ʸ»ú¤Î¥Æ¥­ ¥¹¥È¤Î¥ê¥¯¥¨¥¹¥È¤À¤±¤¬Ã±ÆȤΥХ¤¥È(¤Ä¤Þ¤ê¡¢2¥Ð¥¤¥È¥Õ¥©¥ó¥È¤ÎºÇ½é¤ÎÎó) ¤ò»ØÄê¤Ç¤­¤ë¡£ 2¥Ð¥¤¥È¥Õ¥©¥ó¥È¤ÏÄêµÁ¤µ¤ì¤¿Ê¸»ú¤Î2¼¡¸µ¹ÔÎó¤È¤·¤Æ¸«¤ë¤Ù¤­¤Ç¤¢¤ë¡£ byte1 ¤Ï¥Õ¥©¥ó¥È¤ÎÄêµÁ¤µ¤ì¤¿Îó¤ÎÈϰϤò»ØÄꤷ¡¢byte2 ¤ÏÄêµÁ¤µ¤ì¤¿¹Ô¤ÎÈÏ °Ï¤òÄêµÁ¤¹¤ë¡£ 1¥Ð¥¤¥È/ʸ»ú¤Î¥Õ¥©¥ó¥È¤ÏÎó¤¬1¤ÄÄêµÁ¤µ¤ì¤Æ¤ª¤ê¡¢¹½Â¤ÂΤÇÄêµÁ¤µ¤ì¤¿ byte2 ¤Ïʸ»ú¤ÎÈϰϤòÄêµÁ¤¹¤ë¡£

ʸ»ú¤Î¥Ð¥¦¥ó¥Ç¥£¥ó¥°¥Ü¥Ã¥¯¥¹¤Ïʸ»ú¤Î XCharStruct ¤Ë¤è¤Ã¤ÆÄêµÁ¤µ¤ì¤ë¡£ ¥Õ¥©¥ó¥È¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤Ê¸»ú¤¬¤¢¤ë¤È¤­¤Ë¤Ï¥Ç¥Õ¥©¥ë¥Èʸ»ú¤¬»ÈÍѤµ¤ì¤ë¡£ ¥Õ¥©¥ó¥È¤ÎÁ´¤Æ¤Îʸ»ú¤Î¥µ¥¤¥º¤¬Æ±¤¸¤Ç¤¢¤ë¤È¤­¡¢ XFontStruct ¹½Â¤ÂΤΠmin_bounds ¤È max_bounds ¤Î¾ðÊó¤À¤±¤¬»ÈÍѤµ¤ì¤ë¡£

XFontStruct ¤Î¥á¥ó¥Ð¤Ï°Ê²¼¤Î°ÕÌ£¤ò»ý¤Ä¡£

  • direction ¥á¥ó¥Ð¤Ï FontLeftToRight ¤« FontRightToLeft ¤ÎÃͤò»ý¤Ä¡£ ¤³¤ì¤Ï¡¢ XCharStruct Í×ÁǤÎÂçÉôʬ¤¬¡¢Àµ (FontLeftToRight) ¤¢¤ë¤¤¤ÏÉé (FontRightToLeft) ¤Îʸ»úÉý¤ò»ý¤Ã¤Æ¤¤¤ë¤³¤È¤ò¼¨¤¹Ã±¤Ê¤ë¥Ò¥ó¥È¤Ë²á¤®¤Ê¤¤¡£ ¥³¥¢¥×¥í¥È¥³¥ë¤Ç¤Ï½Ä½ñ¤­¥Æ¥­¥¹¥È¤Î¥µ¥Ý¡¼¥È¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
  • min_byte1 ¤È max_byte1 ¥á¥ó¥Ð¤¬¤¤¤º¤ì¤â 0 ¤Ç¤¢¤ì¤Ð¡¢min_char_or_byte2 ¤Ï per_char ÇÛÎó¤ÎºÇ½é¤ÎÍ×ÁǤËÂбþ¤¹¤ëÀþ·Áʸ»ú¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»ØÄꤷ¡¢ max_char_or_byte2 ¤ÏºÇ¸å¤ÎÍ×ÁǤÎÀþ·Áʸ»ú¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»ØÄꤹ¤ë¡£
min_byte1 ¤« max_byte1 ¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢min_char_or_byte2 ¤È max_char_or_byte2 ¤Ï256̤Ëþ¤Ç¤¢¤ê¡¢per_char ÇÛÎóÍ×ÁÇ N(0¤«¤é¿ô¤¨¤ë)¤Ë Âбþ¤¹¤ë2¥Ð¥¤¥Èʸ»ú¥¤¥ó¥Ç¥Ã¥¯¥¹Ãͤϰʲ¼¤Î¤è¤¦¤Ë¤Ê¤ë¡£
	byte1 = N/D + min_byte1

byte2 = N\D + min_char_or_byte2

    where:

D = max_char_or_byte2 - min_char_or_byte2 + 1
/ = À°¿ô¤Î¾¦
\ = À°¿ô¤Î¾ê;
  • per_char ¥Ý¥¤¥ó¥¿¤¬ NULL ¤Ç¤¢¤ì¤Ð¡¢ºÇ½é¤ÈºÇ¸å¤Îʸ»ú¥¤¥ó¥Ç¥Ã¥¯¥¹¤Î´Ö¤Î ¥°¥ê¥Õ¤ÏÁ´¤ÆƱ¤¸¾ðÊó¤ò»ý¤Ä¡£¤³¤ì¤Ï min_bounds ¤È max_bounds ¤ÇÍ¿¤¨¤é¤ì ¤ë¡£
  • all_chars_exist ¤¬ True ¤Î¾ì¹ç¡¢per_char ÇÛÎóÆâ¤ÎÁ´¤Æ¤Îʸ»ú¤Ï 0 ¤Ç¤Ê¤¤¥Ð¥¦¥ó¥Ç¥£¥ó¥°¥Ü¥Ã¥¯¥¹ ¤ò»ý¤Ä¡£
  • default_char ¥á¥ó¥Ð¤Ï¡¢Ì¤ÄêµÁ¤Îʸ»ú¤ä¸ºß¤·¤Ê¤¤Ê¸»ú¤òɽ¼¨¤¹¤ë¤È¤­¤ËÍÑ ¤¤¤é¤ì¤ëʸ»ú¤ò»ØÄꤹ¤ë¡£ default_char ¤Ï(2¥Ð¥¤¥Èʸ»ú¤Ç¤Ï¤Ê¤¯)16¥Ó¥Ã¥Èʸ»ú¤Ç¤¢¤ë¡£ 2¥Ð¥¤¥È¹ÔÎó·Á¼°¤ò»È¤¦¥Õ¥©¥ó¥È¤Î¾ì¹ç¡¢default_char ¤Ï byte1 ¤òºÇ¾å°Ì¥Ð ¥¤¥È¡¢byte2 ¤òºÇ²¼°Ì¥Ð¥¤¥È¤È¤¹¤ë¡£ default_char ¼«¿È¤¬Ì¤ÄêµÁ¤¢¤ë¤¤¤Ï¸ºß¤·¤Ê¤¤Ê¸»ú¤ò»ØÄꤷ¤¿¾ì¹ç¤Ë¤Ï¡¢Ì¤ ÄêµÁ¤¢¤ë¤¤¤Ï¸ºß¤·¤Ê¤¤Ê¸»ú¤Îɽ¼¨¤Ï¹Ô¤ï¤ì¤Ê¤¤¡£
  • min_bounds ¤È max_bounds ¥á¥ó¥Ð¤Ï¡¢¤³¤ÎÇÛÎó¤ÎÁ´¤Æ¤ÎÍ×ÁǤ½¤ì¤¾¤ì(¸ºß¤· ¤Ê¤¤Ê¸»ú¤Ï½ü¤¯)¤Î XCharStruct Í×ÁǤκÇÂçÃÍ¡¢ºÇ¾®Ãͤò»ý¤Ä¡£ ¥Õ¥©¥ó¥È¤Î¥Ð¥¦¥ó¥Ç¥£¥ó¥°¥Ü¥Ã¥¯¥¹(Á´¤Æ¤Îʸ»ú¤òƱ¤¸¸¶ÅÀ¤ËÃÖ¤¤¤Æ½Å¤Í¹ç¤ï ¤»¡¢ÆÀ¤é¤ì¤¿·Á¾õ¤ò°Ï¤àºÇ¾¯¤ÎĹÊý·Á)¤Îº¸¾å¤ÎºÂɸ¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ë:
    	[x + min_bounds.lbearing, y - max_bounds.ascent]
    

Éý¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ë:
	max_bounds.rbearing - min_bounds.lbearing


¹â¤µ¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ë:
	max_bounds.ascent + max_bounds.descent


  • ascent ¥á¥ó¥Ð¤Ï¡¢¥Ù¡¼¥¹¥é¥¤¥ó¾åÉô¤Î¥Õ¥©¥ó¥È¤ÎÏÀÍýŪ¤Ê¹­¤µ¤Ç¡¢¹Ô´Ö¤ò·è Äꤹ¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£ ÆÃÄê¤Îʸ»ú¤Ï¤³¤ì¤ò±Û¤¨¤ë¤³¤È¤¬¤¢¤ë¡£
  • descent ¥á¥ó¥Ð¤Ï¡¢¥Ù¡¼¥¹¥é¥¤¥ó²¼Éô¤Î¥Õ¥©¥ó¥È¤ÎÏÀÍýŪ¤Ê¹­¤µ¤Ç¡¢¹Ô´Ö¤ò·è Äꤹ¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë(0¤Î¤³¤È¤â¤¢¤ë)¡£ ÆÃÄê¤Îʸ»ú¤Ï¤³¤ì¤ò±Û¤¨¤ë¤³¤È¤¬¤¢¤ë¡£
  • ¥Ù¡¼¥¹¥é¥¤¥ó¤¬ YºÂɸ y ¤Ë¤¢¤ë¤È¤­¡¢¥Õ¥©¥ó¥È¤ÎÏÀÍýŪ¤Ê¹­¤µ¤Ï Y ºÂɸ (y - font.ascent) ¤È (y + font.descent - 1) ¤ÎÆ⦤Ǥ¢¤ë¡£ Ä̾ï¤Ï¥Æ¥­¥¹¥È¤Î¹Ô´Ö¤ÎºÇ¾¯¤ÎÁ÷¤êÎÌ¤Ï ascent + descent ¤ÇÍ¿¤¨¤é¤ì¤ë¡£

¸¶ÅÀ¤¬[x, y]¤Ë¤¢¤ëʸ»ú¤Ë¤Ä¤¤¤Æ¡¢ XCharStruct ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÍѤ¤¤Æµ­½Ò¤µ¤ì¤ë¡¢Ê¸»ú¤Î¥Ð¥¦¥ó¥Ç¥£¥ó¥°¥Ü¥Ã¥¯¥¹(¤Ä¤Þ¤ê ʸ»ú¤Î·Á¤ò°Ï¤àºÇ¾®¤ÎĹÊý·Á)¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¤Ê¤ë:

[x + lbearing, y - ascent]


Éý¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ë:

rbearing - lbearing


¹â¤µ¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ë:

ascent + descent


ÎÙ¤Îʸ»ú¤Î¸¶ÅÀ¤Ï¼¡¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤ë:

[x + width, y]


lbearing ¥á¥ó¥Ð¤Ï¸¶ÅÀ¤«¤éʸ»ú¤¬¼ÂºÝ¤ËÉÁ²è¤µ¤ì¤ëÉôʬ¤Îº¸Ã¼¤Þ¤Ç¤ÎÂ礭¤µ ¤òÄêµÁ¤¹¤ë¡£ rbearing ¥á¥ó¥Ð¤Ï¸¶ÅÀ¤«¤éʸ»ú¤¬¼ÂºÝ¤ËÉÁ²è¤µ¤ì¤ëÉôʬ¤Î±¦Ã¼¤Þ¤Ç¤ÎÂ礭¤µ ¤òÄêµÁ¤¹¤ë¡£ ascent ¥á¥ó¥Ð¤Ï¸¶ÅÀ¤«¤éʸ»ú¤¬¼ÂºÝ¤ËÉÁ²è¤µ¤ì¤ëÉôʬ¤Î¾åü¤Þ¤Ç¤ÎÂ礭¤µ¤ò ÄêµÁ¤¹¤ë¡£ descent ¥á¥ó¥Ð¤Ï¸¶ÅÀ¤«¤éʸ»ú¤¬¼ÂºÝ¤ËÉÁ²è¤µ¤ì¤ëÉôʬ¤Î²¼Ã¼¤Þ¤Ç¤ÎÂ礭¤µ¤ò ÄêµÁ¤¹¤ë¡£ width ¥á¥ó¥Ð¤Ïʸ»ú¤ÎÏÀÍýŪ¤ÊÉý¤òÄêµÁ¤¹¤ë¡£

ÊÖ¤êÃÍ

Í׵ᤵ¤ì¤¿¥ê¥½¡¼¥¹¤«¥µ¡¼¥Ð¥á¥â¥ê¤Î³ä¤êÅö¤Æ¤Ë¥µ¡¼¥Ð¤¬¼ºÇÔ¤·¤¿¡£
°ú¤­¿ô Font ¤« GContext ¤ÎÃͤ¬¡¢ÄêµÁ¤µ¤ì¤Æ¤¤¤ë Font ¤ò»Ø¤·¤Æ¤¤¤Ê¤¤¡£
»ØÄꤷ¤¿¥Õ¥©¥ó¥È¤ä¿§¤Î̾Á°¤¬Â¸ºß¤·¤Ê¤¤¡£

´ØÏ¢¹àÌÜ

XCreateGC(3X11), XListFonts(3X11), XSetFontPath(3X11)
Xlib - C Language X Interface

Release 6.5 X Version 11