1056N/AX Logical Font Description Conventions
1056N/ADigital Equipment Corporation
1276N/ACopyright © 1988, 1994 X Consortium
1276N/APermission is hereby granted, free of charge, to any person obtaining a copy of
1276N/Athis software and associated documentation files (the "Software"), to deal in
1276N/Athe Software without restriction, including without limitation the rights to
1276N/Ause, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies
1276N/Aof the Software, and to permit persons to whom the Software is furnished to do
1276N/Aso, subject to the following conditions:
1276N/AThe above copyright notice and this permission notice shall be included in all
1276N/Acopies or substantial portions of the Software.
1276N/ATHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1276N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1276N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X
1276N/ACONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1276N/AACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1276N/AWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1276N/AExcept as contained in this notice, the name of the X Consortium shall not be
1276N/Aused in advertising or otherwise to promote the sale, use or other dealings in
1276N/Athis Software without prior written authorization from the X Consortium.
1056N/AX Window System is a trademark of The Open Group.
1276N/ACopyright © 1988, 1989 Digital Equipment Corporation, Maynard MA. All rights
1276N/APermission to use, copy, modify, and distribute this documentation for any
1276N/Apurpose and without fee is hereby granted, provided that the above copyright
1276N/Anotice and this permission notice appear in all copies. Digital Equipment
1276N/ACorporation makes no representations about the suitability for any purpose of
1276N/Athe information in this document. This documentation is provided as is without
1276N/Aexpress or implied warranty.
1056N/AHelvetica and Times are registered trademarks of Linotype Company.
1056N/AITC Avant Garde Gothic is a registered trademark of International Typeface
1056N/ATimes Roman is a registered trademark of Monotype Corporation.
1056N/ABitstream Amerigo is a registered trademark of Bitstream Inc.
1056N/AStone is a registered trademark of Adobe Systems Inc.
1056N/A━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1056N/A Provide Unique and Descriptive Font Names
1056N/A Support Multiple Font Vendors and Character Sets
1056N/A Support Scalable and Polymorphic Fonts
1056N/A Support Transformations and Subsetting of Fonts
1056N/A Be Independent of X Server and Operating or File System Implementations
1056N/A Support Arbitrarily Complex Font Matching and Substitution
1056N/A3. X Logical Font Description
1056N/A Built-in Font Property Atoms
1056N/A Metrics and Font Properties
1056N/A7. Affected Elements of Xlib and the X Protocol
1056N/A XLFD Conformance Requirements
1056N/A FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR
1056N/AIt is a requirement that X client applications must be portable across server
1056N/Aimplementations, with very different file systems, naming conventions, and font
1056N/Alibraries. However, font access requests, as defined by the X Window System
1056N/AProtocol, neither specify server-independent conventions for font names nor
1056N/Aprovide adequate font properties for logically describing typographic fonts.
1056N/AX clients must be able to dynamically determine the fonts available on any
1056N/Agiven server so that understandable information can be presented to the user or
1056N/Aso that intelligent font fallbacks can be chosen. It is desirable for the most
1056N/Acommon queries to be accomplished without the overhead of opening each font and
1056N/Ainspecting font properties, by means of simple ListFonts requests. For example,
1056N/Aif a user selected a Helvetica typeface family, a client application should be
1056N/Aable to query the server for all Helvetica fonts and present only those
1056N/Asetwidths, weights, slants, point sizes, and character sets available for that
1056N/AThis document gives a standard logical font description (hereafter referred to
1056N/Aas XLFD) and the conventions to be used in the core protocol so that clients
1056N/Acan query and access screen type libraries in a consistent manner across all X
1056N/Aservers. In addition to completely specifying a given font by means of its
1056N/AFontName, the XLFD also provides for a standard set of key FontProperties that
1056N/Adescribe the font in more detail.
1056N/AThe XLFD provides an adequate set of typographic font properties, such as
1056N/ACAP_HEIGHT, X_HEIGHT, and RELATIVE_SETWIDTH, for publishing and other
1056N/Aapplications to do intelligent font matching or substitution when handling
1056N/Adocuments created on some foreign server that use potentially unknown fonts. In
1056N/Aaddition, this information is required by certain clients to position
1056N/Asubscripts automatically and determine small capital heights, recommended
1056N/Aleading, word-space values, and so on.
1056N/AChapter 2. Requirements and Goals
1056N/AProvide Unique and Descriptive Font Names
1056N/ASupport Multiple Font Vendors and Character Sets
1056N/ASupport Scalable and Polymorphic Fonts
1056N/ASupport Transformations and Subsetting of Fonts
1056N/ABe Independent of X Server and Operating or File System Implementations
1056N/ASupport Arbitrarily Complex Font Matching and Substitution
1056N/AThe XLFD meets the short-term and long-term goals to have a standard logical
1056N/A ● Provides unique, descriptive font names that support simple pattern
1056N/A ● Supports multiple font vendors, arbitrary character sets, and encodings
1056N/A ● Supports naming and instancing of scalable and polymorphic fonts
1056N/A ● Supports transformations and subsetting of fonts
1056N/A ● Is independent of X server and operating or file system implementations
1056N/A ● Supports arbitrarily complex font matching or substitution
1056N/AProvide Unique and Descriptive Font Names
1056N/AIt should be possible to have font names that are long enough and descriptive
1056N/Aenough to have a reasonable probability of being unique without inventing a new
1056N/Aregistration organization. Resolution and size-dependent font masters,
1056N/Amultivendor font libraries, and so on must be anticipated and handled by the
1056N/AThe name itself should be structured to be amenable to simple pattern matching
1056N/Aand parsing, thus allowing X clients to restrict font queries to some subset of
1056N/Aall possible fonts in the server.
1056N/ASupport Multiple Font Vendors and Character Sets
1056N/AThe font name and properties should distinguish between fonts that were
1056N/Asupplied by different font vendors but that possibly share the same name. We
1056N/Aanticipate a highly competitive font market where users will be able to buy
1056N/Afonts from many sources according to their particular requirements.
1056N/AA number of font vendors deliver each font with all glyphs designed for that
1056N/Afont, where charset mappings are defined by encoding vectors. Some server
1056N/Aimplementations may force these mappings to proprietary or standard charsets
1056N/Astatically in the font data. Others may desire to perform the mapping
1056N/Adynamically in the server. Provisions must be made in the font name that allows
1056N/Aa font request to specify or identify specific charset mappings in server
1056N/Aenvironments where multiple charsets are supported.
1056N/ASupport Scalable and Polymorphic Fonts
1056N/AIf a font source can be scaled to an arbitrary size or varied in other ways, it
1056N/Ashould be possible for an application to determine that fact from the font
1056N/Aname, and the application should be able to construct a font name for any
1056N/ASupport Transformations and Subsetting of Fonts
1056N/AArbitrary two-dimensional linear transformations of fonts should be able to be
1056N/Arequested by applications. Since such transformed fonts may be used for special
1056N/Aeffects requiring a few characters from each of many differently transformed
1056N/Afonts, it should be possible to request only a few characters from a font for
1056N/ABe Independent of X Server and Operating or File System Implementations
1056N/AX client applications that require a particular font should be able to use the
1056N/Adescriptive name without knowledge of the file system or other repository in
1056N/Ause by the server. However, it should be possible for servers to translate a
1056N/Agiven font name into a file name syntax that it knows how to deal with, without
1056N/Acompromising the uniqueness of the font name. This algorithm should be
1056N/Areversible (exactly how this translation is done is implementation dependent).
1056N/ASupport Arbitrarily Complex Font Matching and Substitution
1056N/AIn addition to the font name, the XLFD should define a standard list of
1056N/Adescriptive font properties, with agreed-upon fallbacks for all fonts. This
1056N/Aallows client applications to derive font-specific formatting or display data
1056N/Aand to perform font matching or substitution when asked to handle potentially
1056N/AThe XLFD must be extensible so that new
and/or private descriptive font
1056N/Aproperties can be added to conforming fonts without making existing X client or
1056N/Aserver implementations obsolete.
1056N/AChapter 3. X Logical Font Description
1056N/ABuilt-in Font Property Atoms
1056N/AXLFD is divided into two basic components: the FontName, which gives all font
1056N/Ainformation needed to uniquely identify a font in X protocol requests (for
1056N/Aexample, OpenFont, ListFonts, and so on) and a variable list of optional
1056N/AFontProperties, which describe a font in more detail.
1056N/AThe FontName is used in font queries and is returned as data in certain X
1056N/Aprotocol requests. It is also specified as the data value for the FONT item in
1056N/Athe X Consortium Character Bitmap Distribution Format Standard (BDF V2.1).
1056N/AThe FontProperties are supplied on a font-by-font basis and are returned as
1056N/Adata in certain X protocol requests as part of the XFontStruct data structure.
1056N/AThe names and associated data values for each of the FontProperties may also
1056N/AEach FontName is logically composed of two strings: a FontNameRegistry prefix
1056N/Athat is followed by a FontNameSuffix. The FontName uses the ISO 8859-1
1056N/Aencoding. The FontNameRegistry is an x-registered-name (a name that has been
1056N/Aregistered with the X Consortium) that identifies the registration authority
1056N/Athat owns the specified FontNameSuffix syntax and semantics.
1056N/AAll font names that conform to this specification are to use a FontNameRegistry
1056N/Aprefix, which is defined to be the string "-" (HYPHEN). All FontNameRegistry
1056N/Aprefixes of the form: +version-, where the specified version indicates some
1056N/Afuture XLFD specification, are reserved by the X Consortium for future
1056N/Aextensions to XLFD font names. If required, extensions to the current XLFD font
1056N/Aname shall be constructed by appending new fields to the current structure,
1056N/Aeach delimited by the existing field delimiter. The availability of other
1056N/AFontNameRegistry prefixes or fonts that support other registries is server
1056N/AIn the X protocol specification, the FontName is required to be a string;
1056N/Ahence, numeric field values are represented in the name as string equivalents.
1056N/AAll FontNameSuffix fields are also defined as FontProperties; numeric property
1056N/Avalues are represented as signed or unsigned integers, as appropriate.
1056N/AThe FontName is a structured, parsable string (of type STRING8) whose
1056N/ABackus-Naur Form syntax description is as follows:
1056N/AFontName ::= XFontNameRegistry XFontNameSuffix | PrivFontNameRegistry
1056N/AXFontNameRegistry :: XFNDelim | XFNExtPrefix Version XFNDelim
1056N/A FOUNDRY XFNDelim FAMILY_NAME XFNDelim WEIGHT_NAME XFNDelim
1056N/A SLANT XFNDelim SETWIDTH_NAME XFNDelim ADD_STYLE_NAME
1056N/AXFontNameSuffix ::= XFNDelim PIXEL_SIZE XFNDelim POINT_SIZE XFNDelim
1056N/A RESOLUTION_X XFNDelim RESOLUTION_Y XFNDelim SPACING
1056N/A XFNDelim AVERAGE_WIDTH XFNDelim CHARSET_REGISTRY XFNDelim
1056N/AVersion ::= STRING8 - the XLFD version that defines an extension to
1056N/A the font name syntax (for example, "1.4")
1056N/AXFNExtPrefix ::= OCTET - "+" (PLUS)
1056N/AXFNDelim ::= OCTET - "-" (HYPHEN)
1056N/APrivFontNameRegistry STRING8 - other than those strings reserved by XLFD
1056N/AField values are constructed as strings of ISO 8859-1 graphic characters,
1056N/A ● '-' (HYPHEN), the XLFD font name delimiter character
1056N/A ● '?' (QUESTION MARK) and "*" (ASTERISK), the X protocol font name wildcard
1056N/A ● ',' (COMMA), used by Xlib to separate XLFD font names in a font set.
1056N/A ● '"' (QUOTATION MARK), used by some commercial products to quote a font
1056N/AAlphabetic case distinctions are allowed but are for human readability concerns
1056N/Aonly. Conforming X servers will perform matching on font name query or open
1056N/Arequests independent of case. The entire font name string must have no more
1056N/Athan 255 characters. It is recommended that clients construct font name query
1056N/Apatterns by explicitly including all field delimiters to avoid unexpected
1056N/Aresults. Note that SPACE is a valid character of a FontName field; for example,
1056N/Athe string "ITC Avant Garde Gothic" might be a FAMILY_NAME.
1056N/AThis section discusses the FontName:
1056N/A ● RESOLUTION_X and RESOLUTION_Y fields
1056N/A ● CHARSET_REGISTRY and CHARSET_ENCODING fields
1056N/AFOUNDRY is an x-registered-name, the name or identifier of the digital type
1056N/Afoundry that digitized and supplied the font data, or if different, the
1056N/Aidentifier of the organization that last modified the font shape or metric
1056N/AThe reason this distinction is necessary is that a given font design may be
1056N/Alicensed from one source (for example, ITC) but digitized and sold by any
1056N/Anumber of different type suppliers. Each digital version of the original
1056N/Adesign, in general, will be somewhat different in metrics and shape from the
1056N/Aidealized original font data, because each font foundry, for better or for
1056N/Aworse, has its own standards and practices for tweaking a typeface for a
1056N/Aparticular generation of output technologies or has its own perception of
1056N/AIt is up to the type supplier to register with the X Consortium a suitable name
1056N/Afor this FontName field according to the registration procedures defined by the
1056N/AThe X Consortium shall define procedures for registering foundry and other
1056N/Anames and shall maintain and publish, as part of its public distribution, a
1056N/Aregistry of such registered names for use in XLFD font names and properties.
1056N/AFAMILY_NAME is a string that identifies the range or family of typeface designs
1056N/Athat are all variations of one basic typographic style. This must be spelled
1056N/Aout in full, with words separated by spaces, as required. This name must be
1056N/Ahuman-understandable and suitable for presentation to a font user to identify
1056N/AIt is up to the type supplier to supply and maintain a suitable string for this
1056N/Afield and font property, to secure the proper legal title to a given name, and
1056N/Ato guard against the infringement of other's copyrights or trademarks. By
1056N/Aconvention, FAMILY_NAME is not translated. FAMILY_NAME may include an
1056N/Aindication of design ownership if considered a valid part of the typeface
1056N/AThe following are examples of FAMILY_NAME:
1056N/AWEIGHT_NAME is a string that identifies the font's typographic weight, that is,
1056N/Athe nominal blackness of the font, according to the FOUNDRY's judgment. This
1056N/Aname must be human-understandable and suitable for presentation to a font user.
1276N/AThe value "0" is used to indicate a polymorphic font (see Polymorphic Fonts).
1056N/AThe interpretation of this field is somewhat problematic because the
1056N/Atypographic judgment of weight has traditionally depended on the overall design
1056N/Aof the typeface family in question; that is, it is possible that the DemiBold
1056N/Aweight of one font could be almost equivalent in typographic feel to a Bold
1056N/AWEIGHT_NAME is captured as an arbitrary string because it is an important part
1056N/Aof a font's complete human-understandable name. However, it should not be used
1056N/Afor font matching or substitution. For this purpose, X client applications
1056N/Ashould use the weight-related font properties (RELATIVE_WEIGHT and WEIGHT) that
1056N/Agive the coded relative weight and the calculated weight, respectively.
1056N/ASLANT is a code-string that indicates the overall posture of the typeface
1056N/Adesign used in the font. The encoding is as follows:
1276N/A┌───────┬───────────────┬─────────────────────────────────────────────────────┐
1276N/A│Code │English │Description │
1276N/A├───────┼───────────────┼─────────────────────────────────────────────────────┤
1276N/A│"R" │Roman │Upright design │
1276N/A├───────┼───────────────┼─────────────────────────────────────────────────────┤
1276N/A│"I" │Italic │Italic design, slanted clockwise from the vertical │
1276N/A├───────┼───────────────┼─────────────────────────────────────────────────────┤
1276N/A│"O" │Oblique │Obliqued upright design, slanted clockwise from the │
1276N/A├───────┼───────────────┼─────────────────────────────────────────────────────┤
1276N/A│"RI" │Reverse Italic │Italic design, slanted counterclockwise from the │
1276N/A├───────┼───────────────┼─────────────────────────────────────────────────────┤
1276N/A│"RO" │Reverse Oblique│Obliqued upright design, slanted counterclockwise │
1276N/A├───────┼───────────────┼─────────────────────────────────────────────────────┤
1276N/A├───────┼───────────────┼─────────────────────────────────────────────────────┤
1276N/A│numeric│Polymorphic │See Polymorphic Fonts. │
1276N/A└───────┴───────────────┴─────────────────────────────────────────────────────┘
1056N/AThe SLANT codes are for programming convenience only and usually are converted
1056N/Ainto their equivalent human-understandable form before being presented to a
1056N/ASETWIDTH_NAME is a string that gives the font's typographic proportionate
1056N/Awidth, that is, the nominal width per horizontal unit of the font, according to
1056N/Athe FOUNDRY's judgment. The value "0" is used to indicate a polymorphic font
1056N/AAs with WEIGHT_NAME, the interpretation of this field or font property is
1056N/Asomewhat problematic, because the designer's judgment of setwidth has
1056N/Atraditionally depended on the overall design of the typeface family in
1056N/Aquestion. For purposes of font matching or substitution, X client applications
1056N/Ashould either use the RELATIVE_SETWIDTH font property that gives the relative
1056N/Acoded proportionate width or calculate the proportionate width.
1056N/AThe following are examples of SETWIDTH_NAME:
1056N/AADD_STYLE_NAME is a string that identifies additional typographic style
1056N/Ainformation that is not captured by other fields but is needed to identify the
1056N/Aparticular font. The character "[" anywhere in the field is used to indicate a
1276N/Apolymorphic font (see Polymorphic Fonts).
1056N/AADD_STYLE_NAME is not a typeface classification field and is only used for
1056N/Auniqueness. Its use, as such, is not limited to typographic style distinctions.
1056N/AThe following are examples of ADD_STYLE_NAME:
1056N/APIXEL_SIZE gives the body size of the font at a particular POINT_SIZE and
1056N/ARESOLUTION_Y. PIXEL_SIZE is either an integer-string or a string beginning with
1276N/A"[". A string beginning with "[" represents a matrix (see Matrix
1056N/ATransformations). PIXEL_SIZE usually incorporates additional vertical spacing
1056N/Athat is considered part of the font design. (Note, however, that this value is
1056N/Anot necessarily equivalent to the height of the font bounding box.) Zero is
1276N/Aused to indicate a scalable font (see Scalable Fonts).
1056N/APIXEL_SIZE usually is used by X client applications that need to query fonts
1056N/Aaccording to device-dependent size, regardless of the point size or vertical
1056N/Aresolution for which the font was designed.
1056N/APOINT_SIZE gives the body size for which the font was designed. POINT_SIZE is
1056N/Aeither an integer-string or a string beginning with "[". A string beginning
1276N/Awith "[" represents a matrix (see Matrix Transformations). This field usually
1276N/Aincorporates additional vertical spacing that is considered part of the font
1276N/Adesign. (Note, however, that POINT_SIZE is not necessarily equivalent to the
1276N/Aheight of the font bounding box.) POINT_SIZE is expressed in decipoints (where
1276N/Apoints are as defined in the X protocol or 72.27 points equal 1 inch). Zero is
1276N/Aused to indicate a scalable font (see Scalable Fonts).
1056N/APOINT_SIZE and RESOLUTION_Y are used by X clients to query fonts according to
1056N/Adevice-independent size to maintain constant text size on the display
1056N/Aregardless of the PIXEL_SIZE used for the font.
1056N/ARESOLUTION_X and RESOLUTION_Y Fields
1056N/ARESOLUTION_X and RESOLUTION_Y are unsigned integer-strings that give the
1056N/Ahorizontal and vertical resolution, measured in pixels or dots per inch (dpi),
1056N/Afor which the font was designed. Zero is used to indicate a scalable font (see
1276N/AScalable Fonts). Horizontal and vertical values are required because a separate
1276N/Abitmap font must be designed for displays with very different aspect ratios
1276N/A(for example, 1:1, 4:3, 2:1, and so on).
1056N/AThe separation of pixel or point size and resolution is necessary because X
1056N/Aallows for servers with very different video characteristics (for example,
1056N/Ahorizontal and vertical resolution, screen and pixel size, pixel shape, and so
1056N/Aon) to potentially access the same font library. The font name, for example,
1056N/Amust differentiate between a 14-point font designed for 75 dpi (body size of
1056N/Aabout 14 pixels) or a 14-point font designed for 150 dpi (body size of about 28
1056N/Apixels). Further, in servers that implement some or all fonts as continuously
1056N/Ascaled and scan-converted outlines, POINT_SIZE and RESOLUTION_Y will help the
1056N/Aserver to differentiate between potentially separate font masters for text,
1056N/Atitle, and display sizes or for other typographic considerations.
1056N/ASPACING is a code-string that indicates the escapement class of the font, that
1056N/Ais, monospace (fixed pitch), proportional (variable pitch), or charcell (a
1056N/Aspecial monospaced font that conforms to the traditional data-processing
1056N/Acharacter cell font model). The encoding is as follows:
1276N/A┌────┬────────────┬───────────────────────────────────────────────────────────┐
1276N/A│Code│English │Description │
1276N/A├────┼────────────┼───────────────────────────────────────────────────────────┤
1276N/A│ │ │A font whose logical character widths vary for each glyph. │
1276N/A│"P" │Proportional│Note that no other restrictions are placed on the metrics │
1276N/A│ │ │of a proportional font. │
1276N/A├────┼────────────┼───────────────────────────────────────────────────────────┤
1276N/A│ │ │A font whose logical character widths are constant (that │
1276N/A│"M" │Monospaced │is, every glyph in the font has the same logical width). No│
1276N/A│ │ │other restrictions are placed on the metrics of a │
1276N/A├────┼────────────┼───────────────────────────────────────────────────────────┤
1276N/A│ │ │A monospaced font that follows the standard typewriter │
1276N/A│ │ │character cell model (that is, the glyphs of the font can │
1276N/A│ │ │be modeled by X clients as "boxes" of the same width and │
1276N/A│ │ │height that are imaged side-by-side to form text strings or│
1276N/A│ │ │top-to-bottom to form text lines). By definition, all │
1276N/A│ │ │glyphs have the same logical character width, and no glyphs│
1276N/A│ │ │have "ink" outside of the character cell. There is no │
1276N/A│"C" │CharCell │kerning (that is, on a per-character basis with positive │
1276N/A│ │ │metrics: 0 <= left-bearing <= right-bearing <= width; with │
1276N/A│ │ │negative metrics: width <= left-bearing <= right-bearing <=│
1276N/A│ │ │zero). Also, the vertical extents of the font do not exceed│
1276N/A│ │ │the vertical spacing (that is, on a per-character basis: │
1276N/A│ │ │ascent <= font-ascent and descent <= font-descent). The │
1276N/A│ │ │cell height = font-descent + font-ascent, and the width = │
1276N/A└────┴────────────┴───────────────────────────────────────────────────────────┘
1056N/AAVERAGE_WIDTH is an integer-string typographic metric value that gives the
1056N/Aunweighted arithmetic mean of the absolute value of the width of each glyph in
1056N/Athe font (measured in tenths of pixels), multiplied by -1 if the dominant
1056N/Awriting direction for the font is right-to-left. A leading "~" (TILDE)
1056N/Aindicates a negative value. For monospaced and character cell fonts, this is
1056N/Athe width of all glyphs in the font. Zero is used to indicate a scalable font
1056N/ACHARSET_REGISTRY and CHARSET_ENCODING Fields
1056N/AThe character set used to encode the glyphs of the font (and implicitly the
1056N/Afont's glyph repertoire), as maintained by the X Consortium character set
1056N/Aregistry. CHARSET_REGISTRY is an x-registered-name that identifies the
1056N/Aregistration authority that owns the specified encoding. CHARSET_ENCODING is a
1056N/Aregistered name that identifies the coded character set as defined by that
1056N/Aregistration authority and, optionally, a subsetting hint.
1056N/AAlthough the X protocol does not explicitly have any knowledge about character
1056N/Aset encodings, it is expected that server implementors will prefer to embed
1056N/Aknowledge of certain proprietary or standard charsets into their font library
1056N/Afor reasons of performance and convenience. The CHARSET_REGISTRY and
1056N/ACHARSET_ENCODING fields or properties allow an X client font request to specify
1056N/Aa specific charset mapping in server environments where multiple charsets are
1056N/Asupported. The availability of any particular character set is font and server
1056N/ATo prevent collisions when defining character set names, it is recommended that
1056N/ACHARSET_REGISTRY and CHARSET_ENCODING name pairs be constructed according to
1056N/ACharsetRegistry ::= StdCharsetRegistryName | PrivCharsetRegistryName
1056N/ACharsetEncoding ::= StdCharsetEncodingName | PrivCharsetEncodingName
1056N/AStdCharsetRegistryName StdOrganizationId StdNumber | StdOrganizationId
1056N/APrivCharsetRegistryName OrganizationId STRING8
1056N/AStdCharsetEncodingName STRING8-numeric part number of referenced standard
1056N/APrivCharsetEncodingName STRING8
1056N/AStdOrganizationId ::= STRING8-the registered name or acronym of the
1056N/A referenced standard organization
1056N/AStdNumber ::= STRING8-referenced standard number
1056N/AOrganizationId ::= STRING8-the registered name or acronym of the
1056N/ADot ::= OCTET-"." (FULL STOP)
1056N/AYear ::= STRING8-numeric year (for example, 1989)
1056N/AThe X Consortium shall maintain and publish a registry of such character set
1056N/Anames for use in X protocol font names and properties as specified in XLFD.
1056N/AThe ISO Latin-1 character set shall be registered by the X Consortium as the
1056N/ACHARSET_REGISTRY-CHARSET_ENCODING value pair: "ISO8859-1".
1056N/AIf the CHARSET_ENCODING contains a "[" (LEFT SQUARE BRACKET), the "[" and the
1056N/Acharacters after it up to a "]" (RIGHT SQUARE BRACKET) are a subsetting hint
1056N/Atelling the font source that the client is interested only in a subset of the
1056N/Acharacters of the font. The font source can, optionally, return a font that
1056N/Acontains only those characters or any superset of those characters. The client
1056N/Acan expect to obtain valid glyphs and metrics only for those characters, and
1056N/Anot for any other characters in the font. The font properties may optionally be
1056N/Acalculated by considering only the characters in the subset.
1056N/AThe BNF for the subsetting hint is
1056N/ASubset ::= LeftBracket RangeList RightBracket
1056N/ARangeList ::= Range | Range Space RangeList
1056N/ARange ::= Number | Number Underscore Number
1056N/ANumber ::= "0x" HexNumber | DecNumber
1056N/AHexNumber ::= HexDigit | HexDigit HexNumber
1056N/ADecNumber ::= DecDigit | DecDigit DecNumber
1056N/ADecDigit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
1056N/AHexDigit ::= DecDigit | "a" | "b" | "c" | "d" | "e" | "f"
1056N/ALeftBracket ::= "[" (LEFT SQUARE BRACKET)
1056N/ARightBracket ::= "]" (RIGHT SQUARE BRACKET)
1056N/AUnderscore ::= "_" (LOW LINE)
1056N/AEach Range specifies characters that are to be part of the subset included in
1056N/Athe font. A Range containing two Numbers specifies the first and last
1056N/Acharacter, inclusively, of a range of characters. A Range that is a single
1056N/ANumber specifies a single character to be included in the font. A HexNumber is
1056N/Ainterpreted as a hexadecimal number. A DecNumber is interpreted as a decimal
1056N/Anumber. The font consists of the union of all the Ranges in the RangeList.
1056N/A -misc-fixed-medium-r-normal--0-0-0-0-c-0-iso8859-1[65 70 80_90]
1056N/Atells the font source that the client is interested only in characters 65, 70,
1056N/AThe following examples of font names are derived from the screen fonts shipped
1056N/Awith the X Consortium distribution.
1276N/A┌───────┬──────────────────────────────────────────────────────────────────────┐
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Charter│-Bitstream-Charter-Medium-R-Normal--12-120-75-75-P-68-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Bold 12│-Bitstream-Charter-Bold-R-Normal--12-120-75-75-P-76-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Bold │-Bitstream-Charter-Bold-I-Normal--12-120-75-75-P-75-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Italic │-Bitstream-Charter-Medium-I-Normal--12-120-75-75-P-66-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Courier│-Adobe-Courier-Medium-R-Normal--8-80-75-75-M-50-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Courier│-Adobe-Courier-Medium-R-Normal--10-100-75-75-M-60-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Courier│-Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Courier│-Adobe-Courier-Medium-R-Normal--24-240-75-75-M-150-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Bold 10│-Adobe-Courier-Bold-R-Normal--10-100-75-75-M-60-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Bold │-Adobe-Courier-Bold-O-Normal--10-100-75-75-M-60-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Oblique│-Adobe-Courier-Medium-O-Normal--10-100-75-75-M-60-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Symbol │-Adobe-Symbol-Medium-R-Normal--14-100-100-100-P-85-Adobe-FONTSPECIFIC │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Symbol │-Adobe-Symbol-Medium-R-Normal--20-140-100-100-P-107-Adobe-FONTSPECIFIC│
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Symbol │-Adobe-Symbol-Medium-R-Normal--25-180-100-100-P-142-Adobe-FONTSPECIFIC│
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Symbol │-Adobe-Symbol-Medium-R-Normal--34-240-100-100-P-191-Adobe-FONTSPECIFIC│
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Bold 10│-Adobe-Times-Bold-R-Normal--14-100-100-100-P-76-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Bold │-Adobe-Times-Bold-I-Normal--14-100-100-100-P-77-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Italic │-Adobe-Times-Medium-I-Normal--14-100-100-100-P-73-ISO8859-1 │
1276N/A├───────┼──────────────────────────────────────────────────────────────────────┤
1276N/A│Roman │-Adobe-Times-Medium-R-Normal--14-100-100-100-P-74-ISO8859-1 │
1276N/A└───────┴──────────────────────────────────────────────────────────────────────┘
1056N/AAll font properties are optional but will generally include the font name
1056N/Afields and, on a font-by-font basis, any other useful font descriptive and use
1056N/Ainformation that may be required to use the font intelligently. The XLFD
1056N/Aspecifies an extensive set of standard X font properties, their interpretation,
1056N/Aand fallback rules when the property is not defined for a given font. The goal
1056N/Ais to provide client applications with enough font information to be able to
1056N/Amake automatic formatting and display decisions with good typographic results.
1056N/AFont property names use the ISO 8859-1 encoding.
1056N/AAdditional standard X font property definitions may be defined in the future
1056N/Aand private properties may exist in X fonts at any time. Private font
1056N/Aproperties should be defined to conform to the general mechanism defined in the
1056N/AX protocol to prevent overlap of name space and ambiguous property names, that
1056N/Ais, private font property names are of the form: "_" (LOW LINE), followed by
1056N/Athe organizational identifier, followed by "_" (LOW LINE), and terminated with
1056N/AThe Backus-Naur Form syntax description of X font properties is as follows:
1276N/AProperties ::= OptFontPropList
1276N/AOptFontPropList NULL | OptFontProp OptFontPropList
1276N/AOptFontProp ::= PrivateFontProp | XFontProp
1276N/APrivateFontProp STRING8 | Underscore OrganizationId Underscore STRING8
1056N/A FOUNDRY | FAMILY_NAME | WEIGHT_NAME | SLANT | SETWIDTH_NAME |
1056N/A ADD_STYLE_NAME | PIXEL_SIZE | POINT_SIZE | RESOLUTION_X |
1056N/A RESOLUTION_Y | SPACING | AVERAGE_WIDTH | CHARSET_REGISTRY |
1056N/A CHARSET_ENCODING | QUAD_WIDTH | RESOLUTION | MIN_SPACE |
1056N/A NORM_SPACE | MAX_SPACE | END_SPACE | SUPERSCRIPT_X |
1276N/A SUPERSCRIPT_Y | SUBSCRIPT_X | SUBSCRIPT_Y | UNDERLINE_POSITION
1276N/AXFontProp ::= | UNDERLINE_THICKNESS | STRIKEOUT_ASCENT | STRIKEOUT_DESCENT |
1276N/A ITALIC_ANGLE | X_HEIGHT | WEIGHT | FACE_NAME | FULL_NAME | FONT
1276N/A | COPYRIGHT | AVG_CAPITAL_WIDTH | AVG_LOWERCASE_WIDTH |
1276N/A RELATIVE_SETWIDTH | RELATIVE_WEIGHT | CAP_HEIGHT | SUPERSCRIPT_
1276N/A SIZE | FIGURE_WIDTH | SUBSCRIPT_SIZE | SMALL_CAP_SIZE | NOTICE
1276N/A | DESTINATION | FONT_TYPE | FONT_VERSION | RASTERIZER_NAME |
1056N/A RASTERIZER_VERSION | RAW_ASCENT | RAW_DESCENT | RAW_* |
1056N/A AXIS_NAMES | AXIS_LIMITS | AXIS_TYPES
1276N/AUnderscore ::= OCTET-"_" (LOW LINE)
1276N/AOrganizationId STRING8-the registered name of the organization
1056N/AFOUNDRY is as defined in the FontName except that the property type is ATOM.
1056N/AFOUNDRY cannot be calculated or defaulted if not supplied as a font property.
1056N/AFAMILY_NAME is as defined in the FontName except that the property type is
1056N/AFAMILY_NAME cannot be calculated or defaulted if not supplied as a font
1056N/AWEIGHT_NAME is as defined in the FontName except that the property type is
1056N/AWEIGHT_NAME can be defaulted if not supplied as a font property, as follows:
1056N/Aif (WEIGHT_NAME undefined) then
1056N/A WEIGHT_NAME = ATOM("Medium")
1056N/ASLANT is as defined in the FontName except that the property type is ATOM.
1056N/ASLANT can be defaulted if not supplied as a font property, as follows:
1056N/ASETWIDTH_NAME is as defined in the FontName except that the property type is
1056N/ASETWIDTH_NAME can be defaulted if not supplied as a font property, as follows:
1056N/Aif (SETWIDTH_NAME undefined) then
1056N/A SETWIDTH_NAME = ATOM("Normal")
1056N/AADD_STYLE_NAME is as defined in the FontName except that the property type is
1056N/AADD_STYLE_NAME can be defaulted if not supplied as a font property, as follows:
1056N/Aif (ADD_STYLE_NAME undefined) then
1056N/APIXEL_SIZE is as defined in the FontName except that the property type is
1056N/AX clients requiring pixel values for the various typographic fixed spaces (em
1056N/Aspace, en space, and thin space) can use the following algorithm for computing
1056N/Athese values from other properties specified for a font:
1056N/A EMspace = ROUND ((RESOLUTION_X * POINT_SIZE) / DeciPointsPerInch)
1056N/A ENspace = ROUND (EMspace / 2)
1056N/A THINspace = ROUND (EMspace / 3)\fP
1056N/Awhere a slash (/) denotes real division, an asterisk (*) denotes real
1056N/Amultiplication, and ROUND denotes a function that rounds its real argument a up
1056N/Aor down to the next integer. This rounding is done according to X = FLOOR ( a +
1056N/A0.5), where FLOOR is a function that rounds its real argument down to the
1056N/APIXEL_SIZE can be approximated if not supplied as a font property, according to
1056N/Aif (PIXEL_SIZE undefined) then
1056N/A PIXEL_SIZE = ROUND ((RESOLUTION_Y * POINT_SIZE) / DeciPointsPerInch)
1056N/APOINT_SIZE is as defined in the FontName except that the property type is
1056N/AX clients requiring device-independent values for em space, en space, and thin
1056N/Aspace can use the following algorithm:
1056N/A EMspace = ROUND (POINT_SIZE / 10)
1056N/A ENspace = ROUND (POINT_SIZE / 20)
1056N/A THINspace = ROUND (POINT_SIZE / 30)
1056N/ADesign POINT_SIZE cannot be calculated or approximated.
1056N/ARESOLUTION_X is as defined in the FontName except that the property type is
1056N/ARESOLUTION_X cannot be calculated or approximated.
1056N/ARESOLUTION_Y is as defined in the FontName except that the property type is
1056N/ARESOLUTION_X cannot be calculated or approximated.
1056N/ASPACING is as defined in the FontName except that the property type is ATOM.
1056N/ASPACING can be calculated if not supplied as a font property, according to the
1056N/Adefinitions given above for the FontName.
1056N/AAVERAGE_WIDTH is as defined in the FontName except that the property type is
1056N/AAVERAGE_WIDTH can be calculated if not provided as a font property, according
1056N/Aif (AVERAGE_WIDTH undefined) then
1056N/A AVERAGE_WIDTH = ROUND (MEAN (ABS (width of each glyph in font)) * 10)
1056N/A * (if (dominant writing direction L-to-R) then 1 else -1)
1056N/Awhere MEAN is a function that returns the arithmetic mean of its arguments.
1056N/AX clients that require values for the number of characters per inch (pitch) of
1056N/Aa monospaced font can use the following algorithm using the AVERAGE_WIDTH and
1056N/ARESOLUTION_X font properties:
1056N/Aif (SPACING not proportional) then
1056N/A CharPitch = (RESOLUTION_X * 10) / AVERAGE_WIDTH
1056N/ACHARSET_REGISTRY is as defined in the FontName except that the property type is
1056N/ACHARSET_REGISTRY cannot be defaulted if not supplied as a font property.
1056N/ACHARSET_ENCODING is as defined in the FontName except that the property type is
1056N/ACHARSET_ENCODING cannot be defaulted if not supplied as a font property.
1056N/AMIN_SPACE is an integer value (of type INT32) that gives the recommended
1056N/Aminimum word-space value to be used with this font.
1056N/AMIN_SPACE can be approximated if not provided as a font property, according to
1056N/Aif (MIN_SPACE undefined) then
1056N/A MIN_SPACE = ROUND(0.75 * NORM_SPACE)
1056N/ANORM_SPACE is an integer value (of type INT32) that gives the recommended
1056N/Anormal word-space value to be used with this font.
1056N/ANORM_SPACE can be approximated if not provided as a font property, according to
1056N/Aif (NORM_SPACE undefined) then
1056N/A if (SPACE glyph exists) then
1056N/A NORM_SPACE = width of SPACE
1056N/A else NORM_SPACE = ROUND((0.33 * RESOLUTION_X * POINT_SIZE)/ DeciPointsPerInch)
1056N/AMAX_SPACE is an integer value (of type INT32) that gives the recommended
1056N/Amaximum word-space value to be used with this font.
1056N/AMAX_SPACE can be approximated if not provided as a font property, according to
1056N/Aif (MAX_SPACE undefined) then
1056N/A MAX_SPACE = ROUND(1.5 * NORM_SPACE)
1056N/AEND_SPACE is an integer value (of type INT32) that gives the recommended
1056N/Aspacing at the end of sentences.
1056N/AEND_SPACE can be approximated if not provided as a font property, according to
1056N/Aif (END_SPACE undefined) then
1056N/AAVG_CAPITAL_WIDTH is an integer value (of type INT32) that gives the unweighted
1056N/Aarithmetic mean of the absolute value of the width of each capital glyph in the
1056N/Afont, in tenths of pixels, multiplied by -1 if the dominant writing direction
1056N/Afor the font is right-to-left. This property applies to both Latin and
1056N/Anon-Latin fonts. For Latin fonts, capitals are the glyphs A through Z. This
1056N/Aproperty is usually used for font matching or substitution.
1056N/AAVG_CAPITAL_WIDTH can be calculated if not provided as a font property,
1056N/Aaccording to the following algorithm:
1056N/Aif (AVG_CAPITAL_WIDTH undefined) then
1056N/A AVG_CAPITAL_WIDTH = ROUND (MEAN
1056N/A (ABS (width of each capital glyph)) * 10)
1056N/A * (if (dominant writing direction L-to-R) then 1 else -1)
1056N/A else AVG_CAPITAL_WIDTH undefined
1056N/AAVG_LOWERCASE_WIDTH is an integer value (of type INT32) that gives the
1056N/Aunweighted arithmetic mean width of the absolute value of the width of each
1056N/Alowercase glyph in the font in tenths of pixels, multiplied by -1 if the
1056N/Adominant writing direction for the font is right-to-left. For Latin fonts,
1056N/Alowercase are the glyphs a through z. This property is usually used for font
1056N/AWhere appropriate, AVG_LOWERCASE_WIDTH can be approximated if not provided as a
1056N/Afont property, according to the following algorithm:
1056N/Aif (AVG_LOWERCASE_WIDTH undefined) then
1056N/A AVG_LOWERCASE_WIDTH = ROUND (MEAN
1056N/A (ABS (width of each lowercase glyph)) * 10)
1056N/A * (if (dominant writing direction L-to-R) then 1 else -1)
1056N/A else AVG_LOWERCASE_WIDTH undefined
1056N/AQUAD_WIDTH is an integer typographic metric (of type INT32) that gives the
1056N/ABecause all typographic fixed spaces (em, en, and thin) are constant for a
1056N/Agiven font size (that is, they do not vary according to setwidth), the use of
1056N/Athis font property has been deprecated. X clients that require typographic
1056N/Afixed space values are encouraged to discontinue use of QUAD_WIDTH and compute
1056N/Athese values from other font properties (for example, PIXEL_SIZE). X clients
1056N/Athat require a font-dependent width value should use either the FIGURE_WIDTH or
1056N/Aone of the average character width font properties (AVERAGE_WIDTH,
1056N/AAVG_CAPITAL_WIDTH or AVG_LOWERCASE_WIDTH).
1056N/AFIGURE_WIDTH is an integer typographic metric (of type INT32) that gives the
1056N/Awidth of the tabular figures and the dollar sign, if suitable for tabular
1056N/Asetting (all widths equal). For Latin fonts, these tabular figures are the
1056N/AArabic numerals 0 through 9.
1056N/AFIGURE_WIDTH can be approximated if not supplied as a font property, according
1056N/Aif (numerals and DOLLAR sign are defined & widths are equal) then
1056N/A FIGURE_WIDTH = width of DOLLAR
1056N/Aelse FIGURE_WIDTH property undefined
1056N/ASUPERSCRIPT_X is an integer value (of type INT32) that gives the recommended
1056N/Ahorizontal offset in pixels from the position point to the X origin of
1056N/Asynthetic superscript text. If the current position point is at [X,Y], then
1056N/Asuperscripts should begin at [X + SUPERSCRIPT_X, Y - SUPERSCRIPT_Y].
1056N/ASUPERSCRIPT_X can be approximated if not provided as a font property, according
1056N/Aif (SUPERSCRIPT_X undefined) then
1056N/A if (TANGENT(ITALIC_ANGLE) defined) then
1056N/A SUPERSCRIPT_X = ROUND((0.40 * CAP_HEIGHT) / TANGENT(ITALIC_ANGLE))
1056N/A else SUPERSCRIPT_X = ROUND(0.40 * CAP_HEIGHT)
1056N/Awhere TANGENT is a trigonometric function that returns the tangent of its
1056N/Aargument, which is in 1/64 degrees.
1056N/ASUPERSCRIPT_Y is an integer value (of type INT32) that gives the recommended
1056N/Avertical offset in pixels from the position point to the Y origin of synthetic
1056N/Asuperscript text. If the current position point is at [X,Y], then superscripts
1056N/Ashould begin at [X + SUPERSCRIPT_X, Y - SUPERSCRIPT_Y].
1056N/ASUPERSCRIPT_Y can be approximated if not provided as a font property, according
1056N/Aif (SUPERSCRIPT_Y undefined) then
1056N/A SUPERSCRIPT_Y = ROUND(0.40 * CAP_HEIGHT)
1056N/ASUBSCRIPT_X is an integer value (of type INT32) that gives the recommended
1056N/Ahorizontal offset in pixels from the position point to the X origin of
1056N/Asynthetic subscript text. If the current position point is at [X,Y], then
1056N/Asubscripts should begin at [X + SUBSCRIPT_X, Y + SUBSCRIPT_Y].
1056N/ASUBSCRIPT_X can be approximated if not provided as a font property, according
1056N/Aif (SUBSCRIPT_X undefined) then
1056N/A if (TANGENT(ITALIC_ANGLE) defined) then
1056N/A SUBSCRIPT_X = ROUND((0.40 * CAP_HEIGHT) / TANGENT(ITALIC_ANGLE))
1056N/A else SUBSCRIPT_X = ROUND(0.40 * CAP_HEIGHT)
1056N/ASUBSCRIPT_Y is an integer value (of type INT32) that gives the recommended
1056N/Avertical offset in pixels from the position point to the Y origin of synthetic
1056N/Asubscript text. If the current position point is at [X,Y], then subscripts
1056N/Ashould begin at [X + SUBSCRIPT_X, Y + SUBSCRIPT_Y].
1056N/ASUBSCRIPT_Y can be approximated if not provided as a font property, according
1056N/Aif (SUBSCRIPT_Y undefined) then
1056N/A SUBSCRIPT_Y = ROUND(0.40 * CAP_HEIGHT)
1056N/ASUPERSCRIPT_SIZE is an integer value (of type INT32) that gives the recommended
1056N/Abody size of synthetic superscripts to be used with this font, in pixels. This
1056N/Awill generally be smaller than the size of the current font; that is,
1056N/Asuperscripts are imaged from a smaller font offset according to SUPERSCRIPT_X
1056N/ASUPERSCRIPT_SIZE can be approximated if not provided as a font property,
1056N/Aaccording to the following algorithm:
1056N/Aif (SUPERSCRIPT_SIZE undefined) then
1056N/A SUPERSCRIPT_SIZE = ROUND(0.60 * PIXEL_SIZE)
1056N/ASUBSCRIPT_SIZE is an integer value (of type INT32) that gives the recommended
1056N/Abody size of synthetic subscripts to be used with this font, in pixels. As with
1056N/ASUPERSCRIPT_SIZE, this will generally be smaller than the size of the current
1056N/Afont; that is, subscripts are imaged from a smaller font offset according to
1056N/ASUBSCRIPT_X and SUBSCRIPT_Y.
1056N/ASUBSCRIPT_SIZE can be approximated if not provided as a font property,
1056N/Aif (SUBSCRIPT_SIZE undefined) then
1056N/A SUBSCRIPT_SIZE = ROUND(0.60 * PIXEL_SIZE)
1056N/ASMALL_CAP_SIZE is an integer value (of type INT32) that gives the recommended
1056N/Abody size of synthetic small capitals to be used with this font, in pixels.
1056N/ASmall capitals are generally imaged from a smaller font of slightly more
1056N/Aweight. No offset [X,Y] is necessary.
1056N/ASMALL_CAP_SIZE can be approximated if not provided as a font property,
1056N/Aaccording to the following algorithm:
1056N/Aif (SMALL_CAP_SIZE undefined) then
1056N/A SMALL_CAP_SIZE = ROUND(PIXEL_SIZE * ((X_HEIGHT
1056N/A + ((CAP_HEIGHT - X_HEIGHT) / 3)) / CAP_HEIGHT))
1056N/AUNDERLINE_POSITION is an integer value (of type INT32) that gives the
1056N/Arecommended vertical offset in pixels from the baseline to the top of the
1056N/Aunderline. If the current position point is at [X,Y], the top of the baseline
1056N/Ais given by [X, Y + UNDERLINE_POSITION].
1056N/AUNDERLINE_POSITION can be approximated if not provided as a font property,
1056N/Aaccording to the following algorithm:
1056N/Aif (UNDERLINE_POSITION undefined) then
1056N/A UNDERLINE_POSITION = ROUND((maximum descent) / 2)
1056N/Awhere maximum descent is the maximum descent (below the baseline) in pixels of
1056N/AUNDERLINE_THICKNESS is an integer value (of type INT32) that gives the
1056N/Arecommended underline thickness, in pixels.
1056N/AUNDERLINE_THICKNESS can be approximated if not provided as a font property,
1056N/Aaccording to the following algorithm:
1056N/ACapStemWidth = average width of the stems of capitals
1056N/Aif (UNDERLINE_THICKNESS undefined) then
1056N/A UNDERLINE_THICKNESS = CapStemWidth
1056N/ASTRIKEOUT_ASCENT is an integer value (of type INT32) that gives the vertical
1056N/Aascent for boxing or voiding glyphs in this font. If the current position is at
1056N/A[X,Y] and the string extent is EXTENT, the upper-left corner of the strikeout
1056N/Abox is at [X, Y - STRIKEOUT_ASCENT] and the lower-right corner of the box is at
1056N/A[X + EXTENT, Y + STRIKEOUT_DESCENT].
1056N/ASTRIKEOUT_ASCENT can be approximated if not provided as a font property,
1056N/Aaccording to the following algorithm:
1056N/Aif (STRIKEOUT_ASCENT undefined)
1056N/A STRIKEOUT_ASCENT = maximum ascent
1056N/Awhere maximum ascent is the maximum ascent (above the baseline) in pixels of
1056N/ASTRIKEOUT_DESCENT is an integer value (of type INT32) that gives the vertical
1056N/Adescent for boxing or voiding glyphs in this font. If the current position is
1056N/Aat [X,Y] and the string extent is EXTENT, the upper-left corner of the
1056N/Astrikeout box is at [X, Y - STRIKEOUT_ASCENT] and the lower-right corner of the
1056N/Abox is at [X + EXTENT, Y + STRIKEOUT_DESCENT].
1056N/ASTRIKEOUT_DESCENT can be approximated if not provided as a font property,
1056N/Aaccording to the following algorithm:
1056N/Aif (STRIKEOUT_DESCENT undefined)
1056N/A STRIKEOUT_DESCENT = maximum descent
1056N/Awhere maximum descent is the maximum descent (below the baseline) in pixels of
1056N/AITALIC_ANGLE is an integer value (of type INT32) that gives the nominal posture
1056N/Aangle of the typeface design, in 1/64 degrees, measured from the glyph origin
1056N/Acounterclockwise from the three o'clock position.
1056N/AITALIC_ANGLE can be defaulted if not provided as a font property, according to
1056N/Aif (ITALIC_ANGLE undefined) then
1056N/ACAP_HEIGHT is an integer value (of type INT32) that gives the nominal height of
1056N/Athe capital letters contained in the font, as specified by the FOUNDRY or
1056N/ACertain clients require CAP_HEIGHT to compute scale factors and positioning
1056N/Aoffsets for synthesized glyphs where this information or designed glyphs are
1056N/Anot explicitly provided by the font (for example, small capitals, superiors,
1056N/Ainferiors, and so on). CAP_HEIGHT is also a critical factor in font matching
1056N/ACAP_HEIGHT can be approximated if not provided as a font property, according to
1056N/Aif (CAP_HEIGHT undefined) then
1056N/A else if (capitals exist) then
1056N/AX_HEIGHT is an integer value (of type INT32) that gives the nominal height
1056N/Aabove the baseline of the lowercase glyphs contained in the font, as specified
1056N/Aby the FOUNDRY or typeface designer.
1056N/AAs with CAP_HEIGHT, X_HEIGHT is required by certain clients to compute scale
1056N/Afactors for synthesized small capitals where this information is not explicitly
1056N/Aprovided by the font resource. X_HEIGHT is a critical factor in font matching
1056N/AX_HEIGHT can be approximated if not provided as a font property, according to
1056N/Aif (X_HEIGHT undefined) then
1056N/A else if (lowercase exists) then
1056N/ARELATIVE_SETWIDTH is an unsigned integer value (of type CARD32) that gives the
1056N/Acoded proportionate width of the font, relative to all known fonts of the same
1056N/Atypeface family, according to the type designer's or FOUNDRY's judgment.
1056N/ARELATIVE_SETWIDTH ranges from 10 to 90 or is 0 if undefined or unknown. The
1056N/Afollowing reference values are defined:
1276N/A┌────┬───────────────────┬────────────────────────────────────────────┐
1276N/A│Code│English Translation│Description │
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A│0 │Undefined │Undefined or unknown │
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A│10 │UltraCondensed │The lowest ratio of average width to height │
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A│30 │Condensed │Condensed, Narrow, Compressed, ... │
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A│50 │Medium │Medium, Normal, Regular, ... │
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A│60 │SemiExpanded │SemiExpanded, DemiExpanded, ... │
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A│80 │ExtraExpanded │ExtraExpanded, Wide, ... │
1276N/A├────┼───────────────────┼────────────────────────────────────────────┤
1276N/A│90 │UltraExpanded │The highest ratio of average width to height│
1276N/A└────┴───────────────────┴────────────────────────────────────────────┘
1056N/ARELATIVE_SETWIDTH can be defaulted if not provided as a font property,
1056N/Aaccording to the following algorithm:
1056N/Aif (RELATIVE_SETWIDTH undefined) then
1056N/AFor polymorphic fonts, RELATIVE_SETWIDTH is not necessarily a linear function
1056N/Aof the font's setwidth axis.
1056N/AX clients that want to obtain a calculated proportionate width of the font
1056N/A(that is, a font-independent way of identifying the proportionate width across
1056N/Aall fonts and all font vendors) can use the following algorithm:
1056N/ASETWIDTH = AVG_CAPITAL_WIDTH / (CAP_HEIGHT * 10)
1056N/Awhere SETWIDTH is a real number with zero being the narrowest calculated
1056N/ARELATIVE_WEIGHT is an unsigned integer value (of type CARD32) that gives the
1056N/Acoded weight of the font, relative to all known fonts of the same typeface
1056N/Afamily, according to the type designer's or FOUNDRY's judgment.
1056N/ARELATIVE_WEIGHT ranges from 10 to 90 or is 0 if undefined or unknown. The
1056N/Afollowing reference values are defined:
1276N/A┌────┬────────────────┬───────────────────────────────────────────────────────┐
1276N/A│Code│English │Description │
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A│0 │Undefined │Undefined or unknown │
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A│10 │UltraLight │The lowest ratio of stem width to height │
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A│40 │SemiLight │SemiLight, Book, ... │
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A│50 │Medium │Medium, Normal, Regular,... │
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A│60 │SemiBold │SemiBold, DemiBold, ... │
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A│80 │ExtraBold │ExtraBold, Heavy, ... │
1276N/A├────┼────────────────┼───────────────────────────────────────────────────────┤
1276N/A│90 │UltraBold │UltraBold, Black, ..., the highest ratio of stem width │
1276N/A└────┴────────────────┴───────────────────────────────────────────────────────┘
1056N/ARELATIVE_WEIGHT can be defaulted if not provided as a font property, according
1056N/Aif (RELATIVE_WEIGHT undefined) then
1056N/AFor polymorphic fonts, RELATIVE_WEIGHT is not necessarily a linear function of
1056N/ACalculated WEIGHT is an unsigned integer value (of type CARD32) that gives the
1056N/Acalculated weight of the font, computed as the ratio of capital stem width to
1056N/ACAP_HEIGHT, in the range 0 to 1000, where 0 is the lightest weight.
1056N/AWEIGHT can be calculated if not supplied as a font property, according to the
1056N/ACapStemWidth = average width of the stems of capitals
1056N/A WEIGHT = ROUND ((CapStemWidth * 1000) / CAP_HEIGHT)
1056N/AA calculated value for weight is necessary when matching fonts from different
1056N/Afamilies because both the RELATIVE_WEIGHT and the WEIGHT_NAME are assigned by
1056N/Athe typeface supplier, according to its tradition and practice, and therefore,
1056N/Aare somewhat subjective. Calculated WEIGHT provides a font-independent way of
1056N/Aidentifying the weight across all fonts and all font vendors.
1056N/ARESOLUTION is an integer value (of type INT32) that gives the resolution for
1056N/Awhich this font was created, measured in 1/100 pixels per point.
1056N/AAs independent horizontal and vertical design resolution components are
1056N/Arequired to accommodate displays with nonsquare aspect ratios, the use of this
1056N/Afont property has been deprecated, and independent RESOLUTION_X and
1056N/A3.1.2.9 and 3.1.2.10). X clients are encouraged to discontinue use of the
1056N/ARESOLUTION property and are encouraged to use the appropriate X,Y resolution
1056N/AFONT is a string (of type ATOM) that gives the full XLFD name of the font-that
1056N/Ais, the value can be used to open another instance of the same font.
1056N/AIf not provided, the FONT property cannot be calculated.
1056N/AFACE_NAME is a human-understandable string (of type ATOM) that gives the full
1056N/Adevice-independent typeface name, including the owner, weight, slant, set, and
1056N/Aso on but not the resolution, size, and so on. This property may be used as
1056N/Afeedback during font selection.
1056N/AFACE_NAME cannot be calculated or approximated if not provided as a font
1056N/AFULL_NAME is the same as FACE_NAME. Its use is deprecated, but it is found on
1056N/ACOPYRIGHT is a human-understandable string (of type ATOM) that gives the
1056N/Acopyright information of the legal owner of the digital font data.
1056N/AThis information is a required component of a font but is independent of the
1056N/Aparticular format used to represent it (that is, it cannot be captured as a
1056N/Acomment that could later be thrown away for efficiency reasons).
1056N/ACOPYRIGHT cannot be calculated or approximated if not provided as a font
1056N/ANOTICE is a human-understandable string (of type ATOM) that gives the copyright
1056N/Ainformation of the legal owner of the font design or, if not applicable, the
1056N/Atrademark information for the typeface FAMILY_NAME.
1056N/ATypeface design and trademark protection laws vary from country to country, the
1056N/AUSA having no design copyright protection currently while various countries in
1056N/AEurope offer both design and typeface family name trademark protection. As with
1056N/ACOPYRIGHT, this information is a required component of a font but is
1056N/Aindependent of the particular format used to represent it.
1056N/ANOTICE cannot be calculated or approximated if not provided as a font property.
1056N/ADESTINATION is an unsigned integer code (of type CARD32) that gives the font
1056N/Adesign destination, that is, whether it was designed as a screen proofing font
1056N/Ato match printer font glyph widths (WYSIWYG), as an optimal video font
1056N/A(possibly with corresponding printer font) for extended screen viewing (video
1056N/AThe font design considerations are very different, and at current display
1056N/Aresolutions, the readability and legibility of these two kinds of screen fonts
1056N/Aare very different. DESTINATION allows publishing clients that use X to model
1056N/Athe printed page and video text clients, such as on-line documentation
1056N/Abrowsers, to query for X screen fonts that suit their particular requirements.
1276N/A┌────┬────────────┬───────────────────────────────────────────────────────────┐
1276N/A│Code│English │Description │
1276N/A├────┼────────────┼───────────────────────────────────────────────────────────┤
1276N/A│0 │WYSIWYG │The font is optimized to match the typographic design and │
1276N/A│ │ │metrics of an equivalent printer font. │
1276N/A├────┼────────────┼───────────────────────────────────────────────────────────┤
1276N/A│1 │Video text │The font is optimized for screen legibility and │
1276N/A└────┴────────────┴───────────────────────────────────────────────────────────┘
1056N/AFONT_TYPE is a human-understandable string (of type ATOM) that describes the
1056N/Aformat of the font data as they are read from permanent storage by the current
1056N/Afont source. It is a static attribute of the source data. It can be used by
1056N/Aclients to select a type of bitmap or outline font without regard to the
1056N/Arasterizer used to render the font.
1056N/APredefined values are as follows:
1276N/A┌──────────┬──────────────────────────────────────────────────────────────────┐
1276N/A├──────────┼──────────────────────────────────────────────────────────────────┤
1276N/A│ │Hand-tuned bitmap fonts. Some attempt has been made to optimize │
1276N/A│"Bitmap" │the visual appearance of the font for the requested size and │
1276N/A├──────────┼──────────────────────────────────────────────────────────────────┤
1276N/A│ │All bitmap format fonts that cannot be described as "Bitmap", that│
1276N/A│"Prebuilt"│is, handtuned. For example, a bitmap format font that was │
1276N/A│ │generated mechanically using a scalable font rasterizer would be │
1276N/A│ │considered "Prebuilt", not "Bitmap". │
1276N/A├──────────┼──────────────────────────────────────────────────────────────────┤
1276N/A│"Type 1" │Any Type 1 font. │
1276N/A├──────────┼──────────────────────────────────────────────────────────────────┤
1276N/A│"TrueType"│Any TrueType font. │
1276N/A├──────────┼──────────────────────────────────────────────────────────────────┤
1276N/A│"Speedo" │Any Speedo font. │
1276N/A├──────────┼──────────────────────────────────────────────────────────────────┤
1276N/A└──────────┴──────────────────────────────────────────────────────────────────┘
1056N/AOther values may be registered with the X Consortium.
1056N/AFONT_VERSION is a human-understandable string (of type ATOM) that describes the
1056N/Aformal or informal version of the font. None is a valid value.
1056N/ARASTERIZER_NAME is a human-understandable string (of type ATOM) that is the
1056N/Aspecific name of the rasterizer that has performed some rasterization operation
1056N/A(such as scaling from outlines) on this font.
1056N/ATo define a RASTERIZER_NAME, the following format is recommended:
1056N/ARasterizerName OrganizationId Space Rasterizer
1056N/AOrganizationId STRING8—the X Registry ORGANIZATION name of the rasterizer
1056N/A::= implementor or maintainer.
1056N/A the case-sensitive, human-understandable product name of the
1056N/ARasterizer ::= rasterizer. Words within this name should be separated by a
1056N/A X Consortium Type 1 Rasterizer
1056N/A X Consortium Speedo Rasterizer
1056N/AIf RASTERIZER_NAME is not defined, or is None, no rasterization operation has
1056N/Abeen applied to the FONT_TYPE.
1056N/ARASTERIZER_VERSION is a human-understandable string (of type ATOM) that
1056N/Arepresents the formal or informal version of a font rasterizer. The
1056N/ARASTERIZER_VERSION should match the corresponding product version number known
1056N/AFor a font with a transformation matrix, RAW_ASCENT is the font ascent in 1000
1276N/Apixel metrics (see Metrics and Font Properties).
1056N/AFor a font with a transformation matrix, RAW_DESCENT is the font descent in
1276N/A1000 pixel metrics (see Metrics and Font Properties).
1056N/AFor a font with a transformation matrix, all font properties that represent
1056N/Ahorizontal or vertical sizes or displacements will be accompanied by a new
1056N/Aproperty, named as the original except prefixed with "RAW_", that is computed
1276N/Aas described in Metrics and Font Properties.
1056N/AAXIS_NAMES is a list of all the names of the axes for a polymorphic font,
1056N/Aseparated by a null (0) byte. These names are suitable for presentation in a
1056N/Auser interface (see section 6).
1056N/AAXIS_LIMITS is a list of integers, two for each axis, giving the minimum and
1276N/Amaximum allowable values for that axis of a polymorphic font (see Polymorphic
1056N/AAXIS_TYPES is like AXIS_NAMES, but can be registered as having specific
1056N/ABuilt-in Font Property Atoms
1056N/AThe following font property atom definitions were predefined in the initial
1056N/Aversion of the core protocol:
1276N/A┌───────────────────────┬───────────────────┐
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A│UNDERLINE_POSITION │INT32 │
1276N/A├───────────────────────┼───────────────────┤
1276N/A│UNDERLINE_THICKNESS │INT32 │
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A│QUAD_WIDTH │INT32 −^deprecated │
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A│RESOLUTION │CARD32 −^deprecated│
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A│FULL_NAME │ATOM −^deprecated │
1276N/A├───────────────────────┼───────────────────┤
1276N/A├───────────────────────┼───────────────────┤
1276N/A└───────────────────────┴───────────────────┘
1056N/AChapter 4. Matrix Transformations
1056N/AAn XLFD name presented to the server can have the POINT_SIZE or PIXEL_SIZE
1056N/Afield begin with the character "[". If the first character of the field is "[",
1056N/Athe character must be followed with ASCII representations of four floating
1056N/Apoint numbers and a trailing "]", with white space separating the numbers and
1056N/Aoptional white space separating the numbers from the "[" and "]" characters.
1056N/ANumbers use standard floating point syntax but use the character "~" to
1056N/Arepresent a minus sign in the mantissa or exponent.
1056N/AThe BNF for a matrix transformation string is as follows:
1056N/AMatrixString LeftBracket OptionalSpace Float Space Float Space Float Space
1056N/A::= Float OptionalSpace RightBracket
1056N/ASpace ::= SpaceChar | SpaceChar Space
1056N/AFloat ::= Mantissa | Mantissa Exponent
1056N/AMantissa ::= Sign Number | Number
1056N/ANumber ::= Integer | Integer Dot Integer | Dot Integer
1056N/AInteger ::= Digit | Digit Integer
1056N/ADigit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
1056N/AExponent ::= "e" SignedInteger | "E" SignedInteger
1056N/ASignedInteger Sign Integer | Integer
1056N/ALeftBracket OCTET − "[" (LEFT SQUARE BRACKET)
1056N/ARightBracket OCTET − "]" (RIGHT SQUARE BRACKET)
1056N/ASpaceChar ::= OCTET − " " (SPACE)
1056N/ATilde ::= OCTET − "˜" (TILDE)
1056N/ADot ::= OCTET − "." (FULL STOP)
1056N/AThe string "[a b c d]" represents a graphical transformation of the glyphs in
1056N/AAll transformations occur around the origin of the glyph. The relationship
1056N/Abetween the current scalar values and the matrix transformation values is that
1056N/Athe scalar value "N" in the POINT_SIZE field produces the same glyphs as the
1056N/Amatrix "[N/10 0 0 N/10]" in that field, and the scalar value "N" in the
1056N/APIXEL_SIZE field produces the same glyphs as the matrix "[N*RESOLUTION_X/
1056N/ARESOLUTION_Y 0 0 N]" in that field.
1056N/AIf matrices are specified for both the POINT_SIZE and PIXEL_SIZE, they must
1056N/Abear the following relationship to each other within an implementation-specific
1056N/A PIXEL_SIZE_MATRIX = [Sx 0 0 Sy] * POINT_SIZE_MATRIX
1056N/AIf either the POINT_SIZE or PIXEL_SIZE field is unspecified (either "0" or
1056N/Awildcarded), the preceding formulas can be used to compute one from the other.
1056N/AIn this section, the phrase "1000 pixel metrics" means the metrics that would
1056N/Abe obtained if the rasterizer took the base untransformed design used to
1056N/Agenerate the transformed font and scaled it linearly to a height of 1000
1056N/Apixels, with no rotation component. Note that there may be no way for the
1056N/Aapplication to actually request this font since the rasterizer may use
1056N/Adifferent outlines or rasterization techniques at that size from the ones used
1056N/Ato generate the transformed font.
1056N/ANotes on properties and metrics:
1056N/AThe per-char ink metrics (lbearing, rbearing, ascent, and descent) represent
1056N/Athe ink extent of the transformed glyph around its origin.
1056N/AThe per-char width is the x component of the transformed character width.
1056N/AThe font ascent and descent are the y component of the transformed font ascent
1056N/AThe FONT property returns a name reflecting the matrix being used-that is, the
1056N/Aname returned can be used to open another instance of the same font. The
1056N/Areturned name is not necessarily an exact copy of the requested name. If, for
1056N/A -misc-fixed-medium-r-normal--0-[2e1 0 0.0 +10.0]-72-72-c-0-iso8859-1
1056N/Athe resulting FONT property might be
1056N/A -misc-fixed-medium-r-normal--[19.9 0 0 10]-[20 0 0 10]-72-72-c-0-iso8859-1
1056N/AThe FONT property will always include matrices in both the PIXEL_SIZE and the
1056N/ATo allow accurate client positioning of transformed characters, the attributes
1056N/Afield of the XCharInfo contains the width of the character in 1000 pixel
1056N/Ametrics. This attributes field should be interpreted as a signed integer.
1056N/AThere will always be 2 new font properties defined, RAW_ASCENT and RAW_DESCENT,
1056N/Athat hold the ascent and descent in 1000 pixel metrics.
1056N/AAll font properties that represent horizontal widths or displacements have as
1056N/Atheir value the x component of the transformed width or displacement. All font
1056N/Aproperties that represent vertical heights or displacements have as their value
1056N/Athe y component of the transformed height or displacement. Each such property
1056N/Awill be accompanied by a new property, named as the original except prefixed
1056N/Awith "RAW_", that gives the value of the width, height, or displacement in 1000
1056N/AThe XLFD is designed to support scalable fonts. A scalable font is a font
1056N/Asource from which instances of arbitrary size can be derived. A scalable font
1056N/Asource might be one or more outlines together with zero or more hand-tuned
1056N/Abitmap fonts at specific sizes and resolutions, or it might be a programmatic
1056N/Adescription together with zero or more bitmap fonts, or some other format
1056N/A(perhaps even just a single bitmap font).
1056N/AThe following definitions are useful for discussing scalable fonts:
1056N/A A pattern string containing 14 hyphens, one of which is the first character
1056N/A of the pattern. Wildcard characters are permitted in the fields of a
1056N/A A well-formed XLFD pattern containing no wildcards and containing the digit
1056N/A "0" in the PIXEL_SIZE, POINT_SIZE, and AVERAGE_WIDTH fields.
1056N/A The XLFD fields PIXEL_SIZE, POINT_SIZE, RESOLUTION_X, RESOLUTION_Y, and
1056N/A The result of replacing the scalable fields of a font name with values to
1056N/A yield a font name that could actually be produced from the font source. A
1056N/A scaling engine is permitted, but not required, to interpret the scalable
1056N/A fields in font names to support anamorphic scaling.
1056N/A The list of names that would be returned by an X server for a ListFonts
1056N/A protocol request on the pattern "*" if there were no protocol restrictions
1056N/A on the total number of names returned.
1056N/AThe global list consists of font names derived from font sources. If a single
1056N/Afont source can support multiple character sets (specified in the
1056N/ACHARSET_REGISTRY and CHARSET_ENCODING fields), each such character set should
1056N/Abe used to form a separate font name in the list. For a nonscalable font
1056N/Asource, the simple font name for each character set is included in the global
1056N/Alist. For a scalable font source, a scalable font name for each character set
1056N/Ais included in the list. In addition to the scalable font name, specific
1056N/Aderived instance names may also be included in the list. The relative order of
1056N/Aderived instances with respect to the scalable font name is not constrained.
1056N/AFinally, font name aliases may also be included in the list. The relative order
1056N/Aof aliases with respect to the real font name is not constrained.
1056N/AThe values of the RESOLUTION_X and RESOLUTION_Y fields of a scalable font name
1056N/Aare implementation dependent, but to maximize backward compatibility, they
1056N/Ashould be reasonable nonzero values, for example, a resolution close to that
1056N/Aprovided by the screen (in a single-screen server). Because some existing
1056N/Aapplications rely on seeing a collection of point and pixel sizes, server
1056N/Avendors are strongly encouraged in the near term to provide a mechanism for
1056N/Aincluding, for each scalable font name, a set of specific derived instance
1056N/Anames. For font sources that contain a collection of hand-tuned bitmap fonts,
1056N/Aincluding names of these instances in the global list is recommended and
1056N/AThe X protocol request OpenFont on a scalable font name returns a font
1056N/Acorresponding to an implementation-dependent derived instance of that font
1056N/AThe X protocol request ListFonts on a well-formed XLFD pattern returns the
1056N/Afollowing. Starting with the global list, if the actual pattern argument has
1056N/Avalues containing no wildcards in scalable fields, then substitute each such
1056N/Afield into the corresponding field in each scalable font name in the list. For
1056N/Aeach resulting font name, if the remaining scalable fields cannot be replaced
1056N/Awith values to produce a derived instance, remove the font name from the list.
1056N/ANow take the modified list, and perform a simple pattern match against the
1056N/Apattern argument. ListFonts returns the resulting list.
1056N/AFor example, given the global list:
1056N/A-Linotype-Times-Bold-I-Normal--0-0-100-100-P-0-ISO8859-1
1056N/A-Linotype-Times-Bold-R-Normal--0-0-100-100-P-0-ISO8859-1
1056N/A-Linotype-Times-Medium-I-Normal--0-0-100-100-P-0-ISO8859-1
1056N/A-Linotype-Times-Medium-R-Normal--0-0-100-100-P-0-ISO8859-1
1056N/Aa ListFonts request with the pattern:
1056N/A-*-Times-*-R-Normal--*-120-100-100-P-*-ISO8859-1
1056N/A-Linotype-Times-Bold-R-Normal--0-120-100-100-P-0-ISO8859-1
1056N/A-Linotype-Times-Medium-R-Normal--0-120-100-100-P-0-ISO8859-1
1056N/AListFonts on a pattern containing wildcards that is not a well-formed XLFD
1056N/Apattern is only required to return the list obtained by performing a simple
1056N/Apattern match against the global list. X servers are permitted, but not
1056N/Arequired, to use a more sophisticated matching algorithm.
1056N/AChapter 6. Polymorphic Fonts
1056N/AFonts that can be varied in ways other than size or resolution are called
1056N/Apolymorphic fonts. Multiple Master Type 1 font programs are one type of a
1056N/Apolymorphic font. Current examples of axes along which the fonts can be varied
1056N/Aare width, weight, and optical size; others might include formality or
1056N/ATo support polymorphic fonts, special values indicating variability are defined
1056N/Afor the following XLFD fields:
1056N/AThe string "0" is the special polymorphic value. In the WEIGHT_NAME, SLANT, or
1056N/ASETWIDTH_NAME field, "0" must be the entire field. There may be multiple
1056N/Apolymorphic values in the ADD_STYLE_NAME field. They are surrounded by "[" and
1056N/A"]" and separated by a Space, as "[0\00]". The polymorphic values may coexist
1056N/Awith other data in the field. It is recommended that the polymorphic values be
1056N/Aat the end of the ADD_STYLE_NAME field.
1056N/AThe font-matching algorithms for a font with polymorphic fields are identical
1056N/Ato the matching algorithms for a font with scalable fields.
1056N/AThere are three new font properties to describe the axes of variation,
1056N/AAXIS_NAMES, AXIS_LIMITS, and AXIS_TYPES. AXIS_NAMES is a list of all the names
1056N/Aof the axes for the font, separated by a null (0) byte. These names are
1056N/Asuitable for presentation in a user interface. AXIS_LIMITS is a list of
1056N/Aintegers, two for each axis, giving the minimum and maximum allowable values
1056N/Afor that axis. AXIS_TYPES is like AXIS_NAMES, but can be registered as having
1056N/AThe axes are listed in the properties in the same order as they appear in the
1056N/Afont name. They are matched with font name fields by looking for the special
1056N/Apolymorphic values in the font name.
1056N/AThe Adobe Myriad MM font program has width and weight axes. Weight can vary
1056N/Afrom 215 to 830, and width from 300 to 700.
1056N/A -Adobe-Myriad MM-0-R-0--0-0-0-0-P-0-ISO8859-1
1056N/A -Adobe-Myriad MM-412-R-575--*-120-100-100-P-*-ISO8859-1
1056N/AThe Adobe Minion MM Italic font program has width, weight, and optical size
1056N/A -Adobe-Minion MM-0-I-0-[0]-0-0-0-0-P-0-ISO8859-1
1056N/A Weight, Width, Optical size
1056N/A Adobe-Weight, Adobe-Width, Adobe-OpticalSize
1056N/A -Adobe-Minion MM-550-I-480-[18]-*-180-100-100-P-*-ISO8859-1
1056N/AThe Adobe Minion MM Swash Italic font program has the same axes and values.
1056N/AThis shows how "[0]" in the ADD_STYLE_NAME field can coexist with other words.
1056N/A -Adobe-Minion MM-0-I-0-Swash[0]-0-0-0-0-P-0-ISO8859-1
1056N/A Weight, Width, Optical size
1056N/A Adobe-Weight, Adobe-Width, Adobe-OpticalSize
1056N/A -Adobe-Minion MM-550-I-480-Swash[18]-*-180-100-100-P-*-ISO8859-1
1056N/AThe XYZ Abc font, a hypothetical font, has optical size and x-height axes. This
1056N/Ashows how there can be more than one polymorphic value in the ADD_STYLE_NAME
1056N/A -XYZ-Abc-Medium-R-Normal-[0 0]-0-0-0-0-P-0-ISO8859-1
1056N/A XYZ-OpticalSize, XYZ-Xheight
1056N/A -XYZ-Abc-Medium-R-Normal-[14 510]-*-140-100-100-P-*-ISO8859-1
1056N/AIf an axis allows negative values, a client requests a negative value by using
1056N/A"~" (TILDE) as a minus sign.
1056N/AAxis types can be registered with the X Consortium, along with their semantics.
1056N/AIf a font name that contains the polymorphic value or a wildcard in a
1056N/Apolymorphic field is presented to a font source, the font source is free to
1056N/Asubstitute any value that is convenient. However, font sources should try to
1056N/Ause a value that would be considered normal or medium for the particular font.
1056N/AFor example, if an optical size variable is unresolved, the font source should
1056N/Aprovide a value appropriate to the size of the font.
1056N/AThe result of specifying an out-of-range value for a polymorphic field is
1056N/Aundefined. The font source may treat this as a BadName error, treat the value
1056N/Aas if it were the closest legal value, or extrapolate to try to accommodate the
1056N/AChapter 7. Affected Elements of Xlib and the X Protocol
1056N/AThe following X protocol requests must support the XLFD conventions:
1056N/A ● OpenFont - for the name argument
1056N/A ● ListFonts - for the pattern argument
1056N/A ● ListFontsWithInfo - for the pattern argument
1056N/AIn addition, the following Xlib functions must support the XLFD conventions:
1056N/A ● XLoadFont - for the name argument
1056N/A ● XListFontsWithInfo - for the pattern argument
1056N/A ● XLoadQueryFont - for the name argument
1056N/A ● XListFonts - for the pattern argument
1056N/AXLFD Conformance Requirements
1056N/AFONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR
1056N/AThe bitmap font distribution and interchange format adopted by the X Consortium
1056N/A(BDF V2.1) provides a general mechanism for identifying the font name of an X
1056N/Afont and a variable list of font properties, but it does not mandate the syntax
1056N/Aor semantics of the font name or the semantics of the font properties that
1056N/Amight be provided in a BDF font. This section identifies the requirements for
1056N/ABDF fonts that conform to XLFD.
1056N/AXLFD Conformance Requirements
1056N/AA BDF font conforms to the XLFD specification if and only if the following
1056N/A ● The value for the BDF item FONT conforms to the syntax and semantic
1056N/A definition of a XLFD FontName string.
1056N/A ● The FontName begins with the X FontNameRegistry prefix: "-".
1056N/A ● All XLFD FontName fields are defined.
1056N/A ● Any FontProperties provided conform in name and semantics to the XLFD
1056N/AA simple method of testing for conformance would entail verifying that the
1056N/AFontNameRegistry prefix is the string "-", that the number of field delimiters
1056N/Ain the string and coded field values are valid, and that each font property
1056N/Aname either matches a standard XLFD property name or follows the definition of
1056N/AFONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR
1056N/AFONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR are provided in the BDF
1056N/Aspecification as properties that are moved to the XFontStruct by the BDF font
1056N/Acompiler in generating the X server-specific binary font encoding. If present,
1056N/Athese properties shall comply with the following semantic definitions.
1056N/AFONT_ASCENT is an integer value (of type INT32) that gives the recommended
1056N/Atypographic ascent above the baseline for determining interline spacing.
1056N/ASpecific glyphs of the font may extend beyond this. If the current position
1056N/Apoint for line n is at [X,Y], then the origin of the next line m = n + 1
1056N/A(allowing for a possible font change) is [X, Y + FONT_DESCENTn + FONT_ASCENTm].
1056N/AFONT_ASCENT can be approximated if not provided as a font property, according
1056N/Aif (FONT_ASCENT undefined) then
1056N/A FONT_ASCENT = maximum ascent
1056N/Awhere maximum ascent is the maximum ascent (above the baseline) in pixels of
1056N/AFONT_DESCENT is an integer value (of type INT32) that gives the recommended
1056N/Atypographic descent below the baseline for determining interline spacing.
1056N/ASpecific glyphs of the font may extend beyond this. If the current position
1056N/Apoint for line n is at [X,Y], then the origin of the next line m = n+1
1056N/A(allowing for a possible font change) is [X, Y + FONT_DESCENTn + FONT_ASCENTm].
1056N/AThe logical extent of the font is inclusive between the Y-coordinate values: Y
1056N/A- FONT_ASCENT and Y + FONT_DESCENT + 1.
1056N/AFONT_DESCENT can be approximated if not provided as a font property, according
1056N/Aif (FONT_DESCENT undefined) then
1056N/A FONT_DESCENT = maximum descent
1056N/Awhere maximum descent is the maximum descent (below the baseline) in pixels of
1056N/AThe DEFAULT_CHAR is an unsigned integer value (of type CARD32) that specifies
1056N/Athe index of the default character to be used by the X server when an attempt
1056N/Ais made to display an undefined or nonexistent character in the font. (For a
1056N/Afont using a 2-byte matrix format, the index bytes are encoded in the integer
1056N/Aas byte1 * 65536 + byte2.) If the DEFAULT_CHAR itself specifies an undefined or
1056N/Anonexistent character in the font, then no display is performed.
1056N/ADEFAULT_CHAR cannot be approximated if not provided as a font property.