xloadfont.html
来自「linux图形界面x liberary手册」· HTML 代码 · 共 96 行
HTML
96 行
<HTML><HEAD><TITLE>Xlib Programming Manual: XLoadFont</TITLE></HEAD><BODY><H1 ALIGN=center>XLoadFont</H1><H2>Syntax</H2><!.IN "XLoadFont" "" "@DEF@"><CODE><PRE><A HREF="">Font</A> XLoadFont(<B>display</B>, <B>name</B>) <A HREF="../../display/opening.html#Display">Display</A> *<B>display</B>; char *<B>name</B>;</PRE></CODE><H2>Arguments</H2><TABLE><TR><TD> <B>display</B><TD> Specifies the connection to the X server.<TR><TD> <B>name</B><TD> Specifies the name of the font,which is a null-terminated string.</TABLE><H2>Description</H2>The<B>XLoadFont()</B>function loads the specified font and returns its associated font ID.If the font name is not in the Host Portable Character Encoding,the result is implementation dependent.Use of uppercase or lowercase does not matter.When the characters ``?'' and ``*'' are used in a font name, apattern match is performed and any matching font is used.In the pattern, the ``?'' character will match any single character, and the ``*'' character will match any number of characters.A structured format for font names is specified in the X Consortium standard <B>X Logical Font Description Conventions</B>.If <B>XLoadFont()</B>was unsuccessful at loading the specified font, a <B>BadName</B>error results.Fonts are not associated with a particular screen and can be stored as a componentof any GC.When the font is no longer needed, call <B><A HREF="XUnloadFont.html">XUnloadFont()</A></B>.<P><B>XLoadFont()</B>can generate<B>BadAlloc</B>and<B>BadName</B> errors.<H2>Diagnostics</H2><TABLE><TR><TD><B>BadAlloc</B><TD> The server failed to allocate the requested source or server memory.<TR><TD><B>BadName</B><TD> A font or color of the specified name does not exist.</TABLE><H2>See also</H2><B><A HREF="../../GC/XCreateGC.html">XCreateGC()</A></B>,<B><A HREF="XFreeFont.html">XFreeFont()</A></B>,<B><A HREF="XGetFontProperty.html">XGetFontProperty()</A></B>,<B><A HREF="XListFonts.html">XListFonts()</A></B>,<B><A HREF="XLoadQueryFont.html">XLoadQueryFont()</A></B>,<B><A HREF="XQueryFont.html">XQueryFont()</A></B>,<B><A HREF="XSetFontPath.html">XSetFontPath()</A></B>,<B><A HREF="XUnloadFont.html">XUnloadFont()</A></B>,"<A HREF="fonts.html">Loading and Freeing Fonts</A>".<HR><ADDRESS><A HREF="http://tronche.com/">Christophe Tronche</A>, <A HREF="mailto:ch.tronche@computer.org">ch.tronche@computer.org</A></ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?