Scroll to navigation

XTextExtents(3X11) XLIB FUNCTIONS XTextExtents(3X11)

̾??

XTextExtents, XTextExtents16, XQueryTextExtents, XQueryTextExtents16 - ?ƥ????Ȥ??礭???η׻????䤤???碌???Ԥʤ?

????

XTextExtents(font_struct, string, nchars, direction_return, font_ascent_return,
font_descent_return, overall_return)
XFontStruct *font_struct;
char *string;
int nchars;
int *direction_return;
int *font_ascent_return, *font_descent_return;
XCharStruct *overall_return;

XTextExtents16(font_struct, string, nchars, direction_return, font_ascent_return,
font_descent_return, overall_return)
XFontStruct *font_struct;
XChar2b *string;
int nchars;
int *direction_return;
int *font_ascent_return, *font_descent_return;
XCharStruct *overall_return;

XQueryTextExtents(display, font_ID, string, nchars, direction_return, font_ascent_return,
font_descent_return, overall_return)
Display *display;
XID font_ID;
char *string;
int nchars;
int *direction_return;
int *font_ascent_return, *font_descent_return;
XCharStruct *overall_return;

XQueryTextExtents16(display, font_ID, string, nchars, direction_return, font_ascent_return,
font_descent_return, overall_return)
Display *display;
XID font_ID;
XChar2b *string;
int nchars;
int *direction_return;
int *font_ascent_return, *font_descent_return;
XCharStruct *overall_return;

??????

?????ҥ???(direction hint)???ͤ??֤????? (FontLeftToRight ?ޤ??? ZN FontRightToLeft )??
X ?????Фؤ???³?????ꤹ?롣
?ե?????ID???ե????Ȥ??ޤ? GC ?? ID ?????ꤹ?롣
?ե????Ȥ? ascent ?ͤ??֤????롣
?ե????Ȥ? descent ?ͤ??֤????롣
XFontStruct ??¤?Τ????ꤹ?롣
ʸ????????ʸ?????????ꤹ?롣
ʸ?????????ꤹ?롣
?????˻??ꤷ?? XCharStruct ??¤?Τ????ƤΥ????????????֤????롣

????

?ؿ? XTextExtents ?????? XTextExtents16 ?ϥ????????ǥ??????η׻????Ԥ??? ???ä? XQueryTextExtents ?? XQueryTextExtents16 ?????????ǡ????Τ????Ȥ??Υ????Хإåɤ??????Ǥ??롣 ?ɤ????δؿ??? XCharStruct ??¤?Τ??֤??????Υ????Ф??ͤϰʲ??Τ褦?????ꤵ???롣

ascent ?????Фϡ?ʸ???????γ?ʸ?? ascent ??ˡ?κ????ͤ????ꤵ???롣 descent ?????Ф? descent ??ˡ?κ????ͤ????ꤵ???롣 width ?????Фˤϡ?ʸ???????Τ??줾????ʸ??????????ˡ?????¤????ꤵ???롣 ʸ???????γ?ʸ?????Ф??ơ?W ??ʸ???????Ǥ???ʸ?????????ˤ???ʸ???????? ˡ?????¤Ȥ??롣 L ?Ϥ???ʸ???κ?¦bearing??ˡ?? W ???ä??????ΤȤ??롣 R ?Ϥ???ʸ???α?¦bearing??ˡ?? W ???ä??????ΤȤ??롣 lbearing ?????Фϡ?ʸ???????????Ƥ?ʸ???ˤĤ??Ƥ? L ?κǾ??ͤ????ꤵ?? ?롣 Ʊ???? rbearing ?? R ?κ????ͤ????ꤵ???롣

2?Х??Ȥι????????Υ????ǥå???(2-byte matrix indexing)?ǤϤʤ??????? ?????ǥå???(linear indexing)?????????줿?ե????ȤˤĤ??Ƥϡ??? XChar2b ??¤?Τ? byte1 ???Ǿ??̥Х??ȤǤ???16?ӥåȤο??Ȳ??ᤵ???롣 ?ե????Ȥ˥ǥե?????ʸ?????????????Ƥ??ʤ????硢ʸ????????̤????ʸ???? ??ˡ?????? 0 ?Ȥ??ư??????롣

?ؿ? XQueryTextExtents ?????? XQueryTextExtents16 ?ϡ????ꤷ???ե????Ȥ??뤤?ϻ??ꤷ??GC???ޤ??ե????Ȥ˴ؤ??ơ????ꤷ?? 8?ӥå?ʸ????????16?ӥå?ʸ????ʸ?????ΥХ????ǥ??󥰥ܥå??????֤??? ???????δؿ??? X ?????Ф??䤤???碌???Ԥ????ᡢ XTextExtents ?? XTextExtents16 ?Ǥϵ??????ʤ??????ФȤΤ??????꤬;ʬ?ʥ????ХإåɤȤʤ롣 ?ɤ????δؿ??? XCharStruct ???֤??????Υ????Фϰʲ??Τ褦???ͤ????ꤵ???롣

ascent ?????Фϡ?ʸ???????γ?ʸ?? ascent ??ˡ?κ????ͤ????ꤵ???롣 descent ?????Ф? descent ??ˡ?κ????ͤ????ꤵ???롣 width ?????Фˤϡ?ʸ???????γ?ʸ??????????ˡ?????¤????ꤵ???롣 ʸ???????γ?ʸ?????Ф??ơ?W ??ʸ???????Ǥ???ʸ?????????ˤ???ʸ??????ˡ ?????¤Ȥ??롣 L ?Ϥ???ʸ???κ?¦bearing??ˡ?? W ???ä??????ΤȤ??롣 R ?Ϥ???ʸ???α?¦bearing??ˡ?? W ???ä??????ΤȤ??롣 lbearing ?????Фϡ?ʸ???????????Ƥ?ʸ???ˤĤ??Ƥ? L ?κǾ??ͤ????ꤵ?? ?롣 Ʊ???? rbearing ?? R ?κ????ͤ????ꤵ???롣

2?Х??Ȥι????????Υ????ǥå????ǤϤʤ????????????ǥå????????????줿 ?ե????ȤˤĤ??Ƥϡ??? XChar2b ??¤?Τ? byte1 ???Ǿ??̥Х??ȤǤ???16?ӥåȤο??Ȳ??ᤵ???롣 ?ե????Ȥ˥ǥե?????ʸ?????????????Ƥ??ʤ????硢ʸ????????̤????ʸ???? ??ˡ?????? 0 ?Ȥ??ư??????롣

??ˡ?????? 0 ?Ǥ???ʸ????̵?뤵???롣 ?ե????Ȥ˥ǥե?????ʸ?????????????Ƥ??ʤ????硢ʸ????????̤????ʸ???? ̵?뤵???롣

XQueryTextExtents ?????? XQueryTextExtents16 ?ϥ??顼 BadFont ?? BadGC ?򵯤??????Ȥ????롣

?֤???

???????? Font ???뤤?? GC ???ͤ????????????Ƥ??? Font ???ؤ??Ƥ??ʤ???
?????? GC ???ͤ????????????Ƥ??? GC ???ؤ??Ƥ??ʤ???

??Ϣ????

XLoadFont(3X11), XTextWidth(3X11)
Xlib - C Language X Interface

Release 6.5 X Version 11