1<?xml version="1.0" encoding="UTF-8" ?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3                   "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
4[
5<!ENTITY % defs SYSTEM "defs.ent"> %defs;
6]>
7
8
9<book id="xlfd">
10
11<bookinfo>
12   <title>X Logical Font Description Conventions</title>
13   <subtitle>X Consortium Standard</subtitle>
14   <authorgroup>
15      <author>
16         <firstname>Jim</firstname><surname>Flowers</surname>
17         <affiliation><orgname>Digital Equipment Corporation</orgname></affiliation>
18      </author>
19      <editor>
20         <firstname>Stephen </firstname><surname>Gildea</surname>
21         <affiliation><orgname>X Consortium</orgname></affiliation>
22      </editor>
23   </authorgroup>
24   <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
25   <releaseinfo>Version 1.5</releaseinfo>
26   <copyright><year>1988</year><year>1994</year><holder>X Consortium</holder></copyright>
27
28<legalnotice>
29<para>
30Permission is hereby granted, free of charge, to any person obtaining
31a copy of this software and associated documentation files (the
32"Software"), to deal in the Software without restriction, including
33without limitation the rights to use, copy, modify, merge, publish,
34distribute, sublicense, and/or sell copies of the Software, and to
35permit persons to whom the Software is furnished to do so, subject to
36the following conditions:
37</para>
38<para>
39The above copyright notice and this permission notice shall be included
40in all copies or substantial portions of the Software.
41</para>
42<para>
43THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS
44OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
46IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
47OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
48ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
49OTHER DEALINGS IN THE SOFTWARE.
50</para>
51<para>
52Except as contained in this notice, the name of the X Consortium shall
53not be used in advertising or otherwise to promote the sale, use or
54other dealings in this Software without prior written authorization
55from the X Consortium.
56</para>
57<para>X Window System is a trademark of The Open Group.</para>
58</legalnotice>
59
60<legalnotice>
61<para role="multiLicensing">
62Copyright &copy; 1988, 1989
63Digital Equipment Corporation, Maynard MA.  All rights reserved.
64</para>
65<para>
66Permission to use, copy, modify, and distribute this documentation
67for any purpose and without fee is hereby granted, provided
68that the above copyright notice and this permission
69notice appear in all copies.
70Digital Equipment Corporation makes no representations
71about the
72suitability for any purpose of the information in this document.
73This documentation is provided as is without express or implied warranty.
74</para>
75
76</legalnotice>
77
78
79<legalnotice>
80<para>
81Helvetica and Times are registered trademarks of Linotype Company.
82</para>
83<para>
84ITC Avant Garde Gothic is a registered trademark of International
85Typeface Corporation.
86</para>
87<para>
88Times Roman is a registered trademark of Monotype Corporation.
89</para>
90<para>
91Bitstream Amerigo is a registered trademark of Bitstream Inc.
92</para>
93<para>
94Stone is a registered trademark of Adobe Systems Inc.
95</para>
96</legalnotice>
97
98
99</bookinfo>
100<chapter id='Introduction'>
101<title>Introduction</title>
102<!-- .XS -->
103<!-- (SN Introduction -->
104<!-- .XE -->
105<para>
106It is a requirement that X client applications must be portable across server
107implementations, with very different file systems, naming conventions, and
108font libraries.
109However, font access requests,
110as defined by the <emphasis remap='I'>X Window System Protocol</emphasis>,
111neither specify server-independent conventions for font names
112nor provide adequate font properties for logically describing typographic fonts.
113</para>
114<para>
115X clients must be able to dynamically determine the fonts available
116on any given server so that understandable information can be presented
117to the user or so that intelligent font fallbacks can be chosen.
118It is desirable for the most common queries to be accomplished
119without the overhead of opening each font and inspecting font properties,
120by means of simple
121<function>ListFonts</function>
122requests.
123For example, if a user selected a Helvetica typeface family,
124a client application should be able to query the server
125for all Helvetica fonts and present only those setwidths, weights, slants,
126point sizes, and character sets available for that family.
127</para>
128<para>
129This document gives a standard logical font description
130(hereafter referred to as XLFD) and the conventions to be used
131in the core protocol so that clients can query and access screen type libraries
132in a consistent manner across all X servers.
133In addition to completely specifying a given font by means of its
134<function>FontName</function>,
135the XLFD also provides for a standard set of key
136<function>FontProperties</function>
137that describe the font in more detail.
138</para>
139<para>
140<!-- .LP -->
141The XLFD provides an adequate set of typographic font properties,
142such as CAP_HEIGHT, X_HEIGHT,
143and RELATIVE_SETWIDTH,
144for publishing and other applications to do intelligent font matching
145or substitution when handling documents created on some foreign server
146that use potentially unknown fonts.
147In addition,
148this information is required by certain clients
149to position subscripts automatically and determine small capital heights,
150recommended leading, word-space values, and so on.
151</para>
152</chapter>
153
154<chapter id='Requirements_and_Goals'>
155<title>Requirements and Goals</title>
156<!-- .XS -->
157<!-- (SN Requirements and Goals -->
158<!-- .XE -->
159<para>
160The XLFD meets the short-term and long-term goals to have a
161standard logical font description that:
162</para>
163<itemizedlist>
164  <listitem>
165    <para>
166Provides unique, descriptive font names that support simple pattern
167matching
168    </para>
169  </listitem>
170  <listitem>
171    <para>
172Supports multiple font vendors, arbitrary character sets, and encodings
173    </para>
174  </listitem>
175  <listitem>
176    <para>
177Supports naming and instancing of scalable and polymorphic fonts
178    </para>
179  </listitem>
180  <listitem>
181    <para>
182Supports transformations and subsetting of fonts
183    </para>
184  </listitem>
185  <listitem>
186    <para>
187Is independent of X server and operating or file system implementations
188    </para>
189  </listitem>
190  <listitem>
191    <para>
192Supports arbitrarily complex font matching or substitution
193    </para>
194  </listitem>
195  <listitem>
196    <para>
197Is extensible
198    </para>
199  </listitem>
200</itemizedlist>
201
202<sect1 id='Provide_Unique_and_Descriptive_Font_Names'>
203<title>Provide Unique and Descriptive Font Names</title>
204<!-- .XS -->
205<!-- (SN Provide Unique and Descriptive Font Names -->
206<!-- .XE -->
207<para>
208It should be possible to have font names that are long enough and
209descriptive enough to have a reasonable probability of being unique
210without inventing a new registration organization.
211Resolution and size-dependent font masters, multivendor font libraries,
212and so on must be anticipated and handled by the font name alone.
213</para>
214<para>
215<!-- .LP -->
216The name itself should be structured to be amenable to simple pattern
217matching and parsing, thus allowing X clients to restrict font queries to
218some subset of all possible fonts in the server.
219</para>
220</sect1>
221
222<sect1 id='Support_Multiple_Font_Vendors_and_Character_Sets'>
223<title>Support Multiple Font Vendors and Character Sets</title>
224<!-- .XS -->
225<!-- (SN Support Multiple Font Vendors and Character Sets -->
226<!-- .XE -->
227<para>
228<!-- .LP -->
229The font name and properties should distinguish between fonts
230that were supplied by different font vendors
231but that possibly share the same name.
232We anticipate a highly competitive font market where users will be able to
233buy fonts from many sources according to their particular requirements.
234</para>
235<para>
236<!-- .LP -->
237A number of font vendors deliver each font with all glyphs designed for that
238font, where charset mappings are defined by encoding vectors.
239Some server implementations may force these mappings to proprietary
240or standard charsets statically in the font data.
241Others may desire to perform the mapping dynamically in the server.
242Provisions must be made in the font name
243that allows a font request to specify or identify specific charset mappings
244in server environments where multiple charsets are supported.
245</para>
246</sect1>
247
248<sect1 id='Support_Scalable_and_Polymorphic_Fonts'>
249<title>Support Scalable and Polymorphic Fonts</title>
250<!-- .XS -->
251<!-- (SN Support Scalable and Polymorphic Fonts -->
252<!-- .XE -->
253<para>
254<!-- .LP -->
255If a font source can be scaled to an arbitrary size or varied in other
256ways, it should be possible for an application to determine
257that fact from the font name, and the
258application should be able to construct a font name for any specific
259instance.
260</para>
261</sect1>
262
263<sect1 id='Support_Transformations_and_Subsetting_of_Fonts'>
264<title>Support Transformations and Subsetting of Fonts</title>
265<!-- .XS -->
266<!-- (SN Support Transformations and Subsetting of Fonts -->
267<!-- .XE -->
268<para>
269<!-- .LP -->
270Arbitrary two-dimensional linear transformations of fonts should be
271able to be requested by applications.  Since such transformed fonts
272may be used for special effects requiring a few characters from each
273of many differently transformed fonts, it should be possible to
274request only a few characters from a font for efficiency.
275</para>
276</sect1>
277
278<sect1 id='Be_Independent_of_X_Server_and_Operating_or_File_System_Implementations'>
279<title>Be Independent of X Server and Operating or File System Implementations</title>
280<!-- .XS -->
281<!-- (SN Be Independent of X Server and Operating or File System Implementations -->
282<!-- .XE -->
283<para>
284<!-- .LP -->
285X client applications that require a particular font should be able to use
286the descriptive name without knowledge of the file system or other
287repository in use by the server.
288However,
289it should be possible for servers to translate a given font name
290into a file name syntax that it knows how to deal with,
291without compromising the uniqueness of the font name.
292This algorithm should be reversible (exactly how this translation is done is
293implementation dependent).
294</para>
295</sect1>
296
297<sect1 id='Support_Arbitrarily_Complex_Font_Matching_and_Substitution'>
298<title>Support Arbitrarily Complex Font Matching and Substitution</title>
299<!-- .XS -->
300<!-- (SN Support Arbitrarily Complex Font Matching and Substitution -->
301<!-- .XE -->
302<para>
303<!-- .LP -->
304In addition to the font name,
305the XLFD should define a standard list of descriptive font properties,
306with agreed-upon fallbacks for all fonts.
307This allows client applications to derive font-specific formatting
308or display data and to perform font matching or substitution
309when asked to handle potentially unknown fonts, as required.
310</para>
311</sect1>
312
313<sect1 id='Be_Extensible'>
314<title>Be Extensible</title>
315<!-- .XS -->
316<!-- (SN Be Extensible -->
317<!-- .XE -->
318<para>
319<!-- .LP -->
320The XLFD must be extensible so that new and/or private descriptive font
321properties can be added to conforming fonts without making existing
322X client or server implementations obsolete.
323</para>
324</sect1>
325</chapter>
326
327<chapter id='X_Logical_Font_Description'>
328<title>X Logical Font Description</title>
329<!-- .XS -->
330<!-- (SN X Logical Font Description -->
331<!-- .XE -->
332<para>
333<!-- .LP -->
334XLFD is divided into two basic components:
335the
336<function>FontName</function>,
337which gives all font information needed to uniquely identify a font
338in X protocol requests (for example,
339<function>OpenFont</function>,
340<function>ListFonts</function>,
341and so on) and a variable list of optional
342<function>FontProperties</function>,
343which describe a font in more detail.
344</para>
345<para>
346<!-- .LP -->
347The
348<function>FontName</function>
349is used in font queries and is returned as data in certain X protocol requests.
350It is also specified as the data value for the
351<function>FONT</function>
352item in the X Consortium Character Bitmap Distribution Format Standard
353(BDF V2.1).
354</para>
355<para>
356<!-- .LP -->
357The
358<function>FontProperties</function>
359are supplied on a font-by-font basis and are returned
360as data in certain X protocol requests as part of the
361<function>XFontStruct</function>
362data structure.
363The names and associated data values for each of the
364<function>FontProperties</function>
365may also appear as items of the
366<function>STARTPROPERTIES</function>...<function>ENDPROPERTIES</function>list
367in the BDF V2.1 specification. <!-- xref -->
368</para>
369<sect1 id='FontName'>
370<title>FontName</title>
371<!-- .XS -->
372<!-- (SN FontName -->
373<!-- .XE -->
374<para>
375<!-- .LP -->
376Each
377<function>FontName</function>
378is logically composed of two strings: a
379<function>FontNameRegistry</function>
380prefix that is followed by a
381<function>FontNameSuffix</function>.
382The
383<function>FontName</function>
384uses the ISO 8859-1 encoding.
385The
386<function>FontNameRegistry</function>
387is an
388<!-- .IN x-registered-name -->
389x-registered-name (a name that has been registered with the X Consortium)
390that identifies the registration authority that owns the specified
391<function>FontNameSuffix</function>
392syntax and semantics.
393</para>
394<para>
395<!-- .LP -->
396All font names that conform to this specification are to use a
397<function>FontNameRegistry</function>
398prefix, which is defined to be the string "-"
399(HYPHEN).
400All
401<function>FontNameRegistry</function>
402prefixes of the form: +<emphasis remap='I'>version</emphasis>-,
403where the specified version indicates some future XLFD specification,
404are reserved by the X Consortium for future extensions to XLFD font names.
405If required, extensions to the current XLFD font name shall be constructed
406by appending new fields to the current structure,
407each delimited by the existing field delimiter.
408The availability of other
409<function>FontNameRegistry</function>
410prefixes or fonts that support other registries
411is server implementation dependent.
412</para>
413<para>
414<!-- .LP -->
415In the X protocol specification,
416the
417<function>FontName</function>
418is required to be a string;
419hence, numeric field values are represented in the name as string equivalents.
420All
421<function>FontNameSuffix</function>
422fields are also defined as
423<function>FontProperties</function>;
424numeric property values are represented as signed or unsigned integers,
425as appropriate.
426</para>
427
428<sect2 id='FontName_Syntax'>
429<title>FontName Syntax</title>
430<!-- .XS -->
431<!-- (SN FontName Syntax -->
432<!-- .XE -->
433<para>
434<!-- .LP -->
435The
436<function>FontName</function>
437is a structured, parseable string (of type STRING8)
438whose Backus-Naur Form syntax description is as follows:
439</para>
440<!-- .IN "FontName Syntax" -->
441<!-- .SM -->
442<informaltable frame="none">
443  <?dbfo keep-together="always" ?>
444  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
445  <colspec colname='c1' colwidth='1.0*'/>
446  <colspec colname='c2' colwidth='2.0*'/>
447  <tbody>
448    <row>
449      <entry>FontName ::=</entry>
450      <entry>
451XFontNameRegistry XFontNameSuffix |
452PrivFontNameRegistry PrivFontNameSuffix
453      </entry>
454    </row>
455    <row>
456      <entry>XFontNameRegistry ::=</entry>
457      <entry>XFNDelim | XFNExtPrefix Version XFNDelim</entry>
458    </row>
459    <row>
460      <entry>XFontNameSuffix ::=</entry>
461      <entry>
462FOUNDRY XFNDelim FAMILY_NAME XFNDelim WEIGHT_NAME
463XFNDelim SLANT XFNDelim SETWIDTH_NAME XFNDelim ADD_STYLE_NAME
464XFNDelim PIXEL_SIZE XFNDelim POINT_SIZE
465XFNDelim RESOLUTION_X XFNDelim RESOLUTION_Y XFNDelim
466SPACING XFNDelim AVERAGE_WIDTH XFNDelim CHARSET_REGISTRY
467XFNDelim CHARSET_ENCODING
468      </entry>
469    </row>
470    <row>
471      <entry>Version ::=</entry>
472      <entry>
473STRING8 - the XLFD version that defines an extension
474to the font name syntax (for example, "1.4")
475      </entry>
476    </row>
477    <row>
478      <entry>XFNExtPrefix ::=</entry>
479      <entry>OCTET - "+" (PLUS)</entry>
480    </row>
481    <row>
482      <entry>XFNDelim ::=</entry>
483      <entry>OCTET - "-" (HYPHEN)</entry>
484    </row>
485    <row>
486      <entry>PrivFontNameRegistry ::=</entry>
487      <entry>STRING8 - other than those strings reserved by XLFD</entry>
488    </row>
489    <row>
490      <entry>PrivFontNameSuffix ::=</entry>
491      <entry>STRING8</entry>
492    </row>
493  </tbody>
494  </tgroup>
495</informaltable>
496
497<para>
498<!-- .LP -->
499Field values are constructed as strings of ISO 8859-1 graphic characters,
500excluding the following:
501</para>
502<itemizedlist>
503  <listitem>
504    <para>
505'-' (HYPHEN), the XLFD font name delimiter character
506    </para>
507  </listitem>
508  <listitem>
509    <para>
510'?' (QUESTION MARK) and "*" (ASTERISK), the X protocol
511font name wildcard characters
512    </para>
513  </listitem>
514  <listitem>
515    <para>
516',' (COMMA), used by Xlib to separate XLFD font names in a font set.
517    </para>
518  </listitem>
519  <listitem>
520    <para>
521'"' (QUOTATION MARK), used by some commercial products to quote a
522font name.
523    </para>
524  </listitem>
525</itemizedlist>
526
527<para>
528<!-- .LP -->
529Alphabetic case distinctions are allowed but are for human readability
530concerns only.
531Conforming X servers will perform matching on font name query or open requests
532independent of case.
533The entire font name string must have no more than 255 characters.
534It is recommended that clients construct font name query patterns
535by explicitly including all field delimiters to avoid unexpected results.
536Note that SPACE is a valid character of a
537<function>FontName</function>
538field; for example, the string "ITC Avant Garde Gothic" might be a
539FAMILY_NAME.
540</para>
541</sect2>
542
543<sect2 id='FontName_Field_Definitions'>
544<title>FontName Field Definitions</title>
545<!-- .XS -->
546<!-- (SN FontName Field Definitions -->
547<!-- .XE -->
548<para>
549<!-- .LP -->
550This section discusses the
551<function>FontName</function>:
552</para>
553<itemizedlist>
554  <listitem>
555    <para>
556FOUNDRY field
557    </para>
558  </listitem>
559  <listitem>
560    <para>
561FAMILY_NAME field
562    </para>
563  </listitem>
564  <listitem>
565    <para>
566WEIGHT_NAME field
567    </para>
568  </listitem>
569  <listitem>
570    <para>
571SLANT field
572    </para>
573  </listitem>
574  <listitem>
575    <para>
576SETWIDTH_NAME field
577    </para>
578  </listitem>
579  <listitem>
580    <para>
581ADD_STYLE_NAME field
582    </para>
583  </listitem>
584  <listitem>
585    <para>
586PIXEL_SIZE field
587    </para>
588  </listitem>
589  <listitem>
590    <para>
591POINT_SIZE field
592    </para>
593  </listitem>
594  <listitem>
595    <para>
596RESOLUTION_X and RESOLUTION_Y fields
597    </para>
598  </listitem>
599  <listitem>
600    <para>
601SPACING field
602    </para>
603  </listitem>
604  <listitem>
605    <para>
606AVERAGE_WIDTH field
607    </para>
608  </listitem>
609  <listitem>
610    <para>
611CHARSET_REGISTRY and CHARSET_ENCODING fields
612    </para>
613  </listitem>
614</itemizedlist>
615
616<sect3 id='FOUNDRY_Field'>
617<title>FOUNDRY Field</title>
618<!-- .XS -->
619<!-- (SN FOUNDRY Field -->
620<!-- .XE -->
621<para>
622<!-- .LP -->
623FOUNDRY is an x-registered-name,
624the name or identifier of the digital type foundry
625that digitized and supplied the font data,
626or if different, the identifier of the organization that last modified
627the font shape or metric information.
628</para>
629<para>
630<!-- .LP -->
631The reason this distinction is necessary is
632that a given font design may be licensed from one source (for example, ITC)
633but digitized and sold by any number of different type suppliers.
634Each digital version of the original design, in general, will be somewhat
635different in metrics and shape from the idealized original font data,
636because each font foundry, for better or for worse, has its own standards
637and practices for tweaking a typeface for a particular generation
638of output technologies or has its own perception of market needs.
639</para>
640<para>
641<!-- .LP -->
642It is up to the type supplier to register with the X Consortium a
643suitable name for this
644<function>FontName</function>
645field according to the registration procedures defined by the Consortium.
646</para>
647<para>
648<!-- .LP -->
649The X Consortium shall define procedures for registering foundry
650and other names and shall maintain and publish,
651as part of its public distribution,
652a registry of such registered names for use in XLFD font names and properties.
653</para>
654<para>
655<!-- .LP -->
656</para>
657</sect3>
658
659<sect3 id='FAMILY_NAME_Field'>
660<title>FAMILY_NAME Field</title>
661<!-- .XS -->
662<!-- (SN FAMILY_NAME Field -->
663<!-- .XE -->
664<para>
665<!-- .LP -->
666FAMILY_NAME is a string that identifies the range or family of
667typeface designs that are all variations of one basic typographic style.
668This must be spelled out in full,
669with words separated by spaces, as required.
670This name must be human-understandable and suitable for presentation to a
671font user to identify the typeface family.
672</para>
673<para>
674<!-- .LP -->
675It is up to the type supplier to supply and maintain a suitable string for
676this field and font property, to secure the proper legal title to a given
677name, and to guard against the infringement of other's copyrights or
678trademarks.
679By convention, FAMILY_NAME is not translated.
680FAMILY_NAME may include an indication of design ownership
681if considered a valid part of the
682typeface family name.
683</para>
684<para>
685<!-- .LP -->
686The following are examples of FAMILY_NAME:
687</para>
688<itemizedlist>
689  <listitem>
690    <para>
691Helvetica
692    </para>
693  </listitem>
694  <listitem>
695    <para>
696ITC Avant Garde Gothic
697    </para>
698  </listitem>
699  <listitem>
700    <para>
701Times
702    </para>
703  </listitem>
704  <listitem>
705    <para>
706Times Roman
707    </para>
708  </listitem>
709  <listitem>
710    <para>
711Bitstream Amerigo
712    </para>
713  </listitem>
714  <listitem>
715    <para>
716Stone
717    </para>
718  </listitem>
719</itemizedlist>
720</sect3>
721
722<sect3 id='WEIGHT_NAME_Field'>
723<title>WEIGHT_NAME Field</title>
724<!-- .XS -->
725<!-- (SN WEIGHT_NAME Field -->
726<!-- .XE -->
727<para>
728<!-- .LP -->
729WEIGHT_NAME is a string that identifies the font's typographic weight,
730that is, the nominal blackness of the font,
731according to the FOUNDRY's judgment.
732This name must be human-understandable and suitable for presentation to a
733font user.
734The value "0" is used to indicate a polymorphic font (see <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>).
735</para>
736<para>
737<!-- .LP -->
738The interpretation of this field is somewhat problematic
739because the typographic judgment of weight has traditionally
740depended on the overall design of the typeface family in question;
741that is, it is possible that the DemiBold weight of one font could be
742almost equivalent in typographic feel to a Bold font from another family.
743</para>
744<para>
745<!-- .LP -->
746WEIGHT_NAME is captured as an arbitrary string
747because it is an important part of a font's complete human-understandable name.
748However, it should not be used for font matching or substitution.
749For this purpose,
750X client applications should use the weight-related font properties
751(RELATIVE_WEIGHT and WEIGHT) that give the coded relative weight
752and the calculated weight, respectively.
753</para>
754</sect3>
755
756<sect3 id='SLANT_Field'>
757<title>SLANT Field</title>
758<!-- .XS -->
759<!-- (SN SLANT Field -->
760<!-- .XE -->
761<para>
762<!-- .LP -->
763SLANT is a code-string that indicates the overall posture of the
764typeface design used in the font.
765The encoding is as follows:
766</para>
767
768<informaltable frame="topbot">
769  <?dbfo keep-together="always" ?>
770  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
771  <colspec colname='c1' colwidth='1.0*'/>
772  <colspec colname='c2' colwidth='3.0*'/>
773  <colspec colname='c3' colwidth='5.0*'/>
774  <thead>
775    <row rowsep='1'>
776      <entry>Code</entry>
777      <entry>English Translation</entry>
778      <entry>Description</entry>
779    </row>
780  </thead>
781  <tbody>
782    <row>
783      <entry>"R"</entry>
784      <entry>Roman</entry>
785      <entry>Upright design</entry>
786    </row>
787    <row>
788      <entry>"I"</entry>
789      <entry>Italic</entry>
790      <entry>Italic design, slanted clockwise from the vertical</entry>
791    </row>
792    <row>
793      <entry>"O"</entry>
794      <entry>Oblique</entry>
795      <entry>Obliqued upright design, slanted clockwise from the vertical</entry>
796    </row>
797    <row>
798      <entry>"RI"</entry>
799      <entry>Reverse Italic</entry>
800      <entry>Italic design, slanted counterclockwise from the vertical</entry>
801    </row>
802    <row>
803      <entry>"RO"</entry>
804      <entry>Reverse Oblique</entry>
805      <entry>Obliqued upright design, slanted counterclockwise from the vertical</entry>
806    </row>
807    <row>
808      <entry>"OT"</entry>
809      <entry>Other</entry>
810      <entry>Other</entry>
811    </row>
812    <row>
813      <entry>numeric</entry>
814      <entry>Polymorphic</entry>
815      <entry>See <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>.</entry>
816    </row>
817  </tbody>
818  </tgroup>
819</informaltable>
820<para>
821<!-- .LP -->
822The SLANT codes are for programming convenience only and usually are
823converted into their equivalent human-understandable form before being
824presented to a user.
825</para>
826</sect3>
827
828<sect3 id='SETWIDTH_NAME_Field'>
829<title>SETWIDTH_NAME Field</title>
830<!-- .XS -->
831<!-- (SN SETWIDTH_NAME Field -->
832<!-- .XE -->
833<para>
834<!-- .LP  -->
835SETWIDTH_NAME is a string that gives the font's typographic
836proportionate width, that is, the nominal width per horizontal unit of the
837font, according to the FOUNDRY's judgment.
838The value "0" is used to indicate a polymorphic font (see <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>).
839</para>
840<para>
841<!-- .LP -->
842As with WEIGHT_NAME, the interpretation of this field or font property is
843somewhat problematic, because the designer's judgment of setwidth has
844traditionally depended on the overall design of the typeface family in
845question.
846For purposes of font matching or substitution,
847X client applications should either use the RELATIVE_SETWIDTH font property
848that gives the relative coded proportionate width or calculate
849the proportionate width.
850</para>
851<para>
852<!-- .LP -->
853The following are examples of SETWIDTH_NAME:
854</para>
855
856<itemizedlist>
857  <listitem>
858    <para>
859Normal
860    </para>
861  </listitem>
862  <listitem>
863    <para>
864Condensed
865    </para>
866  </listitem>
867  <listitem>
868    <para>
869Narrow
870    </para>
871  </listitem>
872  <listitem>
873    <para>
874Double Wide
875    </para>
876  </listitem>
877</itemizedlist>
878</sect3>
879
880<sect3 id='ADD_STYLE_NAME_Field'>
881<title>ADD_STYLE_NAME Field</title>
882<!-- .XS -->
883<!-- (SN ADD_STYLE_NAME Field -->
884<!-- .XE -->
885<para>
886<!-- .LP -->
887ADD_STYLE_NAME is a string that identifies additional typographic
888style information that is not captured by other fields but is needed
889to identify the particular font.
890The character "[" anywhere in the field is used to indicate a
891polymorphic font (see <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>).
892</para>
893<para>
894<!-- .LP -->
895ADD_STYLE_NAME is not a typeface classification field
896and is only used for uniqueness.
897Its use, as such, is not limited to typographic style distinctions.
898</para>
899<para>
900<!-- .LP -->
901The following are examples of ADD_STYLE_NAME:
902</para>
903<itemizedlist>
904  <listitem>
905    <para>
906Serif
907    </para>
908  </listitem>
909  <listitem>
910    <para>
911Sans Serif
912    </para>
913  </listitem>
914  <listitem>
915    <para>
916Informal
917    </para>
918  </listitem>
919  <listitem>
920    <para>
921Decorated
922    </para>
923  </listitem>
924</itemizedlist>
925</sect3>
926
927<sect3 id='PIXEL_SIZE_Field'>
928<title>PIXEL_SIZE Field</title>
929<!-- .XS -->
930<!-- (SN PIXEL_SIZE Field -->
931<!-- .XE -->
932<para>
933<!-- .LP  -->
934PIXEL_SIZE
935gives the body size of the font at a particular
936POINT_SIZE and RESOLUTION_Y.
937PIXEL_SIZE is either an integer-string or a string beginning
938with "[".  A string beginning with "[" represents a matrix
939(see <xref linkend='Matrix_Transformations' xrefstyle='select: title'/>).
940PIXEL_SIZE usually incorporates additional vertical spacing
941that is considered part of the font design.
942(Note, however, that this value is not necessarily equivalent to the height
943of the font bounding box.)
944Zero is used to indicate a scalable font (see <xref linkend='Scalable_Fonts' xrefstyle='select: title'/>).
945</para>
946<para>
947<!-- .LP -->
948PIXEL_SIZE usually is used by X client applications that need to
949query fonts according to device-dependent size,
950regardless of the point size or vertical resolution
951for which the font was designed.
952</para>
953</sect3>
954
955<sect3 id='SN_POINT_SIZE_Field'>
956<title>SN POINT_SIZE Field</title>
957<!-- .XS -->
958<!-- (SN POINT_SIZE Field -->
959<!-- .XE -->
960<para>
961<!-- .LP  -->
962POINT_SIZE gives the body size
963for which the font was designed.
964POINT_SIZE is either an integer-string or a string beginning
965with "[".  A string beginning with "[" represents a matrix
966(see <xref linkend='Matrix_Transformations' xrefstyle='select: title'/>).
967This field usually incorporates additional vertical spacing
968that is considered part of the font design.
969(Note, however, that POINT_SIZE is not necessarily equivalent to the height
970of the font bounding box.)
971POINT_SIZE is expressed in decipoints (where points are as defined
972in the X protocol or 72.27 points equal 1 inch).
973Zero is used to indicate a scalable font (see <xref linkend='Scalable_Fonts' xrefstyle='select: title'/>).
974</para>
975<para>
976<!-- .LP -->
977POINT_SIZE and RESOLUTION_Y are used by X clients to query fonts
978according to device-independent size to maintain constant text
979size on the display regardless of the PIXEL_SIZE used for the font.
980</para>
981</sect3>
982
983<sect3 id='RESOLUTION_X_and_RESOLUTION_Y_Fields'>
984<title>RESOLUTION_X and RESOLUTION_Y Fields</title>
985<!-- .XS -->
986<!-- (SN RESOLUTION_X and RESOLUTION_Y Fields -->
987<!-- .XE -->
988<para>
989<!-- .LP  -->
990RESOLUTION_X and RESOLUTION_Y are unsigned integer-strings that give
991the horizontal and vertical resolution,
992measured in pixels or dots per inch (dpi),
993for which the font was designed.
994Zero is used to indicate a scalable font (see <xref linkend='Scalable_Fonts' xrefstyle='select: title'/>).
995Horizontal and vertical values are required
996because a separate bitmap font must be designed
997for displays with very different aspect ratios
998(for example, 1:1, 4:3, 2:1, and so on).
999</para>
1000<para>
1001<!-- .LP  -->
1002The separation of pixel or point size and resolution is necessary
1003because X allows for servers with very different video characteristics
1004(for example, horizontal and vertical resolution, screen and pixel size,
1005pixel shape, and so on) to potentially access the same font library.
1006The font name, for example, must differentiate between a 14-point font designed
1007for 75 dpi (body size of about 14 pixels) or a 14-point font designed
1008for 150 dpi (body size of about 28 pixels).
1009Further, in servers that implement some or all fonts as continuously scaled
1010and scan-converted outlines,
1011POINT_SIZE and RESOLUTION_Y will help the server to differentiate
1012between potentially separate font masters for text, title,
1013and display sizes or for other typographic considerations.
1014</para>
1015</sect3>
1016
1017<sect3 id='SPACING_Field'>
1018<title>SPACING Field</title>
1019<!-- .XS -->
1020<!-- (SN SPACING Field -->
1021<!-- .XE -->
1022<para>
1023<!-- .LP  -->
1024SPACING is a code-string that indicates the escapement class of the font,
1025that is, monospace (fixed pitch), proportional (variable pitch),
1026or charcell (a special monospaced font that conforms to the traditional
1027data-processing character cell font model).
1028The encoding is as follows:
1029</para>
1030
1031<informaltable frame="topbot">
1032  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
1033  <colspec colname='c1' colwidth='1.0*'/>
1034  <colspec colname='c2' colwidth='3.0*'/>
1035  <colspec colname='c3' colwidth='6.0*'/>
1036  <thead>
1037    <row rowsep='1'>
1038      <entry>Code</entry>
1039      <entry>English Translation</entry>
1040      <entry>Description</entry>
1041    </row>
1042  </thead>
1043  <tbody>
1044    <row>
1045      <entry>"P"</entry>
1046      <entry>Proportional</entry>
1047      <entry>
1048A font whose logical character widths vary for each glyph.
1049Note that no other restrictions are placed on the metrics
1050of a proportional font.
1051      </entry>
1052    </row>
1053    <row>
1054      <entry>"M"</entry>
1055      <entry>Monospaced</entry>
1056      <entry>
1057A font whose logical character widths are constant
1058(that is, every glyph in the font has the same logical width).
1059No other restrictions are placed on the metrics of a monospaced font.
1060      </entry>
1061    </row>
1062    <row>
1063      <entry>"C"</entry>
1064      <entry>CharCell</entry>
1065      <entry>
1066A monospaced font that follows the standard typewriter character cell model
1067(that is, the glyphs of the font can be modeled by X clients as "boxes"
1068of the same width and height that are imaged side-by-side
1069to form text strings or top-to-bottom to form text lines).
1070By definition,
1071all glyphs have the same logical character width,
1072and no glyphs have "ink" outside of the character cell.
1073There is no kerning (that is, on a per-character basis with positive metrics:
10740 &lt;= left-bearing &lt;= right-bearing &lt;= width;
1075with negative metrics: width &lt;= left-bearing &lt;= right-bearing &lt;= zero).
1076Also, the vertical extents of the font do not exceed the vertical spacing
1077(that is, on a per-character basis:
1078ascent &lt;= font-ascent and descent &lt;= font-descent).
1079The cell height = font-descent + font-ascent, and the width = AVERAGE_WIDTH.
1080      </entry>
1081    </row>
1082  </tbody>
1083  </tgroup>
1084</informaltable>
1085</sect3>
1086
1087<sect3 id='AVERAGE_WIDTH_Field'>
1088<title>AVERAGE_WIDTH Field</title>
1089<!-- .XS -->
1090<!-- (SN AVERAGE_WIDTH Field -->
1091<!-- .XE -->
1092<para>
1093<!-- .LP  -->
1094AVERAGE_WIDTH is an integer-string typographic metric value
1095that gives the unweighted arithmetic mean of the absolute value of the
1096width of each glyph in the font
1097(measured in tenths of pixels), multiplied by -1 if the dominant
1098writing direction for the font is right-to-left.
1099A leading "~" (TILDE) indicates a negative value.
1100For monospaced and character cell fonts,
1101this is the width of all glyphs in the font.
1102Zero is used to indicate a scalable font (see <xref linkend='Scalable_Fonts' xrefstyle='select: title'/>).
1103</para>
1104</sect3>
1105
1106<sect3 id='CHARSET_REGISTRY_and_CHARSET_ENCODING_Fields'>
1107<title>CHARSET_REGISTRY and CHARSET_ENCODING Fields</title>
1108<!-- .XS -->
1109<!-- (SN CHARSET_REGISTRY and CHARSET_ENCODING Fields -->
1110<!-- .XE -->
1111<para>
1112<!-- .LP -->
1113The character set used to encode the glyphs of the font (and implicitly
1114the font's glyph repertoire), as maintained by the X Consortium character
1115set registry.
1116CHARSET_REGISTRY is an x-registered-name that identifies
1117the registration authority that owns the specified encoding.
1118CHARSET_ENCODING is a registered name that identifies the coded character set
1119as defined by that registration authority
1120and, optionally, a subsetting hint.
1121</para>
1122<para>
1123<!-- .LP -->
1124Although the X protocol does not explicitly have any knowledge about
1125character set encodings,
1126it is expected that server implementors will prefer to embed knowledge
1127of certain proprietary or standard charsets into their font library
1128for reasons of performance and convenience.
1129The CHARSET_REGISTRY and CHARSET_ENCODING fields or properties allow
1130an X client font request to specify a specific charset mapping
1131in server environments where multiple charsets are supported.
1132The availability of any particular
1133character set is font and server implementation dependent.
1134</para>
1135<para>
1136<!-- .LP -->
1137To prevent collisions when defining character set names,
1138it is recommended that CHARSET_REGISTRY and CHARSET_ENCODING name pairs
1139be constructed according to the following conventions:
1140</para>
1141<!-- .IN "CHARSET Syntax" -->
1142<!-- .SM -->
1143<informaltable frame="none">
1144  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
1145  <colspec colname='c1' colwidth='1.0*'/>
1146  <colspec colname='c2' colwidth='2.0*'/>
1147  <tbody>
1148    <row>
1149      <entry>CharsetRegistry ::=</entry>
1150      <entry>StdCharsetRegistryName | PrivCharsetRegistryName</entry>
1151    </row>
1152    <row>
1153      <entry>CharsetEncoding ::=</entry>
1154      <entry>StdCharsetEncodingName | PrivCharsetEncodingName</entry>
1155    </row>
1156    <row>
1157      <entry>StdCharsetRegistryName ::=</entry>
1158      <entry>StdOrganizationId StdNumber | StdOrganizationId StdNumber Dot Year</entry>
1159    </row>
1160    <row>
1161      <entry>PrivCharsetRegistryName ::=</entry>
1162      <entry>OrganizationId STRING8</entry>
1163    </row>
1164    <row>
1165      <entry>StdCharsetEncodingName ::=</entry>
1166      <entry>STRING8-numeric part number of referenced standard</entry>
1167    </row>
1168    <row>
1169      <entry>PrivCharsetEncodingName ::=</entry>
1170      <entry>STRING8</entry>
1171    </row>
1172    <row>
1173      <entry>StdOrganizationId ::=</entry>
1174      <entry>STRING8-the registered name or acronym of the referenced standard organization</entry>
1175    </row>
1176    <row>
1177      <entry>StdNumber ::=</entry>
1178      <entry>STRING8-referenced standard number</entry>
1179    </row>
1180    <row>
1181      <entry>OrganizationId ::=</entry>
1182      <entry>STRING8-the registered name or acronym of the organization</entry>
1183    </row>
1184    <row>
1185      <entry>Dot ::=</entry>
1186      <entry>OCTET-"." (FULL STOP)</entry>
1187    </row>
1188    <row>
1189      <entry>Year ::=</entry>
1190      <entry>STRING8-numeric year (for example, 1989)</entry>
1191    </row>
1192  </tbody>
1193  </tgroup>
1194</informaltable>
1195
1196<para>
1197<!-- .LP -->
1198The X Consortium shall maintain and publish a registry
1199of such character set names for use in X protocol font names and properties
1200as specified in XLFD.
1201</para>
1202<para>
1203<!-- .LP -->
1204The ISO Latin-1 character set shall be registered by the X Consortium as the
1205CHARSET_REGISTRY-CHARSET_ENCODING value pair: "ISO8859-1".
1206</para>
1207<para>
1208<!-- .LP -->
1209If the CHARSET_ENCODING contains a "[" (LEFT SQUARE BRACKET),
1210the "[" and the characters after it up to a "]" (RIGHT SQUARE
1211BRACKET) are a
1212subsetting hint telling the font source that the client is interested
1213only in a subset of the characters of the font.
1214The font source can, optionally, return a font that
1215contains only those characters or any superset of those characters.  The
1216client can expect to obtain valid glyphs and metrics only for those
1217characters, and not for any other characters in the font.
1218The font properties may optionally be calculated by considering only
1219the characters in the subset.
1220</para>
1221<para>
1222<!-- .LP -->
1223The BNF for the subsetting hint is
1224</para>
1225<!-- .SM -->
1226<informaltable frame="none">
1227  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
1228  <colspec colname='c1' colwidth='1.0*'/>
1229  <colspec colname='c2' colwidth='2.0*'/>
1230  <tbody>
1231    <row>
1232      <entry>Subset ::=</entry>
1233      <entry>LeftBracket RangeList RightBracket</entry>
1234    </row>
1235    <row>
1236      <entry>RangeList ::=</entry>
1237      <entry>Range | Range Space RangeList</entry>
1238    </row>
1239    <row>
1240      <entry>Range ::=</entry>
1241      <entry>Number | Number Underscore Number</entry>
1242    </row>
1243    <row>
1244      <entry>Number ::=</entry>
1245      <entry>"0x" HexNumber | DecNumber</entry>
1246    </row>
1247    <row>
1248      <entry>HexNumber ::=</entry>
1249      <entry>HexDigit | HexDigit HexNumber</entry>
1250    </row>
1251    <row>
1252      <entry>DecNumber ::=</entry>
1253      <entry>DecDigit | DecDigit DecNumber</entry>
1254    </row>
1255    <row>
1256      <entry>DecDigit ::=</entry>
1257      <entry>"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"</entry>
1258    </row>
1259    <row>
1260      <entry>HexDigit ::=</entry>
1261      <entry>DecDigit | "a" | "b" | "c" | "d" | "e" | "f"</entry>
1262    </row>
1263    <row>
1264      <entry>LeftBracket ::=</entry>
1265      <entry>"[" (LEFT SQUARE BRACKET)</entry>
1266    </row>
1267    <row>
1268      <entry>RightBracket ::=</entry>
1269      <entry>"]" (RIGHT SQUARE BRACKET)</entry>
1270    </row>
1271    <row>
1272      <entry>Space ::=</entry>
1273      <entry>"\0" (SPACE)</entry>
1274    </row>
1275    <row>
1276      <entry>Underscore ::=</entry>
1277      <entry>"_" (LOW LINE)</entry>
1278    </row>
1279  </tbody>
1280  </tgroup>
1281</informaltable>
1282
1283<para>
1284<!-- .LP -->
1285Each Range specifies characters that are to be part of the subset
1286included in the font.
1287A Range containing two Numbers specifies the first and last character,
1288inclusively, of a range of characters.
1289A Range that is a single Number specifies a single character to be
1290included in the font.
1291A HexNumber is interpreted as a hexadecimal number.
1292A DecNumber is interpreted as a decimal number.
1293The font consists of the union of all the Ranges in the
1294RangeList.
1295</para>
1296<para>
1297<!-- .LP -->
1298For example,
1299</para>
1300<!-- .br -->
1301<!-- .ft C -->
1302<!-- .SM -->
1303<literallayout class="monospaced">
1304     -misc-fixed-medium-r-normal--0-0-0-0-c-0-iso8859-1[65 70 80_90]
1305</literallayout>
1306<!-- .NL -->
1307<!-- .ft P -->
1308<!-- .br -->
1309<para>
1310tells the font source that the client is interested only in characters
131165, 70, and 80-90.
1312</para>
1313</sect3>
1314</sect2>
1315
1316<sect2 id='Examples'>
1317<title>Examples</title>
1318<!-- .XS -->
1319<!-- (SN Examples -->
1320<!-- .XE -->
1321<para>
1322<!-- .LP -->
1323The following examples of font names are derived from the screen fonts
1324shipped with the X Consortium distribution.
1325</para>
1326<!-- .\" why is this table so long?  I took out some fonts in v1.5 -->
1327<!-- .\" to make the page breaks better. -->
1328<!-- .SM -->
1329<informaltable frame="topbot">
1330  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
1331  <colspec colname='c1' colwidth='1.0*'/>
1332  <colspec colname='c2' colwidth='2.0*'/>
1333  <thead>
1334    <row rowsep='1'>
1335      <entry>Font</entry>
1336      <entry>X FontName</entry>
1337    </row>
1338  </thead>
1339  <tbody>
1340    <row>
1341      <entry><function>75-dpi Fonts</function></entry>
1342    </row>
1343    <row>
1344      <entry>Charter 12 pt</entry>
1345      <entry>-Bitstream-Charter-Medium-R-Normal--12-120-75-75-P-68-ISO8859-1</entry>
1346    </row>
1347    <row>
1348      <entry>Charter Bold 12 pt</entry>
1349      <entry>-Bitstream-Charter-Bold-R-Normal--12-120-75-75-P-76-ISO8859-1</entry>
1350    </row>
1351    <row>
1352      <entry>Charter Bold Italic 12 pt</entry>
1353      <entry>-Bitstream-Charter-Bold-I-Normal--12-120-75-75-P-75-ISO8859-1</entry>
1354    </row>
1355    <row>
1356      <entry>Charter Italic 12 pt</entry>
1357      <entry>-Bitstream-Charter-Medium-I-Normal--12-120-75-75-P-66-ISO8859-1</entry>
1358    </row>
1359    <row>
1360      <entry>Courier 8 pt</entry>
1361      <entry>-Adobe-Courier-Medium-R-Normal--8-80-75-75-M-50-ISO8859-1</entry>
1362    </row>
1363    <row>
1364      <entry>Courier 10 pt</entry>
1365      <entry>-Adobe-Courier-Medium-R-Normal--10-100-75-75-M-60-ISO8859-1</entry>
1366    </row>
1367    <row>
1368      <entry>Courier 12 pt</entry>
1369      <entry>-Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO8859-1</entry>
1370    </row>
1371    <row>
1372      <entry>Courier 24 pt</entry>
1373      <entry>-Adobe-Courier-Medium-R-Normal--24-240-75-75-M-150-ISO8859-1</entry>
1374    </row>
1375    <row>
1376      <entry>Courier Bold 10 pt</entry>
1377      <entry>-Adobe-Courier-Bold-R-Normal--10-100-75-75-M-60-ISO8859-1</entry>
1378    </row>
1379    <row>
1380      <entry>Courier Bold Oblique 10 pt</entry>
1381      <entry>-Adobe-Courier-Bold-O-Normal--10-100-75-75-M-60-ISO8859-1</entry>
1382    </row>
1383    <row>
1384      <entry>Courier Oblique 10 pt</entry>
1385      <entry>-Adobe-Courier-Medium-O-Normal--10-100-75-75-M-60-ISO8859-1</entry>
1386    </row>
1387    <row>
1388      <entry><function>100-dpi Fonts</function></entry>
1389    </row>
1390    <row>
1391      <entry>Symbol 10 pt</entry>
1392      <entry>-Adobe-Symbol-Medium-R-Normal--14-100-100-100-P-85-Adobe-FONTSPECIFIC</entry>
1393    </row>
1394    <row>
1395      <entry>Symbol 14 pt</entry>
1396      <entry>-Adobe-Symbol-Medium-R-Normal--20-140-100-100-P-107-Adobe-FONTSPECIFIC</entry>
1397    </row>
1398    <row>
1399      <entry>Symbol 18 pt</entry>
1400      <entry>-Adobe-Symbol-Medium-R-Normal--25-180-100-100-P-142-Adobe-FONTSPECIFIC</entry>
1401    </row>
1402    <row>
1403      <entry>Symbol 24 pt</entry>
1404      <entry>-Adobe-Symbol-Medium-R-Normal--34-240-100-100-P-191-Adobe-FONTSPECIFIC</entry>
1405    </row>
1406    <row>
1407      <entry>Times Bold 10 pt</entry>
1408      <entry>-Adobe-Times-Bold-R-Normal--14-100-100-100-P-76-ISO8859-1</entry>
1409    </row>
1410    <row>
1411      <entry>Times Bold Italic 10 pt</entry>
1412      <entry>-Adobe-Times-Bold-I-Normal--14-100-100-100-P-77-ISO8859-1</entry>
1413    </row>
1414    <row>
1415      <entry>Times Italic 10 pt</entry>
1416      <entry>-Adobe-Times-Medium-I-Normal--14-100-100-100-P-73-ISO8859-1</entry>
1417    </row>
1418    <row>
1419      <entry>Times Roman 10 pt</entry>
1420      <entry>-Adobe-Times-Medium-R-Normal--14-100-100-100-P-74-ISO8859-1</entry>
1421    </row>
1422  </tbody>
1423  </tgroup>
1424</informaltable>
1425</sect2>
1426</sect1>
1427
1428<sect1 id='Font_Properties'>
1429<title>Font Properties</title>
1430<!-- .XS -->
1431<!-- (SN Font Properties -->
1432<!-- .XE -->
1433<para>
1434<!-- .LP -->
1435All font properties are optional but will generally include the
1436font name fields and, on a font-by-font basis, any other useful font
1437descriptive and use information that may be required to use the font
1438intelligently.
1439The XLFD specifies an extensive set of standard X font properties,
1440their interpretation, and fallback rules when the property is not defined
1441for a given font.
1442The goal is to provide client applications with enough font information
1443to be able to make automatic formatting and display decisions
1444with good typographic results.
1445</para>
1446<para>
1447<!-- .LP -->
1448Font property names use the ISO 8859-1 encoding.
1449</para>
1450<para>
1451<!-- .LP -->
1452Additional standard X font property definitions may be defined in the
1453future and private properties may exist in X fonts at any time.
1454Private font properties should be defined to conform to the general mechanism
1455defined in the X protocol to prevent overlap of name space and ambiguous
1456property names, that is, private font property names are of the form:
1457"_" (LOW LINE),
1458followed by the organizational identifier, followed by "_" (LOW LINE),
1459and terminated with the property name.
1460</para>
1461<para>
1462<!-- .LP -->
1463The Backus-Naur Form syntax description of X font properties is as follows:
1464</para>
1465<!-- .IN "Font Properties" "BNF Syntax" -->
1466<!-- .SM -->
1467<informaltable frame="none">
1468  <?dbfo keep-together="always" ?>
1469  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
1470  <colspec colname='c1' colwidth='1.0*'/>
1471  <colspec colname='c2' colwidth='3.0*'/>
1472  <tbody>
1473    <row>
1474      <entry>Properties ::=</entry>
1475      <entry>OptFontPropList</entry>
1476    </row>
1477    <row>
1478      <entry>OptFontPropList ::=</entry>
1479      <entry>NULL | OptFontProp OptFontPropList</entry>
1480    </row>
1481    <row>
1482      <entry>OptFontProp ::=</entry>
1483      <entry>PrivateFontProp | XFontProp</entry>
1484    </row>
1485    <row>
1486      <entry>PrivateFontProp ::=</entry>
1487      <entry>STRING8 | Underscore OrganizationId Underscore STRING8</entry>
1488    </row>
1489    <row>
1490      <entry>XFontProp ::=</entry>
1491      <entry>
1492FOUNDRY | FAMILY_NAME | WEIGHT_NAME | SLANT | SETWIDTH_NAME | ADD_STYLE_NAME
1493| PIXEL_SIZE | POINT_SIZE | RESOLUTION_X | RESOLUTION_Y | SPACING |
1494AVERAGE_WIDTH | CHARSET_REGISTRY | CHARSET_ENCODING | QUAD_WIDTH |
1495RESOLUTION | MIN_SPACE | NORM_SPACE | MAX_SPACE | END_SPACE | SUPERSCRIPT_X |
1496SUPERSCRIPT_Y | SUBSCRIPT_X | SUBSCRIPT_Y | UNDERLINE_POSITION |
1497UNDERLINE_THICKNESS | STRIKEOUT_ASCENT | STRIKEOUT_DESCENT | ITALIC_ANGLE
1498| X_HEIGHT | WEIGHT | FACE_NAME |
1499FULL_NAME | FONT |
1500COPYRIGHT | AVG_CAPITAL_WIDTH |
1501AVG_LOWERCASE_WIDTH | RELATIVE_SETWIDTH | RELATIVE_WEIGHT | CAP_HEIGHT |
1502SUPERSCRIPT_ SIZE | FIGURE_WIDTH | SUBSCRIPT_SIZE | SMALL_CAP_SIZE |
1503NOTICE | DESTINATION
1504| FONT_TYPE | FONT_VERSION | RASTERIZER_NAME | RASTERIZER_VERSION |
1505RAW_ASCENT | RAW_DESCENT | RAW_* | AXIS_NAMES | AXIS_LIMITS |
1506AXIS_TYPES</entry>
1507    </row>
1508    <row>
1509      <entry>Underscore ::=</entry>
1510      <entry>OCTET-"_" (LOW LINE)</entry>
1511    </row>
1512    <row>
1513      <entry>OrganizationId ::=</entry>
1514      <entry>STRING8-the registered name of the organization</entry>
1515    </row>
1516  </tbody>
1517  </tgroup>
1518</informaltable>
1519
1520<sect2 id='FOUNDRY'>
1521<title>FOUNDRY</title>
1522<!-- .XS -->
1523<!-- (SN FOUNDRY -->
1524<!-- .XE -->
1525<para>
1526<!-- .LP -->
1527FOUNDRY is as defined in the
1528<function>FontName</function>
1529except that the property type is ATOM.
1530</para>
1531<para>
1532<!-- .LP -->
1533FOUNDRY cannot be calculated or defaulted if not supplied as a font property.
1534</para>
1535</sect2>
1536
1537<sect2 id='FAMILY_NAME'>
1538<title>FAMILY_NAME</title>
1539<!-- .XS -->
1540<!-- (SN FAMILY_NAME -->
1541<!-- .XE -->
1542<para>
1543<!-- .LP -->
1544FAMILY_NAME is as defined in the
1545<function>FontName</function>
1546except that the property type is ATOM.
1547</para>
1548<para>
1549<!-- .LP -->
1550FAMILY_NAME cannot be calculated or defaulted if not supplied as a font
1551property.
1552</para>
1553</sect2>
1554
1555<sect2 id='WEIGHT_NAME'>
1556<title>WEIGHT_NAME</title>
1557<!-- .XS -->
1558<!-- (SN WEIGHT_NAME -->
1559<!-- .XE -->
1560<para>
1561<!-- .LP -->
1562WEIGHT_NAME is as defined in the
1563<function>FontName</function>
1564except that the property type is ATOM.
1565</para>
1566<para>
1567<!-- .LP -->
1568WEIGHT_NAME can be defaulted if not supplied as a font property, as follows:
1569</para>
1570
1571<literallayout class="monospaced">
1572if (WEIGHT_NAME undefined) then
1573   WEIGHT_NAME = ATOM("Medium")
1574</literallayout>
1575</sect2>
1576
1577<sect2 id='SLANT'>
1578<title>SLANT</title>
1579<!-- .XS -->
1580<!-- (SN SLANT -->
1581<!-- .XE -->
1582<para>
1583<!-- .LP -->
1584SLANT is as defined in the
1585<function>FontName</function>
1586except that the property type is ATOM.
1587</para>
1588<para>
1589<!-- .LP -->
1590SLANT can be defaulted if not supplied as a font property, as follows:
1591</para>
1592
1593<literallayout class="monospaced">
1594if (SLANT undefined) then
1595   SLANT = ATOM("R")
1596</literallayout>
1597</sect2>
1598
1599<sect2 id='SETWIDTH_NAME'>
1600<title>SETWIDTH_NAME</title>
1601<!-- .XS -->
1602<!-- (SN SETWIDTH_NAME -->
1603<!-- .XE -->
1604<para>
1605<!-- .LP -->
1606SETWIDTH_NAME is as defined in the
1607<function>FontName</function>
1608except that the property type is ATOM.
1609</para>
1610<para>
1611<!-- .LP -->
1612SETWIDTH_NAME can be defaulted if not supplied as a font property, as follows:
1613</para>
1614
1615<literallayout class="monospaced">
1616if (SETWIDTH_NAME undefined) then
1617   SETWIDTH_NAME = ATOM("Normal")
1618</literallayout>
1619</sect2>
1620
1621<sect2 id='ADD_STYLE_NAME'>
1622<title>ADD_STYLE_NAME</title>
1623<!-- .XS -->
1624<!-- (SN ADD_STYLE_NAME -->
1625<!-- .XE -->
1626<para>
1627<!-- .LP -->
1628ADD_STYLE_NAME is as defined in the
1629<function>FontName</function>
1630except that the property type is ATOM.
1631</para>
1632<para>
1633<!-- .LP -->
1634ADD_STYLE_NAME can be defaulted if not supplied as a font property, as follows:
1635</para>
1636
1637<literallayout class="monospaced">
1638if (ADD_STYLE_NAME undefined) then
1639   ADD_STYLE_NAME = ATOM("")
1640</literallayout>
1641</sect2>
1642
1643<sect2 id='PIXEL_SIZE'>
1644<title>PIXEL_SIZE</title>
1645<!-- .XS -->
1646<!-- (SN PIXEL_SIZE -->
1647<!-- .XE -->
1648<para>
1649<!-- .LP -->
1650PIXEL_SIZE is as defined in the
1651<function>FontName</function>
1652except that the property type is INT32.
1653</para>
1654<para>
1655<!-- .LP -->
1656X clients requiring pixel values for the various typographic fixed
1657spaces (em space, en space, and thin space) can use the following
1658algorithm for computing these values from other properties specified
1659for a font:
1660</para>
1661
1662<literallayout class="monospaced">
1663     DeciPointsPerInch = 722.7
1664     EMspace = ROUND ((RESOLUTION_X * POINT_SIZE) / DeciPointsPerInch)
1665     ENspace = ROUND (EMspace / 2)
1666     THINspace = ROUND (EMspace / 3)\fP
1667</literallayout>
1668
1669<para>
1670<!-- .LP -->
1671where a slash (/) denotes real division,
1672an asterisk (*) denotes real multiplication,
1673and ROUND denotes a function that rounds its real argument
1674<emphasis remap='I'>a</emphasis> up or down
1675to the next integer.
1676This rounding is done according to X = FLOOR (
1677<emphasis remap='I'>a</emphasis> + 0.5),
1678where FLOOR is a function that rounds its real argument down to the
1679nearest integer.
1680</para>
1681<para>
1682<!-- .LP -->
1683PIXEL_SIZE can be approximated if not supplied as a font property,
1684according to the following algorithm:
1685</para>
1686
1687<!-- <literallayout class="monospaced"> -->
1688<literallayout class="monospaced">
1689DeciPointsPerInch = 722.7
1690if (PIXEL_SIZE undefined) then
1691   PIXEL_SIZE = ROUND ((RESOLUTION_Y * POINT_SIZE) / DeciPointsPerInch)
1692</literallayout>
1693
1694</sect2>
1695
1696<sect2 id='POINT_SIZE'>
1697<title>POINT_SIZE</title>
1698<!-- .XS -->
1699<!-- (SN POINT_SIZE -->
1700<!-- .XE -->
1701<para>
1702<!-- .LP -->
1703POINT_SIZE is as defined in the
1704<function>FontName</function>
1705except that the property type is INT32.
1706</para>
1707<para>
1708<!-- .LP -->
1709X clients requiring device-independent values for em space,
1710en space, and thin space can use the following algorithm:
1711</para>
1712<literallayout class="monospaced">
1713     EMspace = ROUND (POINT_SIZE / 10)
1714     ENspace = ROUND (POINT_SIZE / 20)
1715     THINspace = ROUND (POINT_SIZE / 30)
1716</literallayout>
1717
1718<para>
1719<!-- .LP -->
1720Design POINT_SIZE cannot be calculated or approximated.
1721</para>
1722</sect2>
1723
1724<sect2 id='RESOLUTION_X_x'>
1725<title>RESOLUTION_X</title>
1726<!-- .XS -->
1727<!-- (SN RESOLUTION_X -->
1728<!-- .XE -->
1729<para>
1730<!-- .LP -->
1731RESOLUTION_X is as defined in the
1732<function>FontName</function>
1733except that the property type is CARD32.
1734</para>
1735<para>
1736<!-- .LP -->
1737RESOLUTION_X cannot be calculated or approximated.
1738</para>
1739</sect2>
1740
1741<sect2 id='RESOLUTION_Y_y'>
1742<title>RESOLUTION_Y</title>
1743<!-- .XS -->
1744<!-- (SN RESOLUTION_Y -->
1745<!-- .XE -->
1746<para>
1747<!-- .LP -->
1748RESOLUTION_Y is as defined in the
1749<function>FontName</function>
1750except that the property type is CARD32.
1751</para>
1752<para>
1753<!-- .LP -->
1754RESOLUTION_X cannot be calculated or approximated.
1755</para>
1756</sect2>
1757
1758<sect2 id='SPACING'>
1759<title>SPACING</title>
1760<!-- .XS -->
1761<!-- (SN SPACING -->
1762<!-- .XE -->
1763<para>
1764<!-- .LP -->
1765SPACING is as defined in the
1766<function>FontName</function>
1767except that the property type is ATOM.
1768</para>
1769<para>
1770<!-- .LP -->
1771SPACING can be calculated if not supplied as a font property,
1772according to the definitions given above for the
1773<function>FontName</function>.
1774</para>
1775</sect2>
1776
1777<sect2 id='AVERAGE_WIDTH'>
1778<title>AVERAGE_WIDTH</title>
1779<!-- .XS -->
1780<!-- (SN AVERAGE_WIDTH -->
1781<!-- .XE -->
1782<para>
1783<!-- .LP -->
1784AVERAGE_WIDTH is as defined in the
1785<function>FontName</function>
1786except that the property type is INT32.
1787</para>
1788<para>
1789<!-- .LP -->
1790AVERAGE_WIDTH can be calculated if not provided as a font property,
1791according to the following algorithm:
1792</para>
1793
1794<literallayout class="monospaced">
1795if (AVERAGE_WIDTH undefined) then
1796     AVERAGE_WIDTH = ROUND (MEAN (ABS (width of each glyph in font)) * 10)
1797          * (if (dominant writing direction L-to-R) then 1 else -1)
1798</literallayout>
1799
1800<para>
1801<!-- .LP -->
1802where MEAN is a function that returns the arithmetic mean of its arguments.
1803</para>
1804<para>
1805<!-- .LP -->
1806X clients that require values for the number of characters per inch (pitch)
1807of a monospaced font can use the following algorithm using the
1808AVERAGE_WIDTH and RESOLUTION_X font properties:
1809</para>
1810
1811<literallayout class="monospaced">
1812if (SPACING not proportional) then
1813   CharPitch = (RESOLUTION_X * 10) / AVERAGE_WIDTH
1814</literallayout>
1815</sect2>
1816
1817<sect2 id='CHARSET_REGISTRY'>
1818<title>CHARSET_REGISTRY</title>
1819<!-- .XS -->
1820<!-- (SN CHARSET_REGISTRY -->
1821<!-- .XE -->
1822<para>
1823<!-- .LP -->
1824CHARSET_REGISTRY is as defined in the
1825<function>FontName</function>
1826except that the property type is ATOM.
1827</para>
1828<para>
1829<!-- .LP -->
1830CHARSET_REGISTRY cannot be defaulted if not supplied as a font property.
1831</para>
1832</sect2>
1833
1834<sect2 id='CHARSET_ENCODING'>
1835<title>CHARSET_ENCODING</title>
1836<!-- .XS -->
1837<!-- (SN CHARSET_ENCODING -->
1838<!-- .XE -->
1839<para>
1840<!-- .LP -->
1841CHARSET_ENCODING is as defined in the
1842<function>FontName</function>
1843except that the property type is ATOM.
1844</para>
1845<para>
1846<!-- .LP -->
1847CHARSET_ENCODING cannot be defaulted if not supplied as a font property.
1848</para>
1849</sect2>
1850
1851<sect2 id='MIN_SPACE'>
1852<title>MIN_SPACE</title>
1853<!-- .XS -->
1854<!-- (SN MIN_SPACE -->
1855<!-- .XE -->
1856<para>
1857<!-- .LP -->
1858MIN_SPACE is an integer value (of type INT32)
1859that gives the recommended minimum word-space value to be used with this font.
1860</para>
1861<para>
1862<!-- .LP -->
1863MIN_SPACE can be approximated if not provided as a font property,
1864according to the following algorithm:
1865</para>
1866
1867<literallayout class="monospaced">
1868if (MIN_SPACE undefined) then
1869   MIN_SPACE = ROUND(0.75 * NORM_SPACE)
1870</literallayout>
1871</sect2>
1872
1873<sect2 id='NORM_SPACE'>
1874<title>NORM_SPACE</title>
1875<!-- .XS -->
1876<!-- (SN NORM_SPACE -->
1877<!-- .XE -->
1878<para>
1879<!-- .LP -->
1880NORM_SPACE is an integer value (of type INT32)
1881that gives the recommended normal word-space value to be used with this font.
1882</para>
1883<para>
1884<!-- .LP -->
1885NORM_SPACE can be approximated if not provided as a font property,
1886according to the following algorithm:
1887</para>
1888
1889<literallayout class="monospaced">
1890DeciPointsPerInch = 722.7
1891if (NORM_SPACE undefined) then
1892   if (SPACE glyph exists) then
1893      NORM_SPACE = width of SPACE
1894   else NORM_SPACE = ROUND((0.33 * RESOLUTION_X * POINT_SIZE)/ DeciPointsPerInch)
1895</literallayout>
1896</sect2>
1897
1898<sect2 id='MAX_SPACE'>
1899<title>MAX_SPACE</title>
1900<!-- .XS -->
1901<!-- (SN MAX_SPACE -->
1902<!-- .XE -->
1903<para>
1904<!-- .LP -->
1905MAX_SPACE is an integer value (of type INT32)
1906that gives the recommended maximum word-space value to be used with this font.
1907</para>
1908<para>
1909<!-- .LP -->
1910MAX_SPACE can be approximated if not provided as a font property,
1911according to the following algorithm:
1912</para>
1913
1914<literallayout class="monospaced">
1915if (MAX_SPACE undefined) then
1916   MAX_SPACE = ROUND(1.5 * NORM_SPACE)
1917</literallayout>
1918</sect2>
1919
1920<sect2 id='END_SPACE'>
1921<title>END_SPACE</title>
1922<!-- .XS -->
1923<!-- (SN END_SPACE -->
1924<!-- .XE -->
1925<para>
1926<!-- .LP -->
1927END_SPACE is an integer value (of type INT32)
1928that gives the recommended spacing at the end of sentences.
1929</para>
1930<para>
1931<!-- .LP -->
1932END_SPACE can be approximated if not provided as a font property,
1933according to the following algorithm:
1934</para>
1935
1936<literallayout class="monospaced">
1937if (END_SPACE undefined) then
1938   END_SPACE = NORM_SPACE
1939</literallayout>
1940</sect2>
1941
1942<sect2 id='AVG_CAPITAL_WIDTH'>
1943<title>AVG_CAPITAL_WIDTH</title>
1944<!-- .XS -->
1945<!-- (SN AVG_CAPITAL_WIDTH -->
1946<!-- .XE -->
1947<para>
1948<!-- .LP -->
1949AVG_CAPITAL_WIDTH is an integer value (of type INT32)
1950that gives the unweighted arithmetic mean of the absolute value of the
1951width of each capital glyph in the font, in tenths of pixels,
1952multiplied by -1 if the dominant
1953writing direction for the font is right-to-left.
1954This property applies to both Latin and non-Latin fonts.
1955For Latin fonts,
1956capitals are the glyphs A through Z.
1957This property is usually used for font matching or substitution.
1958</para>
1959<para>
1960<!-- .LP -->
1961AVG_CAPITAL_WIDTH can be calculated if not provided as a font property,
1962according to the following algorithm:
1963</para>
1964
1965<literallayout class="monospaced">
1966if (AVG_CAPITAL_WIDTH undefined) then
1967   if (capitals exist) then
1968      AVG_CAPITAL_WIDTH = ROUND (MEAN
1969           (ABS (width of each capital glyph)) * 10)
1970           * (if (dominant writing direction L-to-R) then 1 else -1)
1971   else AVG_CAPITAL_WIDTH undefined
1972</literallayout>
1973</sect2>
1974
1975<sect2 id='AVG_LOWERCASE_WIDTH'>
1976<title>AVG_LOWERCASE_WIDTH</title>
1977<!-- .XS -->
1978<!-- (SN AVG_LOWERCASE_WIDTH -->
1979<!-- .XE -->
1980<para>
1981<!-- .LP -->
1982AVG_LOWERCASE_WIDTH is an integer value (of type INT32)
1983that gives the unweighted arithmetic mean width of the absolute value
1984of the width of each lowercase glyph in the font in tenths of pixels,
1985multiplied by -1 if the dominant
1986writing direction for the font is right-to-left.
1987For Latin fonts,
1988lowercase are the glyphs a through z.
1989This property is usually used for font matching or substitution.
1990</para>
1991<para>
1992<!-- .LP -->
1993Where appropriate,
1994AVG_LOWERCASE_WIDTH can be approximated if not provided as a font property,
1995according to the following algorithm:
1996</para>
1997
1998<literallayout class="monospaced">
1999if (AVG_LOWERCASE_WIDTH undefined) then
2000   if (lowercase exists) then
2001      AVG_LOWERCASE_WIDTH = ROUND (MEAN
2002                       (ABS (width of each lowercase glyph)) * 10)
2003       * (if (dominant writing direction L-to-R) then 1 else -1)
2004   else AVG_LOWERCASE_WIDTH undefined
2005</literallayout>
2006</sect2>
2007
2008<sect2 id='QUAD_WIDTH'>
2009<title>QUAD_WIDTH</title>
2010<!-- .XS -->
2011<!-- (SN QUAD_WIDTH -->
2012<!-- .XE -->
2013<para>
2014<!-- .LP -->
2015QUAD_WIDTH is an integer typographic metric (of type INT32)
2016that gives the width of a quad (em) space.
2017</para>
2018<note>
2019<para>
2020<!-- .NT Note -->
2021Because all typographic fixed spaces (em, en, and thin) are constant
2022for a given font size (that is, they do not vary according to setwidth),
2023the use of this font property has been deprecated.
2024X clients that require typographic fixed space values are encouraged
2025to discontinue use of QUAD_WIDTH and compute these values
2026from other font properties (for example, PIXEL_SIZE).
2027X clients that require  a font-dependent width value should use either
2028the FIGURE_WIDTH or one of the average character width font properties
2029(AVERAGE_WIDTH, AVG_CAPITAL_WIDTH or AVG_LOWERCASE_WIDTH).
2030</para>
2031</note>
2032<!-- .NE -->
2033</sect2>
2034
2035<sect2 id='FIGURE_WIDTH'>
2036<title>FIGURE_WIDTH</title>
2037<!-- .XS -->
2038<!-- (SN FIGURE_WIDTH -->
2039<!-- .XE -->
2040<para>
2041<!-- .LP -->
2042FIGURE_WIDTH is an integer typographic metric (of type INT32)
2043that gives the width of the tabular figures and the dollar sign,
2044if suitable for tabular setting (all widths equal).
2045For Latin fonts, these tabular figures are the Arabic numerals 0 through 9.
2046</para>
2047<para>
2048<!-- .LP -->
2049FIGURE_WIDTH can be approximated if not supplied as a font property,
2050according to the following algorithm:
2051</para>
2052
2053<literallayout class="monospaced">
2054if (numerals and DOLLAR sign are defined &amp; widths are equal) then
2055   FIGURE_WIDTH = width of DOLLAR
2056else FIGURE_WIDTH property undefined
2057</literallayout>
2058</sect2>
2059
2060<sect2 id='SUPERSCRIPT_X_x'>
2061<title>SUPERSCRIPT_X</title>
2062<!-- .XS -->
2063<!-- (SN SUPERSCRIPT_X -->
2064<!-- .XE -->
2065<para>
2066<!-- .LP -->
2067SUPERSCRIPT_X is an integer value (of type INT32)
2068that gives the recommended horizontal offset in pixels
2069from the position point to the X origin of synthetic superscript text.
2070If the current position point is at [X,Y],
2071then superscripts should begin at [X + SUPERSCRIPT_X, Y - SUPERSCRIPT_Y].
2072</para>
2073<para>
2074<!-- .LP -->
2075SUPERSCRIPT_X can be approximated if not provided as a font property,
2076according to the following algorithm:
2077</para>
2078
2079<literallayout class="monospaced">
2080if (SUPERSCRIPT_X undefined) then
2081   if (TANGENT(ITALIC_ANGLE) defined) then
2082      SUPERSCRIPT_X = ROUND((0.40 * CAP_HEIGHT) / TANGENT(ITALIC_ANGLE))
2083   else SUPERSCRIPT_X = ROUND(0.40 * CAP_HEIGHT)
2084</literallayout>
2085
2086<para>
2087<!-- .LP -->
2088where TANGENT is a trigonometric function that returns the tangent of
2089its argument, which is in 1/64 degrees.
2090</para>
2091</sect2>
2092
2093<sect2 id='SUPERSCRIPT_Y_y'>
2094<title>SUPERSCRIPT_Y</title>
2095<!-- .XS -->
2096<!-- (SN SUPERSCRIPT_Y -->
2097<!-- .XE -->
2098<para>
2099<!-- .LP -->
2100SUPERSCRIPT_Y is an integer value (of type INT32)
2101that gives the recommended vertical offset in pixels
2102from the position point to the Y origin of synthetic superscript text.
2103If the current position point is at [X,Y],
2104then superscripts should begin at [X + SUPERSCRIPT_X, Y - SUPERSCRIPT_Y].
2105</para>
2106<para>
2107<!-- .LP -->
2108SUPERSCRIPT_Y can be approximated if not provided as a font property,
2109according to the following algorithm:
2110</para>
2111<literallayout class="monospaced">
2112if (SUPERSCRIPT_Y undefined) then
2113   SUPERSCRIPT_Y = ROUND(0.40 * CAP_HEIGHT)
2114</literallayout>
2115</sect2>
2116
2117<sect2 id='SUBSCRIPT_X_x'>
2118<title>SUBSCRIPT_X</title>
2119<!-- .XS -->
2120<!-- (SN SUBSCRIPT_X -->
2121<!-- .XE -->
2122<para>
2123<!-- .LP -->
2124SUBSCRIPT_X is an integer value (of type INT32)
2125that gives the recommended horizontal offset in pixels
2126from the position point to the X origin of synthetic subscript text.
2127If the current position point is at [X,Y],
2128then subscripts should begin at [X + SUBSCRIPT_X, Y + SUBSCRIPT_Y].
2129</para>
2130<para>
2131<!-- .LP -->
2132SUBSCRIPT_X can be approximated if not provided as a font property,
2133according to the following algorithm:
2134</para>
2135
2136<literallayout class="monospaced">
2137if (SUBSCRIPT_X undefined) then
2138   if (TANGENT(ITALIC_ANGLE) defined) then
2139      SUBSCRIPT_X = ROUND((0.40 * CAP_HEIGHT) / TANGENT(ITALIC_ANGLE))
2140   else SUBSCRIPT_X = ROUND(0.40 * CAP_HEIGHT)
2141</literallayout>
2142</sect2>
2143
2144<sect2 id='SUBSCRIPT_Y_y'>
2145<title>SUBSCRIPT_Y</title>
2146<!-- .XS -->
2147<!-- (SN SUBSCRIPT_Y -->
2148<!-- .XE -->
2149<para>
2150<!-- .LP -->
2151SUBSCRIPT_Y is an integer value (of type INT32)
2152that gives the recommended vertical offset in pixels
2153from the position point to the Y origin of synthetic subscript text.
2154If the current position point is at [X,Y],
2155then subscripts should begin at [X + SUBSCRIPT_X, Y + SUBSCRIPT_Y].
2156</para>
2157<para>
2158<!-- .LP -->
2159SUBSCRIPT_Y can be approximated if not provided as a font property,
2160according to the following algorithm:
2161</para>
2162
2163<literallayout class="monospaced">
2164if (SUBSCRIPT_Y undefined) then
2165   SUBSCRIPT_Y = ROUND(0.40 * CAP_HEIGHT)
2166</literallayout>
2167</sect2>
2168
2169<sect2 id='SUPERSCRIPT_SIZE'>
2170<title>SUPERSCRIPT_SIZE</title>
2171<!-- .XS -->
2172<!-- (SN SUPERSCRIPT_SIZE -->
2173<!-- .XE -->
2174<para>
2175<!-- .LP -->
2176SUPERSCRIPT_SIZE is an integer value (of type INT32)
2177that gives the recommended body size of synthetic superscripts
2178to be used with this font, in pixels.
2179This will generally be smaller than the size of the current font;
2180that is, superscripts are imaged from a smaller font
2181offset according to SUPERSCRIPT_X and SUPERSCRIPT_Y.
2182</para>
2183<para>
2184<!-- .LP -->
2185SUPERSCRIPT_SIZE can be approximated if not provided as a font property,
2186according to the following algorithm:
2187</para>
2188
2189<literallayout class="monospaced">
2190if (SUPERSCRIPT_SIZE undefined) then
2191   SUPERSCRIPT_SIZE = ROUND(0.60 * PIXEL_SIZE)
2192</literallayout>
2193</sect2>
2194
2195<sect2 id='SUBSCRIPT_SIZE'>
2196<title>SUBSCRIPT_SIZE</title>
2197<!-- .XS -->
2198<!-- (SN SUBSCRIPT_SIZE -->
2199<!-- .XE -->
2200<para>
2201<!-- .LP -->
2202SUBSCRIPT_SIZE is an integer value (of type INT32)
2203that gives the recommended body size of synthetic subscripts
2204to be used with this font, in pixels.
2205As with SUPERSCRIPT_SIZE,
2206this will generally be smaller than the size of the current font;
2207that is, subscripts are imaged from a smaller
2208font offset according to SUBSCRIPT_X and SUBSCRIPT_Y.
2209</para>
2210<para>
2211<!-- .LP -->
2212SUBSCRIPT_SIZE can be approximated if not provided as a font property,
2213according to the algorithm:
2214</para>
2215
2216<literallayout class="monospaced">
2217if (SUBSCRIPT_SIZE undefined) then
2218   SUBSCRIPT_SIZE = ROUND(0.60 * PIXEL_SIZE)
2219</literallayout>
2220</sect2>
2221
2222<sect2 id='SMALL_CAP_SIZE'>
2223<title>SMALL_CAP_SIZE</title>
2224<!-- .XS -->
2225<!-- (SN SMALL_CAP_SIZE -->
2226<!-- .XE -->
2227<para>
2228<!-- .LP -->
2229SMALL_CAP_SIZE is an integer value (of type INT32)
2230that gives the recommended body size of synthetic small capitals
2231to be used with this font, in pixels.
2232Small capitals are generally imaged from a smaller font
2233of slightly more weight.
2234No offset [X,Y] is necessary.
2235</para>
2236<para>
2237<!-- .LP -->
2238SMALL_CAP_SIZE can be approximated if not provided as a font property,
2239according to the following algorithm:
2240</para>
2241
2242<literallayout class="monospaced">
2243if (SMALL_CAP_SIZE undefined) then
2244   SMALL_CAP_SIZE = ROUND(PIXEL_SIZE * ((X_HEIGHT
2245                              + ((CAP_HEIGHT - X_HEIGHT) / 3)) / CAP_HEIGHT))
2246</literallayout>
2247</sect2>
2248
2249<sect2 id='UNDERLINE_POSITION'>
2250<title>UNDERLINE_POSITION</title>
2251<!-- .XS -->
2252<!-- (SN UNDERLINE_POSITION -->
2253<!-- .XE -->
2254<para>
2255<!-- .LP -->
2256UNDERLINE_POSITION is an integer value (of type INT32)
2257that gives the recommended vertical offset in pixels
2258from the baseline to the top of the underline.
2259If the current position point is at [X,Y],
2260the top of the baseline is given by [X, Y + UNDERLINE_POSITION].
2261</para>
2262<para>
2263<!-- .LP -->
2264UNDERLINE_POSITION can be approximated if not provided as a font
2265property, according to the following algorithm:
2266</para>
2267
2268<literallayout class="monospaced">
2269if (UNDERLINE_POSITION undefined) then
2270   UNDERLINE_POSITION = ROUND((maximum descent) / 2)
2271</literallayout>
2272<para>
2273where <emphasis remap='I'>maximum descent</emphasis>
2274is the maximum descent (below the baseline)
2275in pixels of any glyph in the font.
2276</para>
2277</sect2>
2278
2279<sect2 id='UNDERLINE_THICKNESS'>
2280<title>UNDERLINE_THICKNESS</title>
2281<!-- .XS -->
2282<!-- (SN UNDERLINE_THICKNESS -->
2283<!-- .XE -->
2284<para>
2285<!-- .LP -->
2286UNDERLINE_THICKNESS is an integer value (of type INT32)
2287that gives the recommended underline thickness, in pixels.
2288</para>
2289<para>
2290<!-- .LP -->
2291UNDERLINE_THICKNESS can be approximated if not provided as a font property,
2292according to the following algorithm:
2293</para>
2294
2295<literallayout class="monospaced">
2296CapStemWidth = average width of the stems of capitals
2297if (UNDERLINE_THICKNESS undefined) then
2298   UNDERLINE_THICKNESS = CapStemWidth
2299</literallayout>
2300</sect2>
2301
2302<sect2 id='STRIKEOUT_ASCENT'>
2303<title>STRIKEOUT_ASCENT</title>
2304<!-- .XS -->
2305<!-- (SN STRIKEOUT_ASCENT -->
2306<!-- .XE -->
2307<para>
2308<!-- .LP -->
2309STRIKEOUT_ASCENT is an integer value (of type INT32)
2310that gives the vertical ascent for boxing or voiding glyphs in this font.
2311If the current position is at [X,Y] and the string extent is EXTENT,
2312the upper-left corner of the strikeout box is at [X, Y - STRIKEOUT_ASCENT]
2313and the lower-right corner of the box is at [X + EXTENT, Y + STRIKEOUT_DESCENT].
2314</para>
2315<para>
2316<!-- .LP -->
2317STRIKEOUT_ASCENT can be approximated if not provided as a font property,
2318according to the following algorithm:
2319</para>
2320
2321<literallayout class="monospaced">
2322if (STRIKEOUT_ASCENT undefined)
2323   STRIKEOUT_ASCENT = maximum ascent
2324</literallayout>
2325<para>
2326where <emphasis remap='I'>maximum ascent</emphasis>
2327is the maximum ascent (above the baseline)
2328in pixels of any glyph in the font.
2329</para>
2330</sect2>
2331
2332<sect2 id='STRIKEOUT_DESCENT'>
2333<title>STRIKEOUT_DESCENT</title>
2334<!-- .XS -->
2335<!-- (SN STRIKEOUT_DESCENT -->
2336<!-- .XE -->
2337<para>
2338<!-- .LP -->
2339STRIKEOUT_DESCENT is an integer value (of type INT32)
2340that gives the vertical descent for boxing or voiding glyphs in this font.
2341If the current position is at [X,Y] and the string extent is EXTENT,
2342the upper-left corner of the strikeout box is at [X, Y - STRIKEOUT_ASCENT]
2343and the lower-right corner of the box is at
2344[X + EXTENT, Y + STRIKEOUT_DESCENT].
2345</para>
2346<para>
2347<!-- .LP -->
2348STRIKEOUT_DESCENT can be approximated if not provided as a font property,
2349according to the following algorithm:
2350</para>
2351
2352<literallayout class="monospaced">
2353if (STRIKEOUT_DESCENT undefined)
2354   STRIKEOUT_DESCENT = maximum descent
2355</literallayout>
2356
2357<para>
2358where <emphasis remap='I'>maximum descent</emphasis> is the maximum
2359descent (below the baseline)
2360in pixels of any glyph in the font.
2361</para>
2362</sect2>
2363
2364<sect2 id='ITALIC_ANGLE'>
2365<title>ITALIC_ANGLE</title>
2366<!-- .XS -->
2367<!-- (SN ITALIC_ANGLE -->
2368<!-- .XE -->
2369<para>
2370<!-- .LP -->
2371ITALIC_ANGLE is an integer value (of type INT32)
2372that gives the nominal posture angle of the typeface design, in 1/64 degrees,
2373measured from the glyph origin counterclockwise from the three o'clock position.
2374</para>
2375<para>
2376<!-- .LP -->
2377ITALIC_ANGLE can be defaulted if not provided as a font property,
2378according to the following algorithm:
2379</para>
2380<literallayout class="monospaced">
2381if (ITALIC_ANGLE undefined) then
2382   ITALIC_ANGLE = (90 * 64)
2383</literallayout>
2384</sect2>
2385
2386<sect2 id='CAP_HEIGHT'>
2387<title>CAP_HEIGHT</title>
2388<!-- .XS -->
2389<!-- (SN CAP_HEIGHT -->
2390<!-- .XE -->
2391<para>
2392<!-- .LP -->
2393CAP_HEIGHT is an integer value (of type INT32)
2394that gives the nominal height of the capital letters contained in the font,
2395as specified by the FOUNDRY or typeface designer.
2396</para>
2397<para>
2398<!-- .LP -->
2399Certain clients require CAP_HEIGHT to compute scale factors and
2400positioning offsets for synthesized glyphs where this
2401information or designed glyphs are not explicitly provided by the font
2402(for example, small capitals, superiors, inferiors, and so on).
2403CAP_HEIGHT is also a critical factor in font matching and substitution.
2404</para>
2405<para>
2406<!-- .LP -->
2407CAP_HEIGHT can be approximated if not provided as a font property,
2408according to the following algorithm:
2409</para>
2410
2411<literallayout class="monospaced">
2412if (CAP_HEIGHT undefined) then
2413   if (Latin font) then
2414      CAP_HEIGHT = XCharStruct.ascent[glyph X]
2415   else if (capitals exist) then
2416       CAP_HEIGHT = XCharStruct.ascent[some unaccented capital glyph]
2417   else CAP_HEIGHT undefined
2418</literallayout>
2419</sect2>
2420
2421<sect2 id='X_HEIGHT'>
2422<title>X_HEIGHT</title>
2423<!-- .XS -->
2424<!-- (SN X_HEIGHT -->
2425<!-- .XE -->
2426<para>
2427<!-- .LP -->
2428X_HEIGHT is an integer value (of type INT32)
2429that gives the nominal height above the baseline of the lowercase glyphs
2430contained in the font,
2431as specified by the FOUNDRY or typeface designer.
2432</para>
2433<para>
2434<!-- .LP -->
2435As with CAP_HEIGHT,
2436X_HEIGHT is required by certain clients to compute scale factors
2437for synthesized small capitals where this information is not explicitly
2438provided by the font resource.
2439X_HEIGHT is a critical factor in font matching and substitution.
2440</para>
2441<para>
2442<!-- .LP -->
2443X_HEIGHT can be approximated if not provided as a font property,
2444according to the following algorithm:
2445</para>
2446
2447<literallayout class="monospaced">
2448if (X_HEIGHT undefined) then
2449   if (Latin font) then
2450      X_HEIGHT = XCharStruct.ascent[glyph x]
2451   else if (lowercase exists) then
2452        X_HEIGHT = XCharStruct.ascent[some unaccented lc glyph without an ascender]
2453   else X_HEIGHT undefined
2454</literallayout>
2455</sect2>
2456
2457<sect2 id='RELATIVE_SETWIDTH'>
2458<title>RELATIVE_SETWIDTH</title>
2459<!-- .XS -->
2460<!-- (SN RELATIVE_SETWIDTH -->
2461<!-- .XE -->
2462<para>
2463<!-- .LP -->
2464RELATIVE_SETWIDTH is an unsigned integer value (of type CARD32)
2465that gives the coded proportionate width of the font,
2466relative to all known fonts of the same typeface family,
2467according to the type designer's or FOUNDRY's judgment.
2468</para>
2469<para>
2470<!-- .LP -->
2471RELATIVE_SETWIDTH ranges from 10 to 90 or is 0 if undefined or unknown.
2472The following reference values are defined:
2473</para>
2474<informaltable frame="topbot">
2475  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
2476  <colspec colname='c1' colwidth='1.0*'/>
2477  <colspec colname='c2' colwidth='3.0*'/>
2478  <colspec colname='c3' colwidth='5.0*'/>
2479  <thead>
2480    <row rowsep='1'>
2481      <entry>Code</entry>
2482      <entry>English Translation</entry>
2483      <entry>Description</entry>
2484    </row>
2485  </thead>
2486  <tbody>
2487    <row>
2488      <entry>0</entry>
2489      <entry>Undefined</entry>
2490      <entry>Undefined or unknown</entry>
2491    </row>
2492    <row>
2493      <entry>10</entry>
2494      <entry>UltraCondensed</entry>
2495      <entry>The lowest ratio of average width to height</entry>
2496    </row>
2497    <row>
2498      <entry>20</entry>
2499      <entry>ExtraCondensed</entry>
2500    </row>
2501    <row>
2502      <entry>30</entry>
2503      <entry>Condensed</entry>
2504      <entry>Condensed, Narrow, Compressed, ...</entry>
2505    </row>
2506    <row>
2507      <entry>40</entry>
2508      <entry>SemiCondensed</entry>
2509    </row>
2510    <row>
2511      <entry>50</entry>
2512      <entry>Medium</entry>
2513      <entry>Medium, Normal, Regular, ...</entry>
2514    </row>
2515    <row>
2516      <entry>60</entry>
2517      <entry>SemiExpanded</entry>
2518      <entry>SemiExpanded, DemiExpanded, ...</entry>
2519    </row>
2520    <row>
2521      <entry>70</entry>
2522      <entry>Expanded</entry>
2523    </row>
2524    <row>
2525      <entry>80</entry>
2526      <entry>ExtraExpanded</entry>
2527      <entry>ExtraExpanded, Wide, ...</entry>
2528    </row>
2529    <row>
2530      <entry>90</entry>
2531      <entry>UltraExpanded</entry>
2532      <entry>The highest ratio of average width to height</entry>
2533    </row>
2534  </tbody>
2535  </tgroup>
2536</informaltable>
2537
2538<para>
2539<!-- .LP -->
2540RELATIVE_SETWIDTH can be defaulted if not provided as a font property,
2541according to the following algorithm:
2542</para>
2543
2544<literallayout class="monospaced">
2545if (RELATIVE_SETWIDTH undefined) then
2546   RELATIVE_SETWIDTH = 50
2547</literallayout>
2548
2549<para>
2550<!-- .LP -->
2551For polymorphic fonts, RELATIVE_SETWIDTH is not necessarily a
2552linear function of the font's setwidth axis.
2553</para>
2554<para>
2555<!-- .LP -->
2556X clients that want to obtain a calculated proportionate width of the
2557font (that is, a font-independent way of identifying the proportionate
2558width across all fonts and all font vendors) can use the following algorithm:
2559</para>
2560
2561<literallayout class="monospaced">
2562SETWIDTH = AVG_CAPITAL_WIDTH / (CAP_HEIGHT * 10)
2563</literallayout>
2564
2565<para>
2566<!-- .LP -->
2567where SETWIDTH is a real number with zero being the narrowest
2568calculated setwidth.
2569</para>
2570</sect2>
2571
2572<sect2 id='RELATIVE_WEIGHT'>
2573<title>RELATIVE_WEIGHT</title>
2574<!-- .XS -->
2575<!-- (SN RELATIVE_WEIGHT -->
2576<!-- .XE -->
2577<para>
2578<!-- .LP -->
2579RELATIVE_WEIGHT is an unsigned integer value (of type CARD32)
2580that gives the coded weight of the font,
2581relative to all known fonts of the same typeface family,
2582according to the type designer's or FOUNDRY's judgment.
2583</para>
2584<para>
2585<!-- .LP -->
2586RELATIVE_WEIGHT ranges from 10 to 90 or is 0 if undefined or unknown.
2587The following reference values are defined:
2588</para>
2589<informaltable frame="topbot">
2590  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
2591  <colspec colname='c1' colwidth='1.0*'/>
2592  <colspec colname='c2' colwidth='3.0*'/>
2593  <colspec colname='c3' colwidth='6.0*'/>
2594  <thead>
2595    <row rowsep='1'>
2596      <entry>Code</entry>
2597      <entry>English Translation</entry>
2598      <entry>Description</entry>
2599    </row>
2600  </thead>
2601  <tbody>
2602    <row>
2603      <entry>0</entry>
2604      <entry>Undefined</entry>
2605      <entry>Undefined or unknown</entry>
2606    </row>
2607    <row>
2608      <entry>10</entry>
2609      <entry>UltraLight</entry>
2610      <entry>The lowest ratio of stem width to height</entry>
2611    </row>
2612    <row>
2613      <entry>20</entry>
2614      <entry>ExtraLight</entry>
2615    </row>
2616    <row>
2617      <entry>30</entry>
2618      <entry>Light</entry>
2619    </row>
2620    <row>
2621      <entry>40</entry>
2622      <entry>SemiLight</entry>
2623      <entry>SemiLight, Book, ...</entry>
2624    </row>
2625    <row>
2626      <entry>50</entry>
2627      <entry>Medium</entry>
2628      <entry>Medium, Normal, Regular,...</entry>
2629    </row>
2630    <row>
2631      <entry>60</entry>
2632      <entry>SemiBold</entry>
2633      <entry>SemiBold, DemiBold, ...</entry>
2634    </row>
2635    <row>
2636      <entry>70</entry>
2637      <entry>Bold</entry>
2638    </row>
2639    <row>
2640      <entry>80</entry>
2641      <entry>ExtraBold</entry>
2642      <entry>ExtraBold, Heavy, ...</entry>
2643    </row>
2644    <row>
2645      <entry>90</entry>
2646      <entry>UltraBold</entry>
2647      <entry>
2648UltraBold, Black, ..., the highest ratio of stem width to height
2649      </entry>
2650    </row>
2651  </tbody>
2652  </tgroup>
2653</informaltable>
2654
2655<para>
2656<!-- .LP -->
2657RELATIVE_WEIGHT can be defaulted if not provided as a font property,
2658according to the following algorithm:
2659</para>
2660
2661<literallayout class="monospaced">
2662if (RELATIVE_WEIGHT undefined) then
2663   RELATIVE_WEIGHT = 50
2664</literallayout>
2665
2666<para>
2667<!-- .LP -->
2668For polymorphic fonts, RELATIVE_WEIGHT is not necessarily a
2669linear function of the font's weight axis.
2670</para>
2671</sect2>
2672
2673<sect2 id='WEIGHT'>
2674<title>WEIGHT</title>
2675<!-- .XS -->
2676<!-- (SN WEIGHT -->
2677<!-- .XE -->
2678<para>
2679<!-- .LP -->
2680Calculated WEIGHT is an unsigned integer value (of type CARD32)
2681that gives the calculated weight of the font,
2682computed as the ratio of capital stem width to CAP_HEIGHT,
2683in the range 0 to 1000, where 0 is the lightest weight.
2684</para>
2685<para>
2686<!-- .LP -->
2687WEIGHT can be calculated if not supplied as a font property,
2688according to the following algorithm:
2689</para>
2690
2691<literallayout class="monospaced">
2692CapStemWidth = average width of the stems of capitals
2693if (WEIGHT undefined) then
2694   WEIGHT = ROUND ((CapStemWidth * 1000) / CAP_HEIGHT)
2695</literallayout>
2696
2697<para>
2698<!-- .LP -->
2699A calculated value for weight is necessary when matching fonts from
2700different families because both the RELATIVE_WEIGHT and the WEIGHT_NAME are
2701assigned by the typeface supplier, according to its tradition and practice,
2702and therefore, are somewhat subjective.
2703Calculated WEIGHT provides a font-independent way of identifying
2704the weight across all fonts and all font vendors.
2705</para>
2706</sect2>
2707
2708<sect2 id='RESOLUTION'>
2709<title>RESOLUTION</title>
2710<!-- .XS -->
2711<!-- (SN RESOLUTION  -->
2712<!-- .XE -->
2713<para>
2714<!-- .LP -->
2715RESOLUTION is an integer value (of type INT32)
2716that gives the resolution for which this font was created,
2717measured in 1/100 pixels per point.
2718</para>
2719<note><para>
2720<!-- .NT Note -->
2721As independent horizontal and vertical design resolution components
2722are required to accommodate displays with nonsquare aspect ratios,
2723the use of this font property has been deprecated,
2724and independent RESOLUTION_X and RESOLUTION_Y font name fields/properties
2725have been defined (see sections 3.1.2.9 and 3.1.2.10).
2726X clients are encouraged to discontinue use of the RESOLUTION property
2727and are encouraged to use the appropriate X,Y resolution properties,
2728as required.
2729<!-- .NE                     \" Note End -->
2730</para></note>
2731</sect2>
2732
2733<sect2 id='Font_support'>
2734<title>FONT</title>
2735<!-- .XS -->
2736<!-- (SN FONT -->
2737<!-- .XE -->
2738<para>
2739<!-- .LP -->
2740FONT is a string (of type ATOM) that gives the full XLFD name of the
2741font-that is, the value can be used to open another
2742instance of the same font.
2743</para>
2744<para>
2745<!-- .LP -->
2746If not provided, the FONT property cannot be calculated.
2747</para>
2748</sect2>
2749
2750<sect2 id='FACE_NAME'>
2751<title>FACE_NAME</title>
2752<!-- .XS -->
2753<!-- (SN FACE_NAME -->
2754<!-- .XE -->
2755<para>
2756<!-- .LP -->
2757FACE_NAME is a human-understandable string (of type ATOM)
2758that gives the full device-independent typeface name,
2759including the owner, weight, slant, set, and so on
2760but not the resolution, size, and so on.
2761This property may be used as feedback during font selection.
2762</para>
2763<para>
2764<!-- .LP -->
2765FACE_NAME cannot be calculated or approximated if not provided as a font
2766property.
2767</para>
2768</sect2>
2769
2770<sect2 id='FULL_NAME'>
2771<title>FULL_NAME</title>
2772<!-- .XS -->
2773<!-- (SN FULL_NAME -->
2774<!-- .XE -->
2775<para>
2776<!-- .LP -->
2777FULL_NAME is the same as FACE_NAME.
2778Its use is deprecated, but it is found on some old fonts.
2779</para>
2780</sect2>
2781
2782<sect2 id='COPYRIGHT'>
2783<title>COPYRIGHT</title>
2784<!-- .XS -->
2785<!-- (SN COPYRIGHT -->
2786<!-- .XE -->
2787<para>
2788<!-- .LP -->
2789COPYRIGHT is a human-understandable string (of type ATOM)
2790that gives the copyright information of the legal owner
2791of the digital font data.
2792</para>
2793<para>
2794<!-- .LP -->
2795This information is a required component of a font
2796but is independent of the particular format used to represent it
2797(that is, it cannot be captured as a comment that could later
2798be thrown away for efficiency reasons).
2799</para>
2800<para>
2801<!-- .LP -->
2802COPYRIGHT cannot be calculated or approximated if not provided as a font
2803property.
2804</para>
2805</sect2>
2806
2807<sect2 id='NOTICE'>
2808<title>NOTICE</title>
2809<!-- .XS -->
2810<!-- (SN NOTICE -->
2811<!-- .XE -->
2812<para>
2813<!-- .LP -->
2814NOTICE is a human-understandable string (of type ATOM)
2815that gives the copyright information of the legal owner of the font design
2816or, if not applicable, the trademark information for the typeface FAMILY_NAME.
2817</para>
2818<para>
2819<!-- .LP -->
2820Typeface design and trademark protection laws vary from country to country,
2821the USA having no design copyright protection currently
2822while various countries in Europe offer both design and typeface family name
2823trademark protection.
2824As with COPYRIGHT,
2825this information is a required component of a font
2826but is independent of the particular format used to represent it.
2827</para>
2828<para>
2829<!-- .LP -->
2830NOTICE cannot be calculated or approximated if not provided as
2831a font property.
2832</para>
2833</sect2>
2834
2835<sect2 id='DESTINATION'>
2836<title>DESTINATION</title>
2837<!-- .XS -->
2838<!-- (SN DESTINATION -->
2839<!-- .XE -->
2840<para>
2841<!-- .LP -->
2842DESTINATION is an unsigned integer code (of type CARD32)
2843that gives the font design destination,
2844that is, whether it was designed as a screen proofing font to match
2845printer font glyph widths (WYSIWYG), as an optimal video font (possibly with
2846corresponding printer font) for extended screen viewing (video text), and so on.
2847</para>
2848<para>
2849<!-- .LP -->
2850The font design considerations are very different,
2851and at current display resolutions,
2852the readability and legibility of these two kinds of screen fonts
2853are very different.
2854DESTINATION allows publishing clients that use X to model the printed page
2855and video text clients, such as on-line documentation browsers,
2856to query for X screen fonts that suit their particular requirements.
2857</para>
2858<para>
2859<!-- .LP -->
2860The encoding is as follows:
2861</para>
2862<informaltable frame="topbot">
2863  <?dbfo keep-together="always" ?>
2864  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
2865  <colspec colname='c1' colwidth='1.0*'/>
2866  <colspec colname='c2' colwidth='3.0*'/>
2867  <colspec colname='c3' colwidth='6.0*'/>
2868  <thead>
2869    <row rowsep='1'>
2870      <entry>Code</entry>
2871      <entry>English Translation</entry>
2872      <entry>Description</entry>
2873    </row>
2874  </thead>
2875  <tbody>
2876    <row>
2877      <entry>0</entry>
2878      <entry>WYSIWYG</entry>
2879      <entry>
2880The font is optimized to match the typographic design and metrics of an
2881equivalent printer font.
2882      </entry>
2883    </row>
2884    <row>
2885      <entry>1</entry>
2886      <entry>Video text</entry>
2887      <entry>
2888The font is optimized for screen legibility and readability.
2889      </entry>
2890    </row>
2891  </tbody>
2892  </tgroup>
2893</informaltable>
2894</sect2>
2895
2896<sect2 id='FONT_TYPE'>
2897<title>FONT_TYPE</title>
2898<!-- .XS -->
2899<!-- (SN FONT_TYPE -->
2900<!-- .XE -->
2901<para>
2902<!-- .LP -->
2903FONT_TYPE is a human-understandable string (of type ATOM) that
2904describes the format of
2905the font data as they are read from permanent storage by the current font source.
2906It is a static attribute of the source data.  It can be used
2907by clients to select a type of bitmap or outline font
2908without regard to the rasterizer used to render the font.
2909</para>
2910<para>
2911<!-- .LP -->
2912Predefined values are as follows:
2913</para>
2914<informaltable frame="topbot">
2915  <?dbfo keep-together="always" ?>
2916  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
2917  <colspec colname='c1' colwidth='1.0*'/>
2918  <colspec colname='c2' colwidth='5.0*'/>
2919  <thead>
2920    <row rowsep='1'>
2921      <entry>Value</entry>
2922      <entry>When applicable</entry>
2923    </row>
2924  </thead>
2925  <tbody>
2926    <row>
2927      <entry>"Bitmap"</entry>
2928      <entry>
2929Hand-tuned bitmap fonts. Some attempt has been made to optimize the visual
2930appearance of the font for the requested size and resolution.
2931      </entry>
2932    </row>
2933    <row>
2934      <entry>"Prebuilt"</entry>
2935      <entry>
2936All bitmap format fonts that cannot be described as "Bitmap", that is,
2937handtuned.
2938For example, a bitmap format font that was generated mechanically using
2939a scalable font rasterizer would be considered "Prebuilt", not "Bitmap".
2940      </entry>
2941    </row>
2942    <row>
2943      <entry>"Type 1"</entry>
2944      <entry>Any Type 1 font.</entry>
2945    </row>
2946    <row>
2947      <entry>"TrueType"</entry>
2948      <entry>Any TrueType font.</entry>
2949    </row>
2950    <row>
2951      <entry>"Speedo"</entry>
2952      <entry>Any Speedo font.</entry>
2953    </row>
2954    <row>
2955      <entry>"F3"</entry>
2956      <entry>Any F3 font.</entry>
2957    </row>
2958  </tbody>
2959  </tgroup>
2960</informaltable>
2961<para>
2962Other values may be registered with the X Consortium.
2963</para>
2964</sect2>
2965
2966<sect2 id='FONT_VERSION'>
2967<title>FONT_VERSION</title>
2968<!-- .XS -->
2969<!-- (SN FONT_VERSION -->
2970<!-- .XE -->
2971<para>
2972<!-- .LP -->
2973FONT_VERSION is a human-understandable string (of type ATOM)
2974that describes the formal or informal version of the font.
2975<function>None</function> is a valid value.
2976</para>
2977</sect2>
2978
2979<sect2 id='RASTERIZER_NAME'>
2980<title>RASTERIZER_NAME</title>
2981<!-- .XS -->
2982<!-- (SN RASTERIZER_NAME -->
2983<!-- .XE -->
2984<para>
2985<!-- .LP -->
2986RASTERIZER_NAME is a human-understandable string (of type ATOM)
2987that is the specific name of the
2988rasterizer that has performed some rasterization operation
2989(such as scaling from outlines) on this font.
2990</para>
2991<para>
2992<!-- .LP -->
2993To define a RASTERIZER_NAME, the following format is
2994recommended:
2995</para>
2996<!-- .SM -->
2997
2998<informaltable frame="none">
2999  <?dbfo keep-together="always" ?>
3000  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
3001  <colspec colname='c1' colwidth='1.0*'/>
3002  <colspec colname='c2' colwidth='3.0*'/>
3003  <tbody>
3004    <row>
3005      <entry>RasterizerName ::=</entry>
3006      <entry>OrganizationId Space Rasterizer</entry>
3007    </row>
3008    <row>
3009      <entry>OrganizationId ::=</entry>
3010      <entry>
3011STRING8—the X Registry ORGANIZATION name of the rasterizer
3012implementor or maintainer.
3013      </entry>
3014    </row>
3015    <row>
3016      <entry>Rasterizer ::=</entry>
3017      <entry>
3018the case-sensitive, human-understandable product name of the rasterizer.
3019Words within this name should be separated by a single SPACE.
3020      </entry>
3021    </row>
3022    <row>
3023      <entry>Space ::=</entry>
3024      <entry>OCTET−" " (SPACE)</entry>
3025    </row>
3026  </tbody>
3027  </tgroup>
3028</informaltable>
3029
3030
3031<para>
3032<!-- .LP -->
3033Examples:
3034</para>
3035
3036<literallayout class="monospaced">
3037      X Consortium Bit Scaler
3038      X Consortium Type 1 Rasterizer
3039      X Consortium Speedo Rasterizer
3040      Adobe Type Manager
3041      Sun TypeScaler
3042</literallayout>
3043
3044<para>
3045<!-- .LP -->
3046If RASTERIZER_NAME is not defined, or is <function>None</function>, no
3047rasterization operation has been applied to the FONT_TYPE.
3048</para>
3049</sect2>
3050
3051<sect2 id='RASTERIZER_VERSION'>
3052<title>RASTERIZER_VERSION</title>
3053<!-- .XS -->
3054<!-- (SN RASTERIZER_VERSION -->
3055<!-- .XE -->
3056<para>
3057<!-- .LP -->
3058RASTERIZER_VERSION is a human-understandable string (of type
3059ATOM) that represents the formal or informal version of a
3060font rasterizer.
3061The RASTERIZER_VERSION should match the corresponding
3062product version number known to users, when applicable.
3063</para>
3064</sect2>
3065
3066<sect2 id='RAW_ASCENT'>
3067<title>RAW_ASCENT</title>
3068<!-- .XS -->
3069<!-- (SN RAW_ASCENT -->
3070<!-- .XE -->
3071<para>
3072<!-- .LP -->
3073For a font with a transformation matrix, RAW_ASCENT is the font ascent
3074in 1000 pixel metrics
3075(see <xref linkend='Metrics_and_Font_Properties' xrefstyle='select: title'/>).
3076</para>
3077</sect2>
3078
3079<sect2 id='RAW_DESCENT'>
3080<title>RAW_DESCENT</title>
3081<!-- .XS -->
3082<!-- (SN RAW_DESCENT -->
3083<!-- .XE -->
3084<para>
3085<!-- .LP -->
3086For a font with a transformation matrix, RAW_DESCENT is the font
3087descent in 1000 pixel metrics
3088(see <xref linkend='Metrics_and_Font_Properties' xrefstyle='select: title'/>).
3089</para>
3090</sect2>
3091
3092<sect2 id='RAW_'>
3093<title>RAW_*</title>
3094<!-- .XS -->
3095<!-- (SN RAW_* -->
3096<!-- .XE -->
3097<para>
3098<!-- .LP -->
3099For a font with a transformation matrix,
3100all font properties that represent horizontal or vertical sizes or
3101displacements will be accompanied by a new property, named as the
3102original except prefixed with "RAW_", that is computed as
3103described in <xref linkend='Metrics_and_Font_Properties' xrefstyle='select: title' />.
3104</para>
3105</sect2>
3106
3107<sect2 id='AXIS_NAMES'>
3108<title>AXIS_NAMES</title>
3109<!-- .XS -->
3110<!-- (SN AXIS_NAMES -->
3111<!-- .XE -->
3112<para>
3113<!-- .LP -->
3114AXIS_NAMES is a list of all the
3115names of the axes for a polymorphic font, separated by a null (0) byte.
3116These names are suitable for presentation in a user interface
3117(see section 6).
3118</para>
3119</sect2>
3120
3121<sect2 id='AXIS_LIMITS'>
3122<title>AXIS_LIMITS</title>
3123<!-- .XS -->
3124<!-- (SN AXIS_LIMITS -->
3125<!-- .XE -->
3126<para>
3127<!-- .LP -->
3128AXIS_LIMITS is a list of integers, two for each axis,
3129giving the minimum and maximum allowable values for that axis of a
3130polymorphic font
3131(see <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>).
3132</para>
3133</sect2>
3134
3135<sect2 id='AXIS_TYPES'>
3136<title>AXIS_TYPES</title>
3137<!-- .XS -->
3138<!-- (SN AXIS_TYPES -->
3139<!-- .XE -->
3140<para>
3141<!-- .LP -->
3142AXIS_TYPES is like AXIS_NAMES,
3143but can be registered as having specific semantics
3144(see section 6).
3145</para>
3146</sect2>
3147</sect1>
3148
3149<sect1 id='Built_in_Font_Property_Atoms'>
3150<title>Built-in Font Property Atoms</title>
3151<!-- .XS -->
3152<!-- (SN Built-in Font Property Atoms -->
3153<!-- .XE -->
3154<para>
3155<!-- .LP -->
3156The following font property atom definitions were predefined in the initial
3157version of the core protocol:
3158</para>
3159
3160<informaltable frame="topbot">
3161  <?dbfo keep-together="auto" ?>
3162  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
3163  <colspec colname='c1' colwidth='1.0*'/>
3164  <colspec colname='c2' colwidth='2.0*'/>
3165  <thead>
3166    <row rowsep='1'>
3167      <entry>Font Property/Atom Name</entry>
3168      <entry>Property Type</entry>
3169    </row>
3170  </thead>
3171  <tbody>
3172    <row>
3173      <entry>MIN_SPACE</entry>
3174      <entry>INT32</entry>
3175    </row>
3176    <row>
3177      <entry>NORM_SPACE</entry>
3178      <entry>INT32</entry>
3179    </row>
3180    <row>
3181      <entry>MAX_SPACE</entry>
3182      <entry>INT32</entry>
3183    </row>
3184    <row>
3185      <entry>END_SPACE</entry>
3186      <entry>INT32</entry>
3187    </row>
3188    <row>
3189      <entry>SUPERSCRIPT_X</entry>
3190      <entry>INT32</entry>
3191    </row>
3192    <row>
3193      <entry>SUPERSCRIPT_Y</entry>
3194      <entry>INT32</entry>
3195    </row>
3196    <row>
3197      <entry>SUBSCRIPT_X</entry>
3198      <entry>INT32</entry>
3199    </row>
3200    <row>
3201      <entry>SUBSCRIPT_Y</entry>
3202      <entry>INT32</entry>
3203    </row>
3204    <row>
3205      <entry>UNDERLINE_POSITION</entry>
3206      <entry>INT32</entry>
3207    </row>
3208    <row>
3209      <entry>UNDERLINE_THICKNESS</entry>
3210      <entry>INT32</entry>
3211    </row>
3212    <row>
3213      <entry>STRIKEOUT_ASCENT</entry>
3214      <entry>INT32</entry>
3215    </row>
3216    <row>
3217      <entry>STRIKEOUT_DESCENT</entry>
3218      <entry>INT32</entry>
3219    </row>
3220    <row>
3221      <entry>FONT_ASCENT</entry>
3222      <entry>INT32</entry>
3223    </row>
3224    <row>
3225      <entry>FONT_DESCENT</entry>
3226      <entry>INT32</entry>
3227    </row>
3228    <row>
3229      <entry>ITALIC_ANGLE</entry>
3230      <entry>INT32</entry>
3231    </row>
3232    <row>
3233      <entry>X_HEIGHT</entry>
3234      <entry>INT32</entry>
3235    </row>
3236    <row>
3237      <entry>QUAD_WIDTH</entry>
3238      <entry>INT32 −<superscript>deprecated</superscript></entry>
3239    </row>
3240    <row>
3241      <entry>WEIGHT</entry>
3242      <entry>CARD32</entry>
3243    </row>
3244    <row>
3245      <entry>POINT_SIZE</entry>
3246      <entry>INT32</entry>
3247    </row>
3248    <row>
3249      <entry>RESOLUTION</entry>
3250      <entry>CARD32 −<superscript>deprecated</superscript></entry>
3251    </row>
3252    <row>
3253      <entry>COPYRIGHT</entry>
3254      <entry>ATOM</entry>
3255    </row>
3256    <row>
3257      <entry>FULL_NAME</entry>
3258      <entry>ATOM −<superscript>deprecated</superscript></entry>
3259    </row>
3260    <row>
3261      <entry>FAMILY_NAME</entry>
3262      <entry>ATOM</entry>
3263    </row>
3264    <row>
3265      <entry>DEFAULT_CHAR</entry>
3266      <entry>CARD32</entry>
3267    </row>
3268  </tbody>
3269  </tgroup>
3270</informaltable>
3271<!-- .br -->
3272</sect1>
3273</chapter>
3274
3275<chapter id='Matrix_Transformations'>
3276<title>Matrix Transformations</title>
3277<!-- .XS -->
3278<!-- (SN Matrix Transformations -->
3279<!-- .XE -->
3280<para>
3281<!-- .LP -->
3282An XLFD name presented to the server can have the POINT_SIZE or PIXEL_SIZE
3283field begin with the character "[".  If the first character of the field
3284is "[", the character must be followed with ASCII representations of
3285four floating point numbers and a trailing "]", with white space
3286separating the numbers and optional white space separating the numbers
3287from the "[" and "]" characters.  Numbers use standard floating point
3288syntax but use the character "~" to represent a minus sign in the mantissa
3289or exponent.
3290</para>
3291<para>
3292<!-- .LP -->
3293The BNF for a matrix transformation string is as follows:
3294</para>
3295
3296<informaltable frame="none">
3297  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
3298  <colspec colname='c1' colwidth='1.0*'/>
3299  <colspec colname='c2' colwidth='3.0*'/>
3300  <tbody>
3301    <row>
3302      <entry>MatrixString ::=</entry>
3303      <entry>
3304LeftBracket OptionalSpace Float Space Float Space
3305Float Space Float OptionalSpace RightBracket
3306      </entry>
3307    </row>
3308    <row>
3309      <entry>OptionalSpace ::=</entry>
3310      <entry>"" | Space</entry>
3311    </row>
3312    <row>
3313      <entry>Space ::=</entry>
3314      <entry>SpaceChar | SpaceChar Space</entry>
3315    </row>
3316    <row>
3317      <entry>Float ::=</entry>
3318      <entry>Mantissa | Mantissa Exponent</entry>
3319    </row>
3320    <row>
3321      <entry>Mantissa ::=</entry>
3322      <entry>Sign Number | Number</entry>
3323    </row>
3324    <row>
3325      <entry>Sign ::=</entry>
3326      <entry>Plus | Tilde</entry>
3327    </row>
3328    <row>
3329      <entry>Number ::=</entry>
3330      <entry>Integer | Integer Dot Integer | Dot Integer</entry>
3331    </row>
3332    <row>
3333      <entry>Integer ::=</entry>
3334      <entry>Digit | Digit Integer</entry>
3335    </row>
3336    <row>
3337      <entry>Digit ::=</entry>
3338      <entry>
3339"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
3340      </entry>
3341    </row>
3342    <row>
3343      <entry>Exponent ::=</entry>
3344      <entry>"e" SignedInteger | "E" SignedInteger</entry>
3345    </row>
3346    <row>
3347      <entry>SignedInteger ::=</entry>
3348      <entry>Sign Integer | Integer</entry>
3349    </row>
3350    <row>
3351      <entry>LeftBracket ::=</entry>
3352      <entry>OCTET − "[" (LEFT SQUARE BRACKET)</entry>
3353    </row>
3354    <row>
3355      <entry>RightBracket ::=</entry>
3356      <entry>OCTET − "]" (RIGHT SQUARE BRACKET)</entry>
3357    </row>
3358    <row>
3359      <entry>SpaceChar ::=</entry>
3360      <entry>OCTET − " " (SPACE)</entry>
3361    </row>
3362    <row>
3363      <entry>Tilde ::=</entry>
3364      <entry>OCTET − "˜" (TILDE)</entry>
3365    </row>
3366    <row>
3367      <entry>Plus ::=</entry>
3368      <entry>OCTET − "+" (PLUS)</entry>
3369    </row>
3370    <row>
3371      <entry>Dot ::=</entry>
3372      <entry>OCTET − "." (FULL STOP)</entry>
3373    </row>
3374  </tbody>
3375  </tgroup>
3376</informaltable>
3377
3378<para>
3379<!-- .LP -->
3380The string "[a b c d]" represents a graphical transformation of the glyphs
3381in the font by the matrix
3382</para>
3383
3384<informaltable frame="none">
3385  <?dbfo keep-together="always" ?>
3386  <tgroup cols='1' align='left' colsep='0' rowsep='0'>
3387  <colspec colname='c1' colwidth='1.0*'/>
3388  <tbody>
3389    <row>
3390      <entry>[  a  b  0  ]</entry>
3391    </row>
3392    <row>
3393      <entry>[  c  d  0  ]</entry>
3394    </row>
3395    <row>
3396      <entry>[  0  0  1  ]</entry>
3397    </row>
3398  </tbody>
3399  </tgroup>
3400</informaltable>
3401<para>
3402<!-- .LP -->
3403All transformations occur around the origin of the glyph.  The
3404relationship between the current scalar values and the matrix
3405transformation values is that the scalar value "N" in the POINT_SIZE field
3406produces the same glyphs as the matrix "[N/10 0 0 N/10]" in that field,
3407and the scalar value "N" in the PIXEL_SIZE field produces the same glyphs
3408as the matrix "[N*RESOLUTION_X/RESOLUTION_Y 0 0 N]" in that field.
3409</para>
3410<para>
3411<!-- .LP -->
3412If matrices are specified for both the POINT_SIZE and PIXEL_SIZE, they
3413must bear the following relationship to each other within an
3414implementation-specific tolerance:
3415</para>
3416<blockquote>
3417<para>
3418	PIXEL_SIZE_MATRIX = [Sx 0 0 Sy] * POINT_SIZE_MATRIX
3419</para>
3420</blockquote>
3421<para>
3422where
3423</para>
3424<blockquote>
3425<para>
3426	Sx = RESOLUTION_X / 72.27
3427</para>
3428<para>
3429	Sy = RESOLUTION_Y / 72.27
3430</para>
3431</blockquote>
3432<para>
3433<!-- .LP -->
3434If either the POINT_SIZE or PIXEL_SIZE field is unspecified (either "0" or
3435wildcarded), the preceding formulas can be used to compute one from the
3436other.
3437</para>
3438
3439<sect1 id='Metrics_and_Font_Properties'>
3440<title>Metrics and Font Properties</title>
3441<!-- .XS -->
3442<!-- (SN Metrics and Font Properties -->
3443<!-- .XE -->
3444<para>
3445<!-- .LP -->
3446In this section, the phrase "1000 pixel metrics" means the
3447metrics that would be obtained if the rasterizer took the base untransformed
3448design used to generate the transformed font and scaled it linearly to a
3449height of 1000 pixels, with no rotation component.  Note that there may be no
3450way for the application to actually request this font since the rasterizer
3451may use different outlines or rasterization techniques at that size from the
3452ones used to generate the transformed font.
3453</para>
3454<para>
3455<!-- .LP -->
3456Notes on properties and metrics:
3457</para>
3458<para>
3459<!-- .LP -->
3460The per-char ink metrics (lbearing, rbearing, ascent, and descent)
3461represent the ink extent of the transformed glyph around its origin.
3462</para>
3463<para>
3464<!-- .LP -->
3465The per-char width is the x component of the transformed character width.
3466</para>
3467<para>
3468<!-- .LP -->
3469The font ascent and descent are the y component of the transformed font
3470ascent or descent.
3471</para>
3472<para>
3473<!-- .LP -->
3474The FONT property returns a name reflecting the matrix being
3475used-that is, the name returned can be used to open another
3476instance of the same font.  The returned name is not necessarily an
3477exact copy of the requested name.  If, for example, the user
3478requests
3479</para>
3480<!-- .br -->
3481<!-- .ft C -->
3482<!-- .SM -->
3483<literallayout class="monospaced">
3484   -misc-fixed-medium-r-normal--0-[2e1 0 0.0 +10.0]-72-72-c-0-iso8859-1
3485</literallayout>
3486<!-- .NL -->
3487<!-- .ft P -->
3488<!-- .br -->
3489<para>
3490the resulting FONT property might be
3491</para>
3492<!-- .br -->
3493<!-- .ft C -->
3494<!-- .SM -->
3495<literallayout class="monospaced">
3496   -misc-fixed-medium-r-normal--[19.9 0 0 10]-[20 0 0 10]-72-72-c-0-iso8859-1
3497</literallayout>
3498<!-- .NL -->
3499<!-- .ft P -->
3500<!-- .br -->
3501<para>
3502The FONT property will always include matrices in both the PIXEL_SIZE
3503and the POINT_SIZE fields.
3504</para>
3505<para>
3506<!-- .LP -->
3507To allow accurate client positioning of transformed characters, the
3508attributes field of the XCharInfo contains the width of the character in
35091000 pixel metrics.  This attributes field should be interpreted as a signed
3510integer.
3511</para>
3512<para>
3513<!-- .LP -->
3514There will always be 2 new font properties defined, RAW_ASCENT and
3515RAW_DESCENT, that hold the ascent and descent in 1000 pixel metrics.
3516</para>
3517<para>
3518<!-- .LP -->
3519All font properties that represent horizontal widths or displacements
3520have as their value the x component of the transformed width or
3521displacement.  All font properties that represent vertical heights or
3522displacements have as their value the y component of the transformed
3523height or displacement.  Each such property will be accompanied by a new
3524property, named as the original except prefixed with "RAW_", that gives
3525the value of the width, height, or displacement in 1000 pixel metrics.
3526</para>
3527</sect1>
3528</chapter>
3529
3530<chapter id='Scalable_Fonts'>
3531<title>Scalable Fonts</title>
3532<!-- .XS -->
3533<!-- (SN Scalable Fonts -->
3534<!-- .XE -->
3535<para>
3536<!-- .LP -->
3537The XLFD is designed to support scalable fonts.  A scalable font is a
3538font source from which instances of arbitrary size can be derived.
3539A scalable font source might be one or more outlines
3540together with zero or more hand-tuned bitmap fonts at specific sizes and
3541resolutions, or it might be a programmatic description together with
3542zero or more bitmap fonts, or some other format
3543(perhaps even just a single bitmap font).
3544</para>
3545<para>
3546<!-- .LP -->
3547The following definitions are useful for discussing scalable fonts:
3548</para>
3549<para>
3550<!-- .LP -->
3551<function>Well-formed XLFD pattern</function>
3552</para>
3553
3554<itemizedlist>
3555  <listitem>
3556    <para>
3557<emphasis role="bold">Well-formed XLFD pattern</emphasis>
3558    </para>
3559    <para>
3560A pattern string containing 14 hyphens, one of which is
3561the first character of the pattern.  Wildcard characters are permitted
3562in the fields of a well-formed XLFD pattern.
3563    </para>
3564  </listitem>
3565</itemizedlist>
3566<itemizedlist>
3567  <listitem>
3568<para>
3569<function>Scalable font name</function>
3570</para>
3571    <para>
3572A well-formed XLFD pattern containing no wildcards and containing the
3573digit "0" in the PIXEL_SIZE, POINT_SIZE, and AVERAGE_WIDTH fields.
3574    </para>
3575  </listitem>
3576</itemizedlist>
3577<itemizedlist>
3578  <listitem>
3579<para>
3580<function>Scalable fields</function>
3581</para>
3582    <para>
3583The XLFD fields PIXEL_SIZE, POINT_SIZE, RESOLUTION_X,
3584RESOLUTION_Y, and AVERAGE_WIDTH.
3585    </para>
3586  </listitem>
3587</itemizedlist>
3588<itemizedlist>
3589  <listitem>
3590<para>
3591<function>Derived instance</function>
3592</para>
3593    <para>
3594The result of replacing the scalable fields of a font name
3595with values to yield a font name that could actually be
3596produced from the font source.  A scaling engine is
3597permitted, but not required, to interpret the scalable
3598fields in font names to support anamorphic scaling.
3599    </para>
3600  </listitem>
3601</itemizedlist>
3602<itemizedlist>
3603  <listitem>
3604    <para>
3605<function>Global list</function>
3606    </para>
3607    <para>
3608The list of names that would be returned by an X server for a
3609<function>ListFonts</function>
3610protocol request on the pattern "*" if there were no protocol
3611restrictions on the total number of names returned.
3612    </para>
3613  </listitem>
3614</itemizedlist>
3615
3616<para>
3617<!-- .LP -->
3618The global list consists of font names derived from font sources.
3619If a single font source can support multiple character sets (specified
3620in the CHARSET_REGISTRY and CHARSET_ENCODING fields), each such character
3621set should be used to form a separate font name in the list.
3622For a nonscalable font source, the simple font name
3623for each character set is included in the global list.
3624For a scalable font source, a scalable font name for each character set
3625is included in the list.  In addition to the scalable font name,
3626specific derived instance names may also be included in the list.
3627The relative order of derived instances with respect to the scalable
3628font name is not constrained.  Finally, font name aliases may also be included
3629in the list.  The relative order of aliases
3630with respect to the real font name is not constrained.
3631</para>
3632<para>
3633<!-- .LP -->
3634The values of the RESOLUTION_X and RESOLUTION_Y fields of a scalable font name
3635are implementation dependent,
3636but to maximize backward compatibility, they
3637should be reasonable nonzero values, for example, a resolution close to that
3638provided by the screen (in a single-screen server).
3639Because some existing
3640applications rely on seeing a collection of point and pixel sizes,
3641server vendors are strongly encouraged in the near term to
3642provide a mechanism for including, for each scalable font name,
3643a set of specific derived instance names.  For font sources that contain
3644a collection of hand-tuned bitmap fonts, including names of these instances
3645in the global list is recommended and sufficient.
3646</para>
3647<para>
3648<!-- .LP -->
3649The X protocol request
3650<function>OpenFont</function>
3651on a scalable font name returns a font corresponding to an
3652implementation-dependent derived instance of that font name.
3653</para>
3654<para>
3655<!-- .LP -->
3656The X protocol request
3657<function>ListFonts</function>
3658on a well-formed XLFD pattern returns the following.
3659Starting with the global list, if the actual pattern argument
3660has values containing no wildcards in scalable fields,
3661then substitute each such field into the corresponding
3662field in each scalable font name in the list.  For each resulting font name,
3663if the remaining scalable fields cannot be replaced with values to produce a
3664derived instance, remove the font name from the list.  Now take the modified
3665list, and perform a simple pattern match against the pattern argument.
3666<function>ListFonts</function>
3667returns the resulting list.
3668</para>
3669<para>
3670For example, given the global list:
3671</para>
3672<literallayout class="monospaced">
3673-Linotype-Times-Bold-I-Normal--0-0-100-100-P-0-ISO8859-1
3674-Linotype-Times-Bold-R-Normal--0-0-100-100-P-0-ISO8859-1
3675-Linotype-Times-Medium-I-Normal--0-0-100-100-P-0-ISO8859-1
3676-Linotype-Times-Medium-R-Normal--0-0-100-100-P-0-ISO8859-1
3677</literallayout>
3678
3679<para>
3680a <function>ListFonts</function> request with the pattern:
3681</para>
3682
3683<literallayout class="monospaced">
3684-*-Times-*-R-Normal--*-120-100-100-P-*-ISO8859-1
3685</literallayout>
3686
3687<para>
3688would return:
3689</para>
3690
3691<literallayout class="monospaced">
3692-Linotype-Times-Bold-R-Normal--0-120-100-100-P-0-ISO8859-1
3693-Linotype-Times-Medium-R-Normal--0-120-100-100-P-0-ISO8859-1
3694</literallayout>
3695
3696<para>
3697<function>ListFonts</function>
3698on a pattern containing wildcards that is not a well-formed XLFD
3699pattern is only required to return the list obtained by performing
3700a simple pattern match against the global list.
3701X servers are permitted, but not required,
3702to use a more sophisticated matching algorithm.
3703</para>
3704</chapter>
3705
3706<chapter id='Polymorphic_Fonts'>
3707<title>Polymorphic Fonts</title>
3708<!-- .XS -->
3709<!-- (SN Polymorphic Fonts -->
3710<!-- .XE -->
3711<para>
3712<!-- .LP -->
3713Fonts that can be varied in ways other than size or resolution are called
3714<emphasis remap='I'>polymorphic fonts.</emphasis>  Multiple Master Type 1 font programs are one type of
3715a polymorphic font.  Current examples of axes along which the fonts can be
3716varied are width, weight, and optical size; others might include formality
3717or x-height.
3718</para>
3719<para>
3720To support polymorphic fonts, special values indicating variability are
3721defined for the following XLFD fields:
3722</para>
3723<blockquote>
3724<para>
3725<!-- .nf -->
3726	WEIGHT_NAME
3727</para>
3728<para>
3729	SLANT
3730</para>
3731<para>
3732	SETWIDTH_NAME
3733</para>
3734<para>
3735	ADD_STYLE_NAME
3736</para>
3737</blockquote>
3738<para>
3739<!-- .LP -->
3740The string "0" is the special polymorphic value.  In the
3741WEIGHT_NAME, SLANT, or SETWIDTH_NAME field, "0" must be the
3742entire field.
3743There may be multiple polymorphic values
3744in the ADD_STYLE_NAME field.
3745They are surrounded by "[" and "]" and separated by a Space,
3746as "[0\00]".  The polymorphic values may coexist with
3747other data in the field.
3748It is recommended that the polymorphic values
3749be at the end of the ADD_STYLE_NAME field.
3750</para>
3751<para>
3752<!-- .LP -->
3753The font-matching algorithms for a font with polymorphic fields are
3754identical to the matching algorithms for a font with scalable fields.
3755</para>
3756<para>
3757<!-- .LP -->
3758There are three new font properties to describe the axes of variation,
3759AXIS_NAMES, AXIS_LIMITS, and AXIS_TYPES.  AXIS_NAMES is a list of all the
3760names of the axes for the font, separated by a null (0) byte.
3761These names are suitable for presentation in
3762a user interface.  AXIS_LIMITS is a list of integers, two for each axis,
3763giving the minimum and maximum allowable values for that axis.
3764AXIS_TYPES is like AXIS_NAMES,
3765but can be registered as having specific semantics.
3766</para>
3767<para>
3768<!-- .LP -->
3769The axes are listed in the properties in the same order as they
3770appear in the font name.  They are matched with font name fields by
3771looking for the special polymorphic values in the font name.
3772</para>
3773<para>
3774<!-- .LP -->
3775Examples:
3776</para>
3777<para>
3778<!-- .LP -->
3779The Adobe Myriad MM font program has width and weight axes.  Weight can
3780vary from 215 to 830, and width from 300 to 700.
3781</para>
3782<literallayout class="monospaced">
3783Name:
3784        -Adobe-Myriad MM-0-R-0--0-0-0-0-P-0-ISO8859-1
3785AXIS_NAMES:
3786        Weight, Width
3787AXIS_LIMITS:
3788        215, 830, 300, 700
3789AXIS_TYPES:
3790        Adobe-Weight, Adobe-Width
3791Sample derived instance:
3792        -Adobe-Myriad MM-412-R-575--*-120-100-100-P-*-ISO8859-1
3793</literallayout>
3794
3795<para>
3796The Adobe Minion MM Italic font program has width, weight, and optical
3797size axes.
3798</para>
3799
3800<literallayout class="monospaced">
3801Name:
3802         -Adobe-Minion MM-0-I-0-[0]-0-0-0-0-P-0-ISO8859-1
3803AXIS_NAMES:
3804         Weight, Width, Optical size
3805AXIS_LIMITS:
3806         345, 620, 450, 600, 6, 72
3807AXIS_TYPES:
3808         Adobe-Weight, Adobe-Width, Adobe-OpticalSize
3809Sample derived instance:
3810         -Adobe-Minion MM-550-I-480-[18]-*-180-100-100-P-*-ISO8859-1
3811</literallayout>
3812
3813<para>
3814The Adobe Minion MM Swash Italic font program has the same axes and
3815values.  This shows how "[0]" in the ADD_STYLE_NAME field can
3816coexist with other words.
3817</para>
3818
3819<literallayout class="monospaced">
3820Name:
3821        -Adobe-Minion MM-0-I-0-Swash[0]-0-0-0-0-P-0-ISO8859-1
3822AXIS_NAMES:
3823        Weight, Width, Optical size
3824AXIS_LIMITS:
3825        345, 620, 450, 600, 6, 72
3826AXIS_TYPES:
3827        Adobe-Weight, Adobe-Width, Adobe-OpticalSize
3828Sample derived instance:
3829        -Adobe-Minion MM-550-I-480-Swash[18]-*-180-100-100-P-*-ISO8859-1
3830</literallayout>
3831
3832<para>
3833The XYZ Abc font, a hypothetical font, has optical size and x-height axes.
3834This shows how there can be more than one polymorphic value in the
3835ADD_STYLE_NAME field.
3836</para>
3837
3838<literallayout class="monospaced">
3839Name:
3840        -XYZ-Abc-Medium-R-Normal-[0 0]-0-0-0-0-P-0-ISO8859-1
3841AXIS_NAMES:
3842        Optical size, X-height
3843AXIS_LIMITS:
3844        6, 72, 400, 600
3845AXIS_TYPES:
3846        XYZ-OpticalSize, XYZ-Xheight
3847Sample derived instance:
3848        -XYZ-Abc-Medium-R-Normal-[14 510]-*-140-100-100-P-*-ISO8859-1
3849</literallayout>
3850
3851<para>
3852If an axis allows negative values, a client requests a negative value by
3853using "~" (TILDE) as a minus sign.
3854</para>
3855<para>
3856Axis types can be registered with the X Consortium, along with their
3857semantics.
3858</para>
3859<para>
3860If a font name that contains the polymorphic value or a wildcard in a
3861polymorphic field is presented to a font source, the font source is free
3862to substitute any value that is convenient.  However, font sources should
3863try to use a value that would be considered
3864<emphasis remap='I'>normal</emphasis> or
3865<emphasis remap='I'>medium</emphasis> for the
3866particular font.  For example, if an optical size variable is unresolved,
3867the font source should provide a value appropriate to the size of the
3868font.
3869</para>
3870
3871<para>
3872The result of specifying an out-of-range value for a polymorphic field is
3873undefined.  The font source may treat this as a
3874<function>BadName</function> error, treat the
3875value as if it were the closest legal value, or extrapolate to try to
3876accommodate the value.
3877</para>
3878</chapter>
3879
3880<chapter id='Affected_Elements_of_Xlib_and_the_X_Protocol'>
3881<title>Affected Elements of Xlib and the X Protocol</title>
3882<!-- .XS -->
3883<!-- (SN Affected Elements of Xlib and the X Protocol -->
3884<!-- .XE -->
3885<para>
3886<!-- .LP -->
3887The following X protocol requests must support the XLFD conventions:
3888</para>
3889
3890<itemizedlist>
3891  <listitem>
3892    <para>
3893<function>OpenFont</function>
3894- for the name argument
3895    </para>
3896  </listitem>
3897  <listitem>
3898    <para>
3899<function>ListFonts</function>
3900- for the pattern argument
3901    </para>
3902  </listitem>
3903  <listitem>
3904    <para>
3905<function>ListFontsWithInfo</function>
3906- for the pattern argument
3907    </para>
3908  </listitem>
3909</itemizedlist>
3910<para>
3911<!-- .LP -->
3912In addition,
3913the following Xlib functions must support the XLFD conventions:
3914</para>
3915<itemizedlist>
3916  <listitem>
3917    <para>
3918<olink targetdoc='libX11' targetptr='XLoadFont'><function>XLoadFont</function></olink>
3919- for the name argument
3920    </para>
3921  </listitem>
3922  <listitem>
3923    <para>
3924<olink targetdoc='libX11' targetptr='XListFontsWithInfo'><function>XListFontsWithInfo</function></olink>
3925- for the pattern argument
3926    </para>
3927  </listitem>
3928  <listitem>
3929    <para>
3930<olink targetdoc='libX11' targetptr='XLoadQueryFont'><function>XLoadQueryFont</function></olink>
3931- for the name argument
3932    </para>
3933  </listitem>
3934  <listitem>
3935    <para>
3936<olink targetdoc='libX11' targetptr='XListFonts'><function>XListFonts</function></olink>
3937- for the pattern argument
3938    </para>
3939  </listitem>
3940</itemizedlist>
3941</chapter>
3942
3943<chapter id='BDF_Conformance'>
3944<title>BDF Conformance</title>
3945<!-- .XS -->
3946<!-- (SN BDF Conformance -->
3947<!-- .XE -->
3948<para>
3949<!-- .LP -->
3950The bitmap font distribution and interchange format adopted by the
3951X Consortium (BDF V2.1) provides a general mechanism for identifying the
3952font name of an X font and a variable list of font properties,
3953but it does not mandate the syntax or semantics of the font name
3954or the semantics of the font properties that might be provided in a BDF font.
3955This section identifies the requirements for BDF fonts that conform to XLFD.
3956</para>
3957
3958<sect1 id='XLFD_Conformance_Requirements'>
3959<title>XLFD Conformance Requirements</title>
3960<!-- .XS -->
3961<!-- (SN XLFD Conformance Requirements -->
3962<!-- .XE -->
3963<para>
3964<!-- .LP -->
3965A BDF font conforms to the XLFD specification if and only if the
3966following conditions are satisfied:
3967</para>
3968
3969<itemizedlist>
3970  <listitem>
3971    <para>
3972The value for the BDF item <function>FONT</function> conforms to the syntax
3973and semantic definition of a XLFD
3974<function>FontName</function>
3975string.
3976    </para>
3977  </listitem>
3978  <listitem>
3979    <para>
3980The
3981<function>FontName</function>
3982begins with the X
3983<function>FontNameRegistry</function>
3984prefix: "-".
3985    </para>
3986  </listitem>
3987  <listitem>
3988    <para>
3989All XLFD
3990<function>FontName</function>
3991fields are defined.
3992    </para>
3993  </listitem>
3994  <listitem>
3995    <para>
3996Any FontProperties provided conform in name and semantics to the XLFD
3997<function>FontProperty</function>
3998definitions.
3999    </para>
4000  </listitem>
4001</itemizedlist>
4002<para>
4003<!-- .LP              -->
4004A simple method of testing for conformance would entail verifying that the
4005<function>FontNameRegistry</function>
4006prefix is the string "-",
4007that the number of field delimiters in the string and coded field values
4008are valid,
4009and that each font property name either matches a standard XLFD property name
4010or follows the definition of a private property.
4011</para>
4012</sect1>
4013
4014<sect1 id='FONT_ASCENT_FONT_DESCENT_and_DEFAULT_CHAR'>
4015<title>FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR</title>
4016<!-- .XS -->
4017<!-- (SN FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR -->
4018<!-- .XE -->
4019<para>
4020<!-- .LP -->
4021FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR are provided in the BDF
4022specification as properties that are moved to the
4023<function>XFontStruct</function>
4024by the BDF font compiler in generating the X server-specific
4025binary font encoding.
4026If present,
4027these properties shall comply with the following semantic definitions.
4028</para>
4029
4030<sect2 id='FONT_ASCENT'>
4031<title>FONT_ASCENT</title>
4032<!-- .XS -->
4033<!-- (SN FONT_ASCENT -->
4034<!-- .XE -->
4035<para>
4036<!-- .LP -->
4037FONT_ASCENT is an integer value (of type INT32)
4038that gives the recommended typographic ascent above the baseline
4039for determining interline spacing.
4040Specific glyphs of the font may extend beyond this.
4041If the current position point for line <emphasis remap='I'>n</emphasis> is at [X,Y],
4042then the origin of the next line <emphasis remap='I'>m = n + 1</emphasis>
4043(allowing for a possible font change) is
4044[X, Y + FONT_DESCENTn + FONT_ASCENTm].
4045</para>
4046<para>
4047<!-- .LP -->
4048FONT_ASCENT can be approximated if not provided as a font property,
4049according to the following algorithm:
4050</para>
4051
4052<literallayout class="monospaced">
4053if (FONT_ASCENT undefined) then
4054   FONT_ASCENT = maximum ascent
4055</literallayout>
4056<para>
4057where maximum ascent is the maximum ascent (above the baseline)
4058in pixels of any glyph in the font.
4059</para>
4060</sect2>
4061
4062<sect2 id='FONT_DESCENT'>
4063<title>FONT_DESCENT</title>
4064<!-- .XS -->
4065<!-- (SN FONT_DESCENT -->
4066<!-- .XE -->
4067<para>
4068<!-- .LP -->
4069FONT_DESCENT is an integer value (of type INT32)
4070that gives the recommended typographic descent below the baseline
4071for determining interline spacing.
4072Specific glyphs of the font may extend beyond this.
4073If the current position point for line
4074<emphasis remap='I'>n</emphasis> is at [X,Y],
4075then the origin of the next line <emphasis remap='I'>m = n+1</emphasis>
4076(allowing for a possible font change) is
4077[X, Y + FONT_DESCENTn + FONT_ASCENTm].
4078</para>
4079<para>
4080The logical extent of the font is inclusive between the Y-coordinate values:
4081Y - FONT_ASCENT and Y + FONT_DESCENT + 1.
4082</para>
4083<para>
4084FONT_DESCENT can be approximated if not provided as a font property,
4085according to the following algorithm:
4086</para>
4087<literallayout class="monospaced">
4088if (FONT_DESCENT undefined) then
4089   FONT_DESCENT = maximum descent
4090</literallayout>
4091<para>
4092where maximum descent is the maximum descent (below the baseline)
4093in pixels of any glyph in the font.
4094</para>
4095</sect2>
4096
4097<sect2 id='DEFAULT_CHAR'>
4098<title>DEFAULT_CHAR</title>
4099<!-- .XS -->
4100<!-- (SN DEFAULT_CHAR -->
4101<!-- .XE -->
4102<para>
4103<!-- .LP -->
4104The DEFAULT_CHAR is an unsigned integer value (of type CARD32)
4105that specifies the index
4106of the default character to be used by the X server when an attempt
4107is made to display an undefined or nonexistent character in the font.
4108(For a font using a 2-byte matrix format,
4109the index bytes are encoded in the integer as byte1 * 65536 + byte2.)
4110If the DEFAULT_CHAR itself specifies an undefined or nonexistent character
4111in the font,
4112then no display is performed.
4113</para>
4114<para>
4115<!-- .LP -->
4116DEFAULT_CHAR cannot be approximated if not provided as a font property.
4117<!-- .\" -->
4118<!-- .\" print Table of Contents -->
4119<!-- .if o .bp \" blank page to make count even -->
4120<!-- .bp 1 -->
4121<!-- .af PN i -->
4122<!-- .PX -->
4123</para>
4124</sect2>
4125</sect1>
4126</chapter>
4127</book>
4128