home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August - Disc 2 / chip_20018102_hu.iso / linux / X-4.1.0 / doc / xlfd.txt < prev    next >
Text File  |  2001-06-27  |  91KB  |  2,971 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.        X Logical Font Description Conventions
  17.  
  18.             Version 1.5
  19.  
  20.            X Consortium Standard
  21.  
  22.          X Version 11, Release 6.4
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.             Jim Flowers
  30.            Digital Equipment Corporation
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.         Version 1.5 edited by Stephen Gildea
  38.              X Consortium, Inc.
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83. X Window System is a trademark of X Consortium, Inc.
  84.  
  85. Helvetica and Times are registered trademarks of Linotype Company.
  86.  
  87. ITC Avant Garde Gothic is a registered trademark of International Type-
  88. face Corporation.
  89.  
  90. Times Roman is a registered trademark of Monotype Corporation.
  91.  
  92. Bitstream Amerigo is a registered trademark of Bitstream Inc.
  93.  
  94. Stone is a registered trademark of Adobe Systems Inc.
  95.  
  96. Copyright (C) 1988, 1994 X Consortium
  97.  
  98. Permission is hereby granted, free of charge, to any person obtaining a
  99. copy of this software and associated documentation files (the "Soft-
  100. ware"), to deal in the Software without restriction, including without
  101. limitation the rights to use, copy, modify, merge, publish, distribute,
  102. sublicense, and/or sell copies of the Software, and to permit persons to
  103. whom the Software is furnished to do so, subject to the following condi-
  104. tions:
  105.  
  106. The above copyright notice and this permission notice shall be included
  107. in all copies or substantial portions of the Software.
  108.  
  109. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  110. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
  111. ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
  112. SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
  113. ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  114. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  115. IN THE SOFTWARE.
  116.  
  117. Except as contained in this notice, the name of the X Consortium shall
  118. not be used in advertising or otherwise to promote the sale, use or
  119. other dealings in this Software without prior written authorization from
  120. the X Consortium.
  121.  
  122. Copyright (C) 1988, 1989 Digital Equipment Corporation, Maynard MA.  All
  123. rights reserved.
  124.  
  125. Permission to use, copy, modify, and distribute this documentation for
  126. any purpose and without fee is hereby granted, provided that the above
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. copyright notice and this permission notice appear in all copies.  Digi-
  140. tal Equipment Corporation makes no representations about the suitability
  141. for any purpose of the information in this document.  This documentation
  142. is provided as is without express or implied warranty.
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. 1.  Introduction
  206.  
  207. It is a requirement that X client applications must be portable across
  208. server implementations, with very different file systems, naming conven-
  209. tions, and font libraries.  However, font access requests, as defined by
  210. the X Window System Protocol, neither specify server-independent conven-
  211. tions for font names nor provide adequate font properties for logically
  212. describing typographic fonts.
  213.  
  214. X clients must be able to dynamically determine the fonts available on
  215. any given server so that understandable information can be presented to
  216. the user or so that intelligent font fallbacks can be chosen.  It is
  217. desirable for the most common queries to be accomplished without the
  218. overhead of opening each font and inspecting font properties, by means
  219. of simple ListFonts requests.  For example, if a user selected a Hel-
  220. vetica typeface family, a client application should be able to query the
  221. server for all Helvetica fonts and present only those setwidths,
  222. weights, slants, point sizes, and character sets available for that fam-
  223. ily.
  224.  
  225. This document gives a standard logical font description (hereafter
  226. referred to as XLFD) and the conventions to be used in the core protocol
  227. so that clients can query and access screen type libraries in a consis-
  228. tent manner across all X servers.  In addition to completely specifying
  229. a given font by means of its FontName, the XLFD also provides for a
  230. standard set of key FontProperties that describe the font in more
  231. detail.
  232.  
  233. The XLFD provides an adequate set of typographic font properties, such
  234. as CAP_HEIGHT, X_HEIGHT, and RELATIVE_SETWIDTH, for publishing and other
  235. applications to do intelligent font matching or substitution when han-
  236. dling documents created on some foreign server that use potentially
  237. unknown fonts.    In addition, this information is required by certain
  238. clients to position subscripts automatically and determine small capital
  239. heights, recommended leading, word-space values, and so on.
  240.  
  241. 2.  Requirements and Goals
  242.  
  243. The XLFD meets the short-term and long-term goals to have a standard
  244. logical font description that:
  245.  
  246. o    Provides unique, descriptive font names that support simple pattern
  247.      matching
  248.  
  249. o    Supports multiple font vendors, arbitrary character sets, and
  250.      encodings
  251.  
  252. o    Supports naming and instancing of scalable and polymorphic fonts
  253.  
  254. o    Supports transformations and subsetting of fonts
  255.  
  256. o    Is independent of X server and operating or file system implementa-
  257.      tions
  258.  
  259.  
  260.  
  261.  
  262.                     1
  263.  
  264.  
  265.  
  266.  
  267.  
  268. X Logical Font Description Conventions            X11, Release 6.4
  269.  
  270.  
  271. o    Supports arbitrarily complex font matching or substitution
  272.  
  273. o    Is extensible
  274.  
  275. 2.1.  Provide Unique and Descriptive Font Names
  276.  
  277. It should be possible to have font names that are long enough and
  278. descriptive enough to have a reasonable probability of being unique
  279. without inventing a new registration organization.  Resolution and size-
  280. dependent font masters, multivendor font libraries, and so on must be
  281. anticipated and handled by the font name alone.
  282.  
  283. The name itself should be structured to be amenable to simple pattern
  284. matching and parsing, thus allowing X clients to restrict font queries
  285. to some subset of all possible fonts in the server.
  286.  
  287. 2.2.  Support Multiple Font Vendors and Character Sets
  288.  
  289. The font name and properties should distinguish between fonts that were
  290. supplied by different font vendors but that possibly share the same
  291. name.  We anticipate a highly competitive font market where users will
  292. be able to buy fonts from many sources according to their particular
  293. requirements.
  294.  
  295. A number of font vendors deliver each font with all glyphs designed for
  296. that font, where charset mappings are defined by encoding vectors.  Some
  297. server implementations may force these mappings to proprietary or stan-
  298. dard charsets statically in the font data.  Others may desire to perform
  299. the mapping dynamically in the server.    Provisions must be made in the
  300. font name that allows a font request to specify or identify specific
  301. charset mappings in server environments where multiple charsets are sup-
  302. ported.
  303.  
  304. 2.3.  Support Scalable and Polymorphic Fonts
  305.  
  306. If a font source can be scaled to an arbitrary size or varied in other
  307. ways, it should be possible for an application to determine that fact
  308. from the font name, and the application should be able to construct a
  309. font name for any specific instance.
  310.  
  311. 2.4.  Support Transformations and Subsetting of Fonts
  312.  
  313. Arbitrary two-dimensional linear transformations of fonts should be able
  314. to be requested by applications.  Since such transformed fonts may be
  315. used for special effects requiring a few characters from each of many
  316. differently transformed fonts, it should be possible to request only a
  317. few characters from a font for efficiency.
  318.  
  319. 2.5.  Be Independent of X Server and Operating or File System Implemen-
  320. tations
  321.  
  322. X client applications that require a particular font should be able to
  323. use the descriptive name without knowledge of the file system or other
  324. repository in use by the server.  However, it should be possible for
  325.  
  326.  
  327.  
  328.                     2
  329.  
  330.  
  331.  
  332.  
  333.  
  334. X Logical Font Description Conventions            X11, Release 6.4
  335.  
  336.  
  337. servers to translate a given font name into a file name syntax that it
  338. knows how to deal with, without compromising the uniqueness of the font
  339. name.  This algorithm should be reversible (exactly how this translation
  340. is done is implementation dependent).
  341.  
  342. 2.6.  Support Arbitrarily Complex Font Matching and Substitution
  343.  
  344. In addition to the font name, the XLFD should define a standard list of
  345. descriptive font properties, with agreed-upon fallbacks for all fonts.
  346. This allows client applications to derive font-specific formatting or
  347. display data and to perform font matching or substitution when asked to
  348. handle potentially unknown fonts, as required.
  349.  
  350. 2.7.  Be Extensible
  351.  
  352. The XLFD must be extensible so that new and/or private descriptive font
  353. properties can be added to conforming fonts without making existing X
  354. client or server implementations obsolete.
  355.  
  356. 3.  X Logical Font Description
  357.  
  358. XLFD is divided into two basic components: the FontName, which gives all
  359. font information needed to uniquely identify a font in X protocol
  360. requests (for example, OpenFont, ListFonts, and so on) and a variable
  361. list of optional FontProperties, which describe a font in more detail.
  362.  
  363. The FontName is used in font queries and is returned as data in certain
  364. X protocol requests.  It is also specified as the data value for the
  365. FONT item in the X Consortium Character Bitmap Distribution Format Stan-
  366. dard (BDF V2.1).
  367.  
  368. The FontProperties are supplied on a font-by-font basis and are returned
  369. as data in certain X protocol requests as part of the XFontStruct data
  370. structure.  The names and associated data values for each of the Font-
  371. Properties may also appear as items of the STARTPROPERTIES...ENDPROPER-
  372. TIES list in the BDF V2.1 specification.
  373.  
  374. 3.1.  FontName
  375.  
  376. Each FontName is logically composed of two strings: a FontNameRegistry
  377. prefix that is followed by a FontNameSuffix.  The FontName uses the ISO
  378. 8859-1 encoding.  The FontNameRegistry is an x-registered-name (a name
  379. that has been registered with the X Consortium) that identifies the reg-
  380. istration authority that owns the specified FontNameSuffix syntax and
  381. semantics.
  382.  
  383. All font names that conform to this specification are to use a Font-
  384. NameRegistry prefix, which is defined to be the string "-" (HYPHEN).
  385. All FontNameRegistry prefixes of the form: +version-, where the speci-
  386. fied version indicates some future XLFD specification, are reserved by
  387. the X Consortium for future extensions to XLFD font names.  If required,
  388. extensions to the current XLFD font name shall be constructed by append-
  389. ing new fields to the current structure, each delimited by the existing
  390. field delimiter.  The availability of other FontNameRegistry prefixes or
  391.  
  392.  
  393.  
  394.                     3
  395.  
  396.  
  397.  
  398.  
  399.  
  400. X Logical Font Description Conventions            X11, Release 6.4
  401.  
  402.  
  403. fonts that support other registries is server implementation dependent.
  404.  
  405. In the X protocol specification, the FontName is required to be a
  406. string; hence, numeric field values are represented in the name as
  407. string equivalents.  All FontNameSuffix fields are also defined as
  408. FontProperties; numeric property values are represented as signed or
  409. unsigned integers, as appropriate.
  410.  
  411. 3.1.1.    FontName Syntax
  412.  
  413. The FontName is a structured, parsable string (of type STRING8) whose
  414. Backus-Naur Form syntax description is as follows:
  415.  
  416.       FontName ::=     XFontNameRegistry XFontNameSuffix |
  417.              PrivFontNameRegistry PrivFontNameSuf-
  418.              fix
  419.  XFontNameRegistry ::=     XFNDelim | XFNExtPrefix Version XFN-
  420.              Delim
  421.    XFontNameSuffix ::=     FOUNDRY XFNDelim FAMILY_NAME XFNDelim
  422.              WEIGHT_NAME XFNDelim SLANT XFNDelim
  423.              SETWIDTH_NAME XFNDelim ADD_
  424.              STYLE_NAME XFNDelim PIXEL_SIZE XFNDe-
  425.              lim POINT_SIZE XFNDelim RESOLUTION_X
  426.              XFNDelim RESOLUTION_Y XFNDelim SPAC-
  427.              ING XFNDelim AVERAGE_WIDTH XFNDelim
  428.              CHARSET_REGISTRY XFNDelim
  429.              CHARSET_ENCODING
  430.        Version ::=     STRING8 - the XLFD version that
  431.              defines an extension to the font name
  432.              syntax (for example, "1.4")
  433.       XFNExtPrefix ::=     OCTET - "+" (PLUS)
  434.       XFNDelim ::=     OCTET - "-" (HYPHEN)
  435.   PrivFontNameRegistry     STRING8 - other than those strings
  436.   ::=             reserved by XLFD
  437. PrivFontNameSuffix ::=     STRING8
  438.  
  439.  
  440. Field values are constructed as strings of ISO 8859-1 graphic charac-
  441. ters, excluding the following:
  442.  
  443. o    "-" (HYPHEN), the XLFD font name delimiter character
  444.  
  445. o    "?" (QUESTION MARK) and "*" (ASTERISK), the X protocol font name
  446.      wildcard characters
  447.  
  448. o    "," (COMMA), used by Xlib to separate XLFD font names in a font
  449.      set.
  450.  
  451. o    """ (QUOTATION MARK), used by some commercial products to quote a
  452.      font name.
  453.  
  454. Alphabetic case distinctions are allowed but are for human readability
  455. concerns only.    Conforming X servers will perform matching on font name
  456. query or open requests independent of case.  The entire font name string
  457.  
  458.  
  459.  
  460.                     4
  461.  
  462.  
  463.  
  464.  
  465.  
  466. X Logical Font Description Conventions            X11, Release 6.4
  467.  
  468.  
  469. must have no more than 255 characters.    It is recommended that clients
  470. construct font name query patterns by explicitly including all field
  471. delimiters to avoid unexpected results.  Note that SPACE is a valid
  472. character of a FontName field; for example, the string "ITC Avant Garde
  473. Gothic" might be a FAMILY_NAME.
  474.  
  475. 3.1.2.    FontName Field Definitions
  476.  
  477. This section discusses the FontName:
  478.  
  479. o    FOUNDRY field
  480.  
  481. o    FAMILY_NAME field
  482.  
  483. o    WEIGHT_NAME field
  484.  
  485. o    SLANT field
  486.  
  487. o    SETWIDTH_NAME field
  488.  
  489. o    ADD_STYLE_NAME field
  490.  
  491. o    PIXEL_SIZE field
  492.  
  493. o    POINT_SIZE field
  494.  
  495. o    RESOLUTION_X and RESOLUTION_Y fields
  496.  
  497. o    SPACING field
  498.  
  499. o    AVERAGE_WIDTH field
  500.  
  501. o    CHARSET_REGISTRY and CHARSET_ENCODING fields
  502.  
  503. 3.1.2.1.  FOUNDRY Field
  504.  
  505. FOUNDRY is an x-registered-name, the name or identifier of the digital
  506. type foundry that digitized and supplied the font data, or if different,
  507. the identifier of the organization that last modified the font shape or
  508. metric information.
  509.  
  510. The reason this distinction is necessary is that a given font design may
  511. be licensed from one source (for example, ITC) but digitized and sold by
  512. any number of different type suppliers.  Each digital version of the
  513. original design, in general, will be somewhat different in metrics and
  514. shape from the idealized original font data, because each font foundry,
  515. for better or for worse, has its own standards and practices for tweak-
  516. ing a typeface for a particular generation of output technologies or has
  517. its own perception of market needs.
  518.  
  519. It is up to the type supplier to register with the X Consortium a suit-
  520. able name for this FontName field according to the registration proce-
  521. dures defined by the Consortium.
  522.  
  523.  
  524.  
  525.  
  526.                     5
  527.  
  528.  
  529.  
  530.  
  531.  
  532. X Logical Font Description Conventions            X11, Release 6.4
  533.  
  534.  
  535. The X Consortium shall define procedures for registering foundry and
  536. other names and shall maintain and publish, as part of its public dis-
  537. tribution, a registry of such registered names for use in XLFD font
  538. names and properties.
  539.  
  540.  
  541. 3.1.2.2.  FAMILY_NAME Field
  542.  
  543. FAMILY_NAME is a string that identifies the range or family of typeface
  544. designs that are all variations of one basic typographic style.  This
  545. must be spelled out in full, with words separated by spaces, as
  546. required.  This name must be human-understandable and suitable for pre-
  547. sentation to a font user to identify the typeface family.
  548.  
  549. It is up to the type supplier to supply and maintain a suitable string
  550. for this field and font property, to secure the proper legal title to a
  551. given name, and to guard against the infringement of other's copyrights
  552. or trademarks.    By convention, FAMILY_NAME is not translated.  FAM-
  553. ILY_NAME may include an indication of design ownership if considered a
  554. valid part of the typeface family name.
  555.  
  556. The following are examples of FAMILY_NAME:
  557.  
  558. o    Helvetica
  559.  
  560. o    ITC Avant Garde Gothic
  561.  
  562. o    Times
  563.  
  564. o    Times Roman
  565.  
  566. o    Bitstream Amerigo
  567.  
  568. o    Stone
  569.  
  570. 3.1.2.3.  WEIGHT_NAME Field
  571.  
  572. WEIGHT_NAME is a string that identifies the font's typographic weight,
  573. that is, the nominal blackness of the font, according to the FOUNDRY's
  574. judgment.  This name must be human-understandable and suitable for pre-
  575. sentation to a font user.  The value "0" is used to indicate a polymor-
  576. phic font (see section 6).
  577.  
  578. The interpretation of this field is somewhat problematic because the
  579. typographic judgment of weight has traditionally depended on the overall
  580. design of the typeface family in question; that is, it is possible that
  581. the DemiBold weight of one font could be almost equivalent in typo-
  582. graphic feel to a Bold font from another family.
  583.  
  584. WEIGHT_NAME is captured as an arbitrary string because it is an impor-
  585. tant part of a font's complete human-understandable name.  However, it
  586. should not be used for font matching or substitution.  For this purpose,
  587. X client applications should use the weight-related font properties
  588. (RELATIVE_WEIGHT and WEIGHT) that give the coded relative weight and the
  589.  
  590.  
  591.  
  592.                     6
  593.  
  594.  
  595.  
  596.  
  597.  
  598. X Logical Font Description Conventions            X11, Release 6.4
  599.  
  600.  
  601. calculated weight, respectively.
  602.  
  603. 3.1.2.4.  SLANT Field
  604.  
  605. SLANT is a code-string that indicates the overall posture of the type-
  606. face design used in the font.  The encoding is as follows:
  607.  
  608. ---------------------------------------------------------------------------
  609. Code      English Translation    Description
  610. ---------------------------------------------------------------------------
  611. "R"      Roman         Upright design
  612. "I"      Italic        Italic design, slanted clockwise from the
  613.                 vertical
  614. "O"      Oblique        Obliqued upright design, slanted clockwise
  615.                 from the vertical
  616. "RI"      Reverse Italic    Italic design, slanted counterclockwise
  617.                 from the vertical
  618. "RO"      Reverse Oblique    Obliqued upright design, slanted counter-
  619.                 clockwise from the vertical
  620. "OT"      Other         Other
  621. numeric   Polymorphic        See section 6 on polymorphic font support.
  622. ---------------------------------------------------------------------------
  623.  
  624.  
  625. The SLANT codes are for programming convenience only and usually are
  626. converted into their equivalent human-understandable form before being
  627. presented to a user.
  628.  
  629. 3.1.2.5.  SETWIDTH_NAME Field
  630.  
  631. SETWIDTH_NAME is a string that gives the font's typographic proportion-
  632. ate width, that is, the nominal width per horizontal unit of the font,
  633. according to the FOUNDRY's judgment.  The value "0" is used to indicate
  634. a polymorphic font (see section 6).
  635.  
  636. As with WEIGHT_NAME, the interpretation of this field or font property
  637. is somewhat problematic, because the designer's judgment of setwidth has
  638. traditionally depended on the overall design of the typeface family in
  639. question.  For purposes of font matching or substitution, X client
  640. applications should either use the RELATIVE_SETWIDTH font property that
  641. gives the relative coded proportionate width or calculate the propor-
  642. tionate width.
  643.  
  644. The following are examples of SETWIDTH_NAME:
  645.  
  646. o    Normal
  647.  
  648. o    Condensed
  649.  
  650. o    Narrow
  651.  
  652. o    Double Wide
  653.  
  654.  
  655.  
  656.  
  657.  
  658.                     7
  659.  
  660.  
  661.  
  662.  
  663.  
  664. X Logical Font Description Conventions            X11, Release 6.4
  665.  
  666.  
  667. 3.1.2.6.  ADD_STYLE_NAME Field
  668.  
  669. ADD_STYLE_NAME is a string that identifies additional typographic style
  670. information that is not captured by other fields but is needed to iden-
  671. tify the particular font.  The character "[" anywhere in the field is
  672. used to indicate a polymorphic font (see section 6).
  673.  
  674. ADD_STYLE_NAME is not a typeface classification field and is only used
  675. for uniqueness.  Its use, as such, is not limited to typographic style
  676. distinctions.
  677.  
  678. The following are examples of ADD_STYLE_NAME:
  679.  
  680. o    Serif
  681.  
  682. o    Sans Serif
  683.  
  684. o    Informal
  685.  
  686. o    Decorated
  687.  
  688. 3.1.2.7.  PIXEL_SIZE Field
  689.  
  690. PIXEL_SIZE gives the body size of the font at a particular POINT_SIZE
  691. and RESOLUTION_Y.  PIXEL_SIZE is either an integer-string or a string
  692. beginning with "[".  A string beginning with "[" represents a matrix
  693. (see section 4).  PIXEL_SIZE usually incorporates additional vertical
  694. spacing that is considered part of the font design.  (Note, however,
  695. that this value is not necessarily equivalent to the height of the font
  696. bounding box.)    Zero is used to indicate a scalable font (see section
  697. 5).
  698.  
  699. PIXEL_SIZE usually is used by X client applications that need to query
  700. fonts according to device-dependent size, regardless of the point size
  701. or vertical resolution for which the font was designed.
  702.  
  703. 3.1.2.8.  POINT_SIZE Field
  704.  
  705. POINT_SIZE gives the body size for which the font was designed.
  706. POINT_SIZE is either an integer-string or a string beginning with "[".
  707. A string beginning with "[" represents a matrix (see section 4).  This
  708. field usually incorporates additional vertical spacing that is consid-
  709. ered part of the font design.  (Note, however, that POINT_SIZE is not
  710. necessarily equivalent to the height of the font bounding box.)
  711. POINT_SIZE is expressed in decipoints (where points are as defined in
  712. the X protocol or 72.27 points equal 1 inch).  Zero is used to indicate
  713. a scalable font (see section 5).
  714.  
  715. POINT_SIZE and RESOLUTION_Y are used by X clients to query fonts accord-
  716. ing to device-independent size to maintain constant text size on the
  717. display regardless of the PIXEL_SIZE used for the font.
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.                     8
  725.  
  726.  
  727.  
  728.  
  729.  
  730. X Logical Font Description Conventions            X11, Release 6.4
  731.  
  732.  
  733. 3.1.2.9.  RESOLUTION_X and RESOLUTION_Y Fields
  734.  
  735. RESOLUTION_X and RESOLUTION_Y are unsigned integer-strings that give the
  736. horizontal and vertical resolution, measured in pixels or dots per inch
  737. (dpi), for which the font was designed.  Zero is used to indicate a
  738. scalable font (see section 5).    Horizontal and vertical values are
  739. required because a separate bitmap font must be designed for displays
  740. with very different aspect ratios (for example, 1:1, 4:3, 2:1, and so
  741. on).
  742.  
  743. The separation of pixel or point size and resolution is necessary
  744. because X allows for servers with very different video characteristics
  745. (for example, horizontal and vertical resolution, screen and pixel size,
  746. pixel shape, and so on) to potentially access the same font library.
  747. The font name, for example, must differentiate between a 14-point font
  748. designed for 75 dpi (body size of about 14 pixels) or a 14-point font
  749. designed for 150 dpi (body size of about 28 pixels).  Further, in
  750. servers that implement some or all fonts as continuously scaled and
  751. scan-converted outlines, POINT_SIZE and RESOLUTION_Y will help the
  752. server to differentiate between potentially separate font masters for
  753. text, title, and display sizes or for other typographic considerations.
  754.  
  755. 3.1.2.10.  SPACING Field
  756.  
  757. SPACING is a code-string that indicates the escapement class of the
  758. font, that is, monospace (fixed pitch), proportional (variable pitch),
  759. or charcell (a special monospaced font that conforms to the traditional
  760. data-processing character cell font model).  The encoding is as follows:
  761.  
  762. ------------------------------------------------------------------
  763. Code    English Translation   Description
  764. ------------------------------------------------------------------
  765. "P"    Proportional          A font whose logical character
  766.                   widths vary for each glyph.  Note
  767.                   that no other restrictions are
  768.                   placed on the metrics of a propor-
  769.                   tional font.
  770. "M"    Monospaced          A font whose logical character
  771.                   widths are constant (that is, every
  772.                   glyph in the font has the same log-
  773.                   ical width).  No other restrictions
  774.                   are placed on the metrics of a
  775.                   monospaced font.
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.                     9
  791.  
  792.  
  793.  
  794.  
  795.  
  796. X Logical Font Description Conventions            X11, Release 6.4
  797.  
  798.  
  799. ------------------------------------------------------------------
  800. Code    English Translation   Description
  801. ------------------------------------------------------------------
  802. "C"    CharCell          A monospaced font that follows the
  803.                   standard typewriter character cell
  804.                   model (that is, the glyphs of the
  805.                   font can be modeled by X clients as
  806.                   "boxes" of the same width and
  807.                   height that are imaged side-by-side
  808.                   to form text strings or top-to-bot-
  809.                   tom to form text lines).    By defi-
  810.                   nition, all glyphs have the same
  811.                   logical character width, and no
  812.                   glyphs have "ink" outside of the
  813.                   character cell.  There is no kern-
  814.                   ing (that is, on a per-character
  815.                   basis with positive metrics: 0 <=
  816.                   left-bearing <= right-bearing <=
  817.                   width; with negative metrics: width
  818.                   <= left-bearing <= right-bearing <=
  819.                   zero).  Also, the vertical extents
  820.                   of the font do not exceed the ver-
  821.                   tical spacing (that is, on a per-
  822.                   character basis: ascent <= font-
  823.                   ascent and descent <= font-
  824.                   descent).  The cell height = font-
  825.                   descent + font-ascent, and the
  826.                   width = AVERAGE_WIDTH.
  827. ------------------------------------------------------------------
  828.  
  829.  
  830. 3.1.2.11.  AVERAGE_WIDTH Field
  831.  
  832. AVERAGE_WIDTH is an integer-string typographic metric value that gives
  833. the unweighted arithmetic mean of the absolute value of the width of
  834. each glyph in the font (measured in tenths of pixels), multiplied by -1
  835. if the dominant writing direction for the font is right-to-left.  A
  836. leading "~" (TILDE) indicates a negative value.  For monospaced and
  837. character cell fonts, this is the width of all glyphs in the font.  Zero
  838. is used to indicate a scalable font (see section 5).
  839.  
  840. 3.1.2.12.  CHARSET_REGISTRY and CHARSET_ENCODING Fields
  841.  
  842. The character set used to encode the glyphs of the font (and implicitly
  843. the font's glyph repertoire), as maintained by the X Consortium charac-
  844. ter set registry.  CHARSET_REGISTRY is an x-registered-name that identi-
  845. fies the registration authority that owns the specified encoding.
  846. CHARSET_ENCODING is a registered name that identifies the coded charac-
  847. ter set as defined by that registration authority and, optionally, a
  848. subsetting hint.
  849.  
  850. Although the X protocol does not explicitly have any knowledge about
  851. character set encodings, it is expected that server implementors will
  852. prefer to embed knowledge of certain proprietary or standard charsets
  853.  
  854.  
  855.  
  856.                    10
  857.  
  858.  
  859.  
  860.  
  861.  
  862. X Logical Font Description Conventions            X11, Release 6.4
  863.  
  864.  
  865. into their font library for reasons of performance and convenience.  The
  866. CHARSET_REGISTRY and CHARSET_ENCODING fields or properties allow an X
  867. client font request to specify a specific charset mapping in server
  868. environments where multiple charsets are supported.  The availability of
  869. any particular character set is font and server implementation depen-
  870. dent.
  871.  
  872. To prevent collisions when defining character set names, it is recom-
  873. mended that CHARSET_REGISTRY and CHARSET_ENCODING name pairs be con-
  874. structed according to the following conventions:
  875.  
  876.     CharsetRegistry ::=   StdCharsetRegistryName | PrivCharsetReg-
  877.                   istryName
  878.     CharsetEncoding ::=   StdCharsetEncodingName | PrivCharsetEn-
  879.                   codingName
  880.  StdCharsetRegistryName ::=   StdOrganizationId StdNumber | StdOrgani-
  881.                   zationId StdNumber Dot Year
  882. PrivCharsetRegistryName ::=   OrganizationId STRING8
  883.  StdCharsetEncodingName ::=   STRING8-numeric part number of refer-
  884.                   enced standard
  885. PrivCharsetEncodingName ::=   STRING8
  886.       StdOrganizationId ::=   STRING8-the registered name or acronym
  887.                   of the referenced standard organization
  888.           StdNumber ::=   STRING8-referenced standard number
  889.      OrganizationId ::=   STRING8-the registered name or acronym
  890.                   of the organization
  891.             Dot ::=   OCTET-"." (FULL STOP)
  892.            Year ::=   STRING8-numeric year (for example, 1989)
  893.  
  894.  
  895. The X Consortium shall maintain and publish a registry of such character
  896. set names for use in X protocol font names and properties as specified
  897. in XLFD.
  898.  
  899. The ISO Latin-1 character set shall be registered by the X Consortium as
  900. the CHARSET_REGISTRY-CHARSET_ENCODING value pair: "ISO8859-1".
  901.  
  902. If the CHARSET_ENCODING contains a "[" (LEFT SQUARE BRACKET), the "["
  903. and the characters after it up to a "]" (RIGHT SQUARE BRACKET) are a
  904. subsetting hint telling the font source that the client is interested
  905. only in a subset of the characters of the font.  The font source can,
  906. optionally, return a font that contains only those characters or any
  907. superset of those characters.  The client can expect to obtain valid
  908. glyphs and metrics only for those characters, and not for any other
  909. characters in the font.  The font properties may optionally be calcu-
  910. lated by considering only the characters in the subset.
  911.  
  912. The BNF for the subsetting hint is
  913.  
  914.       Subset ::=   LeftBracket RangeList RightBracket
  915.    RangeList ::=   Range | Range Space RangeList
  916.        Range ::=   Number | Number Underscore Number
  917.       Number ::=   "0x" HexNumber | DecNumber
  918.  
  919.  
  920.  
  921.  
  922.                    11
  923.  
  924.  
  925.  
  926.  
  927.  
  928. X Logical Font Description Conventions            X11, Release 6.4
  929.  
  930.  
  931.    HexNumber ::=   HexDigit | HexDigit HexNumber
  932.    DecNumber ::=   DecDigit | DecDigit DecNumber
  933.     DecDigit ::=   "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
  934.     HexDigit ::=   DecDigit | "a" | "b" | "c" | "d" | "e" | "f"
  935.  LeftBracket ::=   "[" (LEFT SQUARE BRACKET)
  936. RightBracket ::=   "]" (RIGHT SQUARE BRACKET)
  937.        Space ::=   " " (SPACE)
  938.   Underscore ::=   "_" (LOW LINE)
  939.  
  940.  
  941. Each Range specifies characters that are to be part of the subset
  942. included in the font.  A Range containing two Numbers specifies the
  943. first and last character, inclusively, of a range of characters.  A
  944. Range that is a single Number specifies a single character to be
  945. included in the font.  A HexNumber is interpreted as a hexadecimal num-
  946. ber.  A DecNumber is interpreted as a decimal number.  The font consists
  947. of the union of all the Ranges in the RangeList.
  948.  
  949. For example,
  950.      -misc-fixed-medium-r-normal--0-0-0-0-c-0-iso8859-1[65 70 80_90]
  951. tells the font source that the client is interested only in characters
  952. 65, 70, and 80-90.
  953.  
  954. 3.1.3.    Examples
  955.  
  956. The following examples of font names are derived from the screen fonts
  957. shipped with the X Consortium distribution.
  958.  
  959. ------------------------------------------------------------------------------
  960. Font         X FontName
  961. ------------------------------------------------------------------------------
  962. 75-dpi Fonts
  963. Charter 12 pt     -Bitstream-Charter-Medium-R-Nor-
  964.          mal--12-120-75-75-P-68-ISO8859-1
  965. Charter Bold     -Bitstream-Charter-Bold-R-Nor-
  966. 12 pt         mal--12-120-75-75-P-76-ISO8859-1
  967. Charter Bold     -Bitstream-Charter-Bold-I-Nor-
  968. Italic 12 pt     mal--12-120-75-75-P-75-ISO8859-1
  969. Charter Italic     -Bitstream-Charter-Medium-I-Nor-
  970. 12 pt         mal--12-120-75-75-P-66-ISO8859-1
  971. Courier 8 pt     -Adobe-Courier-Medium-R-Normal--8-80-75-75-M-50-ISO8859-1
  972. Courier 10 pt     -Adobe-Courier-Medium-R-Normal--10-100-75-75-M-60-ISO8859-1
  973. Courier 12 pt     -Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO8859-1
  974. Courier 24 pt     -Adobe-Courier-Medium-R-Normal--24-240-75-75-M-150-ISO8859-1
  975. Courier Bold     -Adobe-Courier-Bold-R-Normal--10-100-75-75-M-60-ISO8859-1
  976. 10 pt
  977. Courier Bold     -Adobe-Courier-Bold-O-Normal--10-100-75-75-M-60-ISO8859-1
  978. Oblique 10 pt
  979. Courier      -Adobe-Courier-Medium-O-Normal--10-100-75-75-M-60-ISO8859-1
  980. Oblique 10 pt
  981. 100-dpi Fonts
  982. Symbol 10 pt     -Adobe-Symbol-Medium-R-Normal--14-100-100-100-P-85-Adobe-
  983.          FONTSPECIFIC
  984.  
  985.  
  986.  
  987.  
  988.                    12
  989.  
  990.  
  991.  
  992.  
  993.  
  994. X Logical Font Description Conventions            X11, Release 6.4
  995.  
  996.  
  997. ------------------------------------------------------------------------------
  998. Font         X FontName
  999. ------------------------------------------------------------------------------
  1000. Symbol 14 pt     -Adobe-Symbol-Medium-R-Normal--20-140-100-100-P-107-Adobe-
  1001.          FONTSPECIFIC
  1002. Symbol 18 pt     -Adobe-Symbol-Medium-R-Normal--25-180-100-100-P-142-Adobe-
  1003.          FONTSPECIFIC
  1004. Symbol 24 pt     -Adobe-Symbol-Medium-R-Normal--34-240-100-100-P-191-Adobe-
  1005.          FONTSPECIFIC
  1006. Times Bold 10     -Adobe-Times-Bold-R-Normal--14-100-100-100-P-76-ISO8859-1
  1007. pt
  1008. Times Bold     -Adobe-Times-Bold-I-Normal--14-100-100-100-P-77-ISO8859-1
  1009. Italic 10 pt
  1010. Times Italic     -Adobe-Times-Medium-I-Normal--14-100-100-100-P-73-ISO8859-1
  1011. 10 pt
  1012. Times Roman 10     -Adobe-Times-Medium-R-Normal--14-100-100-100-P-74-ISO8859-1
  1013. pt
  1014. ------------------------------------------------------------------------------
  1015.  
  1016.  
  1017. 3.2.  Font Properties
  1018.  
  1019. All font properties are optional but will generally include the font
  1020. name fields and, on a font-by-font basis, any other useful font descrip-
  1021. tive and use information that may be required to use the font intelli-
  1022. gently.  The XLFD specifies an extensive set of standard X font proper-
  1023. ties, their interpretation, and fallback rules when the property is not
  1024. defined for a given font.  The goal is to provide client applications
  1025. with enough font information to be able to make automatic formatting and
  1026. display decisions with good typographic results.
  1027.  
  1028. Font property names use the ISO 8859-1 encoding.
  1029.  
  1030. Additional standard X font property definitions may be defined in the
  1031. future and private properties may exist in X fonts at any time.  Private
  1032. font properties should be defined to conform to the general mechanism
  1033. defined in the X protocol to prevent overlap of name space and ambiguous
  1034. property names, that is, private font property names are of the form:
  1035. "_" (LOW LINE), followed by the organizational identifier, followed by
  1036. "_" (LOW LINE), and terminated with the property name.
  1037.  
  1038. The Backus-Naur Form syntax description of X font properties is as fol-
  1039. lows:
  1040.  
  1041.      Properties ::=   OptFontPropList
  1042. OptFontPropList ::=   NULL | OptFontProp OptFontPropList
  1043.     OptFontProp ::=   PrivateFontProp | XFontProp
  1044. PrivateFontProp ::=   STRING8 | Underscore OrganizationId
  1045.               Underscore STRING8
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.                    13
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. X Logical Font Description Conventions            X11, Release 6.4
  1061.  
  1062.  
  1063.       XFontProp ::=   FOUNDRY | FAMILY_NAME | WEIGHT_NAME |
  1064.               SLANT | SETWIDTH_NAME |
  1065.               ADD_STYLE_NAME | PIXEL_SIZE |
  1066.               POINT_SIZE | RESOLUTION_X | RESOLU-
  1067.               TION_Y | SPACING | AVERAGE_WIDTH |
  1068.               CHARSET_REGISTRY | CHARSET_ENCODING |
  1069.               QUAD_WIDTH | RESOLUTION | MIN_SPACE |
  1070.               NORM_SPACE | MAX_SPACE | END_SPACE |
  1071.               SUPERSCRIPT_X | SUPERSCRIPT_Y | SUB-
  1072.               SCRIPT_X | SUBSCRIPT_Y | UNDER-
  1073.               LINE_POSITION | UNDERLINE_THICKNESS |
  1074.               STRIKEOUT_ASCENT | STRIKEOUT_DESCENT
  1075.               | ITALIC_ANGLE | X_HEIGHT | WEIGHT |
  1076.               FACE_NAME | FULL_NAME | FONT | COPY-
  1077.               RIGHT | AVG_CAPITAL_WIDTH | AVG_LOW-
  1078.               ERCASE_WIDTH | RELATIVE_SETWIDTH |
  1079.               RELATIVE_WEIGHT | CAP_HEIGHT | SUPER-
  1080.               SCRIPT_ SIZE | FIGURE_WIDTH | SUB-
  1081.               SCRIPT_SIZE | SMALL_CAP_SIZE | NOTICE
  1082.               | DESTINATION | FONT_TYPE | FONT_VER-
  1083.               SION | RASTERIZER_NAME | RASTER-
  1084.               IZER_VERSION | RAW_ASCENT |
  1085.               RAW_DESCENT | RAW_* | AXIS_NAMES |
  1086.               AXIS_LIMITS | AXIS_TYPES
  1087.      Underscore ::=   OCTET-"_" (LOW LINE)
  1088.  OrganizationId ::=   STRING8-the registered name of the
  1089.               organization
  1090.  
  1091.  
  1092. 3.2.1.    FOUNDRY
  1093.  
  1094. FOUNDRY is as defined in the FontName except that the property type is
  1095. ATOM.
  1096.  
  1097. FOUNDRY cannot be calculated or defaulted if not supplied as a font
  1098. property.
  1099.  
  1100. 3.2.2.    FAMILY_NAME
  1101.  
  1102. FAMILY_NAME is as defined in the FontName except that the property type
  1103. is ATOM.
  1104.  
  1105. FAMILY_NAME cannot be calculated or defaulted if not supplied as a font
  1106. property.
  1107.  
  1108. 3.2.3.    WEIGHT_NAME
  1109.  
  1110. WEIGHT_NAME is as defined in the FontName except that the property type
  1111. is ATOM.
  1112.  
  1113. WEIGHT_NAME can be defaulted if not supplied as a font property, as fol-
  1114. lows:
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.                    14
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. X Logical Font Description Conventions            X11, Release 6.4
  1127.  
  1128.  
  1129.      if (WEIGHT_NAME undefined) then
  1130.     WEIGHT_NAME = ATOM("Medium")
  1131.  
  1132.  
  1133. 3.2.4.    SLANT
  1134.  
  1135. SLANT is as defined in the FontName except that the property type is
  1136. ATOM.
  1137.  
  1138. SLANT can be defaulted if not supplied as a font property, as follows:
  1139.  
  1140.  
  1141.      if (SLANT undefined) then
  1142.     SLANT = ATOM("R")
  1143.  
  1144.  
  1145. 3.2.5.    SETWIDTH_NAME
  1146.  
  1147. SETWIDTH_NAME is as defined in the FontName except that the property
  1148. type is ATOM.
  1149.  
  1150. SETWIDTH_NAME can be defaulted if not supplied as a font property, as
  1151. follows:
  1152.  
  1153.  
  1154.      if (SETWIDTH_NAME undefined) then
  1155.     SETWIDTH_NAME = ATOM("Normal")
  1156.  
  1157.  
  1158. 3.2.6.    ADD_STYLE_NAME
  1159.  
  1160. ADD_STYLE_NAME is as defined in the FontName except that the property
  1161. type is ATOM.
  1162.  
  1163. ADD_STYLE_NAME can be defaulted if not supplied as a font property, as
  1164. follows:
  1165.  
  1166.  
  1167.      if (ADD_STYLE_NAME undefined) then
  1168.     ADD_STYLE_NAME = ATOM("")
  1169.  
  1170.  
  1171. 3.2.7.    PIXEL_SIZE
  1172.  
  1173. PIXEL_SIZE is as defined in the FontName except that the property type
  1174. is INT32.
  1175.  
  1176. X clients requiring pixel values for the various typographic fixed
  1177. spaces (em space, en space, and thin space) can use the following algo-
  1178. rithm for computing these values from other properties specified for a
  1179. font:
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.                    15
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. X Logical Font Description Conventions            X11, Release 6.4
  1193.  
  1194.  
  1195.      DeciPointsPerInch = 722.7
  1196.      EMspace = ROUND ((RESOLUTION_X * POINT_SIZE) / DeciPointsPerInch)
  1197.      ENspace = ROUND (EMspace / 2)
  1198.      THINspace = ROUND (EMspace / 3)
  1199.  
  1200.  
  1201. where a slash (/) denotes real division, an asterisk (*) denotes real
  1202. multiplication, and ROUND denotes a function that rounds its real argu-
  1203. ment a up or down to the next integer.    This rounding is done according
  1204. to X = FLOOR (a + 0.5), where FLOOR is a function that rounds its real
  1205. argument down to the nearest integer.
  1206.  
  1207. PIXEL_SIZE can be approximated if not supplied as a font property,
  1208. according to the following algorithm:
  1209.  
  1210.  
  1211.      DeciPointsPerInch = 722.7
  1212.      if (PIXEL_SIZE undefined) then
  1213.     PIXEL_SIZE = ROUND ((RESOLUTION_Y * POINT_SIZE) / DeciPointsPerInch)
  1214.  
  1215.  
  1216. 3.2.8.    POINT_SIZE
  1217.  
  1218. POINT_SIZE is as defined in the FontName except that the property type
  1219. is INT32.
  1220.  
  1221. X clients requiring device-independent values for em space, en space,
  1222. and thin space can use the following algorithm:
  1223.  
  1224.  
  1225.      EMspace = ROUND (POINT_SIZE / 10)
  1226.      ENspace = ROUND (POINT_SIZE / 20)
  1227.      THINspace = ROUND (POINT_SIZE / 30)
  1228.  
  1229.  
  1230. Design POINT_SIZE cannot be calculated or approximated.
  1231.  
  1232. 3.2.9.    RESOLUTION_X
  1233.  
  1234. RESOLUTION_X is as defined in the FontName except that the property type
  1235. is CARD32.
  1236.  
  1237. RESOLUTION_X cannot be calculated or approximated.
  1238.  
  1239. 3.2.10.  RESOLUTION_Y
  1240.  
  1241. RESOLUTION_Y is as defined in the FontName except that the property type
  1242. is CARD32.
  1243.  
  1244. RESOLUTION_X cannot be calculated or approximated.
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.                    16
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. X Logical Font Description Conventions            X11, Release 6.4
  1259.  
  1260.  
  1261. 3.2.11.  SPACING
  1262.  
  1263. SPACING is as defined in the FontName except that the property type is
  1264. ATOM.
  1265.  
  1266. SPACING can be calculated if not supplied as a font property, according
  1267. to the definitions given above for the FontName.
  1268.  
  1269. 3.2.12.  AVERAGE_WIDTH
  1270.  
  1271. AVERAGE_WIDTH is as defined in the FontName except that the property
  1272. type is INT32.
  1273.  
  1274. AVERAGE_WIDTH can be calculated if not provided as a font property,
  1275. according to the following algorithm:
  1276.  
  1277.  
  1278.      if (AVERAGE_WIDTH undefined) then
  1279.     AVERAGE_WIDTH = ROUND (MEAN (ABS (width of each glyph in font)) * 10)
  1280.       * (if (dominant writing direction L-to-R) then 1 else -1)
  1281.  
  1282.  
  1283. where MEAN is a function that returns the arithmetic mean of its argu-
  1284. ments.
  1285.  
  1286. X clients that require values for the number of characters per inch
  1287. (pitch) of a monospaced font can use the following algorithm using the
  1288. AVERAGE_WIDTH and RESOLUTION_X font properties:
  1289.  
  1290.  
  1291.      if (SPACING not proportional) then
  1292.     CharPitch = (RESOLUTION_X * 10) / AVERAGE_WIDTH
  1293.  
  1294.  
  1295. 3.2.13.  CHARSET_REGISTRY
  1296.  
  1297. CHARSET_REGISTRY is as defined in the FontName except that the property
  1298. type is ATOM.
  1299.  
  1300. CHARSET_REGISTRY cannot be defaulted if not supplied as a font property.
  1301.  
  1302. 3.2.14.  CHARSET_ENCODING
  1303.  
  1304. CHARSET_ENCODING is as defined in the FontName except that the property
  1305. type is ATOM.
  1306.  
  1307. CHARSET_ENCODING cannot be defaulted if not supplied as a font property.
  1308.  
  1309. 3.2.15.  MIN_SPACE
  1310.  
  1311. MIN_SPACE is an integer value (of type INT32) that gives the recommended
  1312. minimum word-space value to be used with this font.
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.                    17
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. X Logical Font Description Conventions            X11, Release 6.4
  1325.  
  1326.  
  1327. MIN_SPACE can be approximated if not provided as a font property,
  1328. according to the following algorithm:
  1329.  
  1330.  
  1331.      if (MIN_SPACE undefined) then
  1332.     MIN_SPACE = ROUND(0.75 * NORM_SPACE)
  1333.  
  1334.  
  1335. 3.2.16.  NORM_SPACE
  1336.  
  1337. NORM_SPACE is an integer value (of type INT32) that gives the recom-
  1338. mended normal word-space value to be used with this font.
  1339.  
  1340. NORM_SPACE can be approximated if not provided as a font property,
  1341. according to the following algorithm:
  1342.  
  1343.  
  1344. DeciPointsPerInch = 722.7
  1345. if (NORM_SPACE undefined) then
  1346.    if (SPACE glyph exists) then
  1347.       NORM_SPACE = width of SPACE
  1348.    else NORM_SPACE = ROUND((0.33 * RESOLUTION_X * POINT_SIZE)/ DeciPointsPerInch)
  1349.  
  1350.  
  1351. 3.2.17.  MAX_SPACE
  1352.  
  1353. MAX_SPACE is an integer value (of type INT32) that gives the recommended
  1354. maximum word-space value to be used with this font.
  1355.  
  1356. MAX_SPACE can be approximated if not provided as a font property,
  1357. according to the following algorithm:
  1358.  
  1359.  
  1360.      if (MAX_SPACE undefined) then
  1361.     MAX_SPACE = ROUND(1.5 * NORM_SPACE)
  1362.  
  1363.  
  1364. 3.2.18.  END_SPACE
  1365.  
  1366. END_SPACE is an integer value (of type INT32) that gives the recommended
  1367. spacing at the end of sentences.
  1368.  
  1369. END_SPACE can be approximated if not provided as a font property,
  1370. according to the following algorithm:
  1371.  
  1372.  
  1373.      if (END_SPACE undefined) then
  1374.     END_SPACE = NORM_SPACE
  1375.  
  1376.  
  1377. 3.2.19.  AVG_CAPITAL_WIDTH
  1378.  
  1379. AVG_CAPITAL_WIDTH is an integer value (of type INT32) that gives the
  1380. unweighted arithmetic mean of the absolute value of the width of each
  1381.  
  1382.  
  1383.  
  1384.                    18
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. X Logical Font Description Conventions            X11, Release 6.4
  1391.  
  1392.  
  1393. capital glyph in the font, in tenths of pixels, multiplied by -1 if the
  1394. dominant writing direction for the font is right-to-left.  This property
  1395. applies to both Latin and non-Latin fonts.  For Latin fonts, capitals
  1396. are the glyphs A through Z.  This property is usually used for font
  1397. matching or substitution.
  1398.  
  1399. AVG_CAPITAL_WIDTH can be calculated if not provided as a font property,
  1400. according to the following algorithm:
  1401.  
  1402.  
  1403.      if (AVG_CAPITAL_WIDTH undefined) then
  1404.     if (capitals exist) then
  1405.        AVG_CAPITAL_WIDTH = ROUND (MEAN
  1406.             (ABS (width of each capital glyph)) * 10)
  1407.          * (if (dominant writing direction L-to-R) then 1 else -1)
  1408.     else AVG_CAPITAL_WIDTH undefined
  1409.  
  1410.  
  1411. 3.2.20.  AVG_LOWERCASE_WIDTH
  1412.  
  1413. AVG_LOWERCASE_WIDTH is an integer value (of type INT32) that gives the
  1414. unweighted arithmetic mean width of the absolute value of the width of
  1415. each lowercase glyph in the font in tenths of pixels, multiplied by -1
  1416. if the dominant writing direction for the font is right-to-left.  For
  1417. Latin fonts, lowercase are the glyphs a through z.  This property is
  1418. usually used for font matching or substitution.
  1419.  
  1420. Where appropriate, AVG_LOWERCASE_WIDTH can be approximated if not pro-
  1421. vided as a font property, according to the following algorithm:
  1422.  
  1423.  
  1424.      if (AVG_LOWERCASE_WIDTH undefined) then
  1425.     if (lowercase exists) then
  1426.        AVG_LOWERCASE_WIDTH = ROUND (MEAN
  1427.                 (ABS (width of each lowercase glyph)) * 10)
  1428.       * (if (dominant writing direction L-to-R) then 1 else -1)
  1429.     else AVG_LOWERCASE_WIDTH undefined
  1430.  
  1431.  
  1432. 3.2.21.  QUAD_WIDTH
  1433.  
  1434. QUAD_WIDTH is an integer typographic metric (of type INT32) that gives
  1435. the width of a quad (em) space.
  1436.  
  1437.                   Note
  1438.  
  1439.      Because all typographic fixed spaces (em, en, and thin) are
  1440.      constant for a given font size (that is, they do not vary
  1441.      according to setwidth), the use of this font property has been
  1442.      deprecated.  X clients that require typographic fixed space
  1443.      values are encouraged to discontinue use of QUAD_WIDTH and
  1444.      compute these values from other font properties (for example,
  1445.      PIXEL_SIZE).  X clients that require  a font-dependent width
  1446.      value should use either the FIGURE_WIDTH or one of the average
  1447.  
  1448.  
  1449.  
  1450.                    19
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. X Logical Font Description Conventions            X11, Release 6.4
  1457.  
  1458.  
  1459.      character width font properties (AVERAGE_WIDTH, AVG_CAPI-
  1460.      TAL_WIDTH or AVG_LOWERCASE_WIDTH).
  1461.  
  1462.  
  1463. 3.2.22.  FIGURE_WIDTH
  1464.  
  1465. FIGURE_WIDTH is an integer typographic metric (of type INT32) that gives
  1466. the width of the tabular figures and the dollar sign, if suitable for
  1467. tabular setting (all widths equal).  For Latin fonts, these tabular fig-
  1468. ures are the Arabic numerals 0 through 9.
  1469.  
  1470. FIGURE_WIDTH can be approximated if not supplied as a font property,
  1471. according to the following algorithm:
  1472.  
  1473.  
  1474.      if (numerals and DOLLAR sign are defined & widths are equal) then
  1475.     FIGURE_WIDTH = width of DOLLAR
  1476.      else FIGURE_WIDTH property undefined
  1477.  
  1478.  
  1479. 3.2.23.  SUPERSCRIPT_X
  1480.  
  1481. SUPERSCRIPT_X is an integer value (of type INT32) that gives the recom-
  1482. mended horizontal offset in pixels from the position point to the X ori-
  1483. gin of synthetic superscript text.  If the current position point is at
  1484. [X,Y], then superscripts should begin at [X + SUPERSCRIPT_X, Y - SUPER-
  1485. SCRIPT_Y].
  1486.  
  1487. SUPERSCRIPT_X can be approximated if not provided as a font property,
  1488. according to the following algorithm:
  1489.  
  1490.  
  1491.      if (SUPERSCRIPT_X undefined) then
  1492.     if (TANGENT(ITALIC_ANGLE) defined) then
  1493.        SUPERSCRIPT_X = ROUND((0.40 * CAP_HEIGHT) / TANGENT(ITALIC_ANGLE))
  1494.     else SUPERSCRIPT_X = ROUND(0.40 * CAP_HEIGHT)
  1495.  
  1496.  
  1497. where TANGENT is a trigonometric function that returns the tangent of
  1498. its argument, which is in 1/64 degrees.
  1499.  
  1500. 3.2.24.  SUPERSCRIPT_Y
  1501.  
  1502. SUPERSCRIPT_Y is an integer value (of type INT32) that gives the recom-
  1503. mended vertical offset in pixels from the position point to the Y origin
  1504. of synthetic superscript text.    If the current position point is at
  1505. [X,Y], then superscripts should begin at [X + SUPERSCRIPT_X, Y - SUPER-
  1506. SCRIPT_Y].
  1507.  
  1508. SUPERSCRIPT_Y can be approximated if not provided as a font property,
  1509. according to the following algorithm:
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.                    20
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. X Logical Font Description Conventions            X11, Release 6.4
  1523.  
  1524.  
  1525.      if (SUPERSCRIPT_Y undefined) then
  1526.     SUPERSCRIPT_Y = ROUND(0.40 * CAP_HEIGHT)
  1527.  
  1528.  
  1529. 3.2.25.  SUBSCRIPT_X
  1530.  
  1531. SUBSCRIPT_X is an integer value (of type INT32) that gives the recom-
  1532. mended horizontal offset in pixels from the position point to the X ori-
  1533. gin of synthetic subscript text.  If the current position point is at
  1534. [X,Y], then subscripts should begin at [X + SUBSCRIPT_X, Y + SUB-
  1535. SCRIPT_Y].
  1536.  
  1537. SUBSCRIPT_X can be approximated if not provided as a font property,
  1538. according to the following algorithm:
  1539.  
  1540.  
  1541.      if (SUBSCRIPT_X undefined) then
  1542.     if (TANGENT(ITALIC_ANGLE) defined) then
  1543.        SUBSCRIPT_X = ROUND((0.40 * CAP_HEIGHT) / TANGENT(ITALIC_ANGLE))
  1544.     else SUBSCRIPT_X = ROUND(0.40 * CAP_HEIGHT)
  1545.  
  1546.  
  1547. 3.2.26.  SUBSCRIPT_Y
  1548.  
  1549. SUBSCRIPT_Y is an integer value (of type INT32) that gives the recom-
  1550. mended vertical offset in pixels from the position point to the Y origin
  1551. of synthetic subscript text.  If the current position point is at [X,Y],
  1552. then subscripts should begin at [X + SUBSCRIPT_X, Y + SUBSCRIPT_Y].
  1553.  
  1554. SUBSCRIPT_Y can be approximated if not provided as a font property,
  1555. according to the following algorithm:
  1556.  
  1557.  
  1558.      if (SUBSCRIPT_Y undefined) then
  1559.     SUBSCRIPT_Y = ROUND(0.40 * CAP_HEIGHT)
  1560.  
  1561.  
  1562. 3.2.27.  SUPERSCRIPT_SIZE
  1563.  
  1564. SUPERSCRIPT_SIZE is an integer value (of type INT32) that gives the rec-
  1565. ommended body size of synthetic superscripts to be used with this font,
  1566. in pixels.  This will generally be smaller than the size of the current
  1567. font; that is, superscripts are imaged from a smaller font offset
  1568. according to SUPERSCRIPT_X and SUPERSCRIPT_Y.
  1569.  
  1570. SUPERSCRIPT_SIZE can be approximated if not provided as a font property,
  1571. according to the following algorithm:
  1572.  
  1573.  
  1574.      if (SUPERSCRIPT_SIZE undefined) then
  1575.     SUPERSCRIPT_SIZE = ROUND(0.60 * PIXEL_SIZE)
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.                    21
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. X Logical Font Description Conventions            X11, Release 6.4
  1589.  
  1590.  
  1591. 3.2.28.  SUBSCRIPT_SIZE
  1592.  
  1593. SUBSCRIPT_SIZE is an integer value (of type INT32) that gives the recom-
  1594. mended body size of synthetic subscripts to be used with this font, in
  1595. pixels.  As with SUPERSCRIPT_SIZE, this will generally be smaller than
  1596. the size of the current font; that is, subscripts are imaged from a
  1597. smaller font offset according to SUBSCRIPT_X and SUBSCRIPT_Y.
  1598.  
  1599. SUBSCRIPT_SIZE can be approximated if not provided as a font property,
  1600. according to the algorithm:
  1601.  
  1602.  
  1603.      if (SUBSCRIPT_SIZE undefined) then
  1604.     SUBSCRIPT_SIZE = ROUND(0.60 * PIXEL_SIZE)
  1605.  
  1606.  
  1607. 3.2.29.  SMALL_CAP_SIZE
  1608.  
  1609. SMALL_CAP_SIZE is an integer value (of type INT32) that gives the recom-
  1610. mended body size of synthetic small capitals to be used with this font,
  1611. in pixels.  Small capitals are generally imaged from a smaller font of
  1612. slightly more weight.  No offset [X,Y] is necessary.
  1613.  
  1614. SMALL_CAP_SIZE can be approximated if not provided as a font property,
  1615. according to the following algorithm:
  1616.  
  1617.  
  1618.      if (SMALL_CAP_SIZE undefined) then
  1619.     SMALL_CAP_SIZE = ROUND(PIXEL_SIZE * ((X_HEIGHT
  1620.                    + ((CAP_HEIGHT - X_HEIGHT) / 3)) / CAP_HEIGHT))
  1621.  
  1622.  
  1623. 3.2.30.  UNDERLINE_POSITION
  1624.  
  1625. UNDERLINE_POSITION is an integer value (of type INT32) that gives the
  1626. recommended vertical offset in pixels from the baseline to the top of
  1627. the underline.    If the current position point is at [X,Y], the top of
  1628. the baseline is given by [X, Y + UNDERLINE_POSITION].
  1629.  
  1630. UNDERLINE_POSITION can be approximated if not provided as a font prop-
  1631. erty, according to the following algorithm:
  1632.  
  1633.  
  1634.      if (UNDERLINE_POSITION undefined) then
  1635.     UNDERLINE_POSITION = ROUND((maximum descent) / 2)
  1636.  
  1637. where maximum descent is the maximum descent (below the baseline) in
  1638. pixels of any glyph in the font.
  1639.  
  1640. 3.2.31.  UNDERLINE_THICKNESS
  1641.  
  1642. UNDERLINE_THICKNESS is an integer value (of type INT32) that gives the
  1643. recommended underline thickness, in pixels.
  1644.  
  1645.  
  1646.  
  1647.  
  1648.                    22
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. X Logical Font Description Conventions            X11, Release 6.4
  1655.  
  1656.  
  1657. UNDERLINE_THICKNESS can be approximated if not provided as a font prop-
  1658. erty, according to the following algorithm:
  1659.  
  1660.  
  1661.      CapStemWidth = average width of the stems of capitals
  1662.      if (UNDERLINE_THICKNESS undefined) then
  1663.     UNDERLINE_THICKNESS = CapStemWidth
  1664.  
  1665.  
  1666. 3.2.32.  STRIKEOUT_ASCENT
  1667.  
  1668. STRIKEOUT_ASCENT is an integer value (of type INT32) that gives the ver-
  1669. tical ascent for boxing or voiding glyphs in this font.  If the current
  1670. position is at [X,Y] and the string extent is EXTENT, the upper-left
  1671. corner of the strikeout box is at [X, Y - STRIKEOUT_ASCENT] and the
  1672. lower-right corner of the box is at [X + EXTENT, Y + STRIKEOUT_DESCENT].
  1673.  
  1674. STRIKEOUT_ASCENT can be approximated if not provided as a font property,
  1675. according to the following algorithm:
  1676.  
  1677.  
  1678.      if (STRIKEOUT_ASCENT undefined)
  1679.     STRIKEOUT_ASCENT = maximum ascent
  1680.  
  1681. where maximum ascent is the maximum ascent (above the baseline) in pix-
  1682. els of any glyph in the font.
  1683.  
  1684. 3.2.33.  STRIKEOUT_DESCENT
  1685.  
  1686. STRIKEOUT_DESCENT is an integer value (of type INT32) that gives the
  1687. vertical descent for boxing or voiding glyphs in this font.  If the cur-
  1688. rent position is at [X,Y] and the string extent is EXTENT, the upper-
  1689. left corner of the strikeout box is at [X, Y - STRIKEOUT_ASCENT] and the
  1690. lower-right corner of the box is at [X + EXTENT, Y + STRIKEOUT_DESCENT].
  1691.  
  1692. STRIKEOUT_DESCENT can be approximated if not provided as a font prop-
  1693. erty, according to the following algorithm:
  1694.  
  1695.  
  1696.      if (STRIKEOUT_DESCENT undefined)
  1697.     STRIKEOUT_DESCENT = maximum descent
  1698.  
  1699. where maximum descent is the maximum descent (below the baseline) in
  1700. pixels of any glyph in the font.
  1701.  
  1702. 3.2.34.  ITALIC_ANGLE
  1703.  
  1704. ITALIC_ANGLE is an integer value (of type INT32) that gives the nominal
  1705. posture angle of the typeface design, in 1/64 degrees, measured from the
  1706. glyph origin counterclockwise from the three o'clock position.
  1707.  
  1708. ITALIC_ANGLE can be defaulted if not provided as a font property,
  1709. according to the following algorithm:
  1710.  
  1711.  
  1712.  
  1713.  
  1714.                    23
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. X Logical Font Description Conventions            X11, Release 6.4
  1721.  
  1722.  
  1723.      if (ITALIC_ANGLE undefined) then
  1724.     ITALIC_ANGLE = (90 * 64)
  1725.  
  1726.  
  1727. 3.2.35.  CAP_HEIGHT
  1728.  
  1729. CAP_HEIGHT is an integer value (of type INT32) that gives the nominal
  1730. height of the capital letters contained in the font, as specified by the
  1731. FOUNDRY or typeface designer.
  1732.  
  1733. Certain clients require CAP_HEIGHT to compute scale factors and posi-
  1734. tioning offsets for synthesized glyphs where this information or
  1735. designed glyphs are not explicitly provided by the font (for example,
  1736. small capitals, superiors, inferiors, and so on).  CAP_HEIGHT is also a
  1737. critical factor in font matching and substitution.
  1738.  
  1739. CAP_HEIGHT can be approximated if not provided as a font property,
  1740. according to the following algorithm:
  1741.  
  1742.  
  1743.      if (CAP_HEIGHT undefined) then
  1744.     if (Latin font) then
  1745.        CAP_HEIGHT = XCharStruct.ascent[glyph X]
  1746.     else if (capitals exist) then
  1747.         CAP_HEIGHT = XCharStruct.ascent[some unaccented capital glyph]
  1748.     else CAP_HEIGHT undefined
  1749.  
  1750.  
  1751. 3.2.36.  X_HEIGHT
  1752.  
  1753. X_HEIGHT is an integer value (of type INT32) that gives the nominal
  1754. height above the baseline of the lowercase glyphs contained in the font,
  1755. as specified by the FOUNDRY or typeface designer.
  1756.  
  1757. As with CAP_HEIGHT, X_HEIGHT is required by certain clients to compute
  1758. scale factors for synthesized small capitals where this information is
  1759. not explicitly provided by the font resource.  X_HEIGHT is a critical
  1760. factor in font matching and substitution.
  1761.  
  1762. X_HEIGHT can be approximated if not provided as a font property, accord-
  1763. ing to the following algorithm:
  1764.  
  1765.  
  1766.      if (X_HEIGHT undefined) then
  1767.     if (Latin font) then
  1768.        X_HEIGHT = XCharStruct.ascent[glyph x]
  1769.     else if (lowercase exists) then
  1770.          X_HEIGHT = XCharStruct.ascent[some unaccented lc glyph without an ascender]
  1771.     else X_HEIGHT undefined
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.                    24
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. X Logical Font Description Conventions            X11, Release 6.4
  1787.  
  1788.  
  1789. 3.2.37.  RELATIVE_SETWIDTH
  1790.  
  1791. RELATIVE_SETWIDTH is an unsigned integer value (of type CARD32) that
  1792. gives the coded proportionate width of the font, relative to all known
  1793. fonts of the same typeface family, according to the type designer's or
  1794. FOUNDRY's judgment.
  1795.  
  1796. RELATIVE_SETWIDTH ranges from 10 to 90 or is 0 if undefined or unknown.
  1797. The following reference values are defined:
  1798.  
  1799. ---------------------------------------------------------------------------
  1800. Code    English Translation   Description
  1801. ---------------------------------------------------------------------------
  1802. 0    Undefined          Undefined or unknown
  1803. 10    UltraCondensed          The lowest ratio of average width to height
  1804. 20    ExtraCondensed
  1805. 30    Condensed          Condensed, Narrow, Compressed, ...
  1806. 40    SemiCondensed
  1807. 50    Medium              Medium, Normal, Regular, ...
  1808. 60    SemiExpanded          SemiExpanded, DemiExpanded, ...
  1809. 70    Expanded
  1810. 80    ExtraExpanded          ExtraExpanded, Wide, ...
  1811. 90    UltraExpanded          The highest ratio of average width to height
  1812. ---------------------------------------------------------------------------
  1813.  
  1814.  
  1815. RELATIVE_SETWIDTH can be defaulted if not provided as a font property,
  1816. according to the following algorithm:
  1817.  
  1818.  
  1819.      if (RELATIVE_SETWIDTH undefined) then
  1820.     RELATIVE_SETWIDTH = 50
  1821.  
  1822.  
  1823. For polymorphic fonts, RELATIVE_SETWIDTH is not necessarily a linear
  1824. function of the font's setwidth axis.
  1825.  
  1826. X clients that want to obtain a calculated proportionate width of the
  1827. font (that is, a font-independent way of identifying the proportionate
  1828. width across all fonts and all font vendors) can use the following algo-
  1829. rithm:
  1830.  
  1831.  
  1832.      SETWIDTH = AVG_CAPITAL_WIDTH / (CAP_HEIGHT * 10)
  1833.  
  1834.  
  1835. where SETWIDTH is a real number with zero being the narrowest calculated
  1836. setwidth.
  1837.  
  1838. 3.2.38.  RELATIVE_WEIGHT
  1839.  
  1840. RELATIVE_WEIGHT is an unsigned integer value (of type CARD32) that gives
  1841. the coded weight of the font, relative to all known fonts of the same
  1842. typeface family, according to the type designer's or FOUNDRY's judgment.
  1843.  
  1844.  
  1845.  
  1846.                    25
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. X Logical Font Description Conventions            X11, Release 6.4
  1853.  
  1854.  
  1855. RELATIVE_WEIGHT ranges from 10 to 90 or is 0 if undefined or unknown.
  1856. The following reference values are defined:
  1857.  
  1858. -----------------------------------------------------------------------
  1859. Code    English Translation   Description
  1860. -----------------------------------------------------------------------
  1861. 0    Undefined          Undefined or unknown
  1862. 10    UltraLight          The lowest ratio of stem width to height
  1863. 20    ExtraLight
  1864. 30    Light
  1865. 40    SemiLight          SemiLight, Book, ...
  1866. 50    Medium              Medium, Normal, Regular,...
  1867. 60    SemiBold          SemiBold, DemiBold, ...
  1868. 70    Bold
  1869. 80    ExtraBold          ExtraBold, Heavy, ...
  1870. 90    UltraBold          UltraBold, Black, ..., the highest ratio
  1871.                   of stem width to height
  1872. -----------------------------------------------------------------------
  1873.  
  1874.  
  1875. RELATIVE_WEIGHT can be defaulted if not provided as a font property,
  1876. according to the following algorithm:
  1877.  
  1878.  
  1879.      if (RELATIVE_WEIGHT undefined) then
  1880.     RELATIVE_WEIGHT = 50
  1881.  
  1882.  
  1883. For polymorphic fonts, RELATIVE_WEIGHT is not necessarily a linear func-
  1884. tion of the font's weight axis.
  1885.  
  1886. 3.2.39.  WEIGHT
  1887.  
  1888. Calculated WEIGHT is an unsigned integer value (of type CARD32) that
  1889. gives the calculated weight of the font, computed as the ratio of capi-
  1890. tal stem width to CAP_HEIGHT, in the range 0 to 1000, where 0 is the
  1891. lightest weight.
  1892.  
  1893. WEIGHT can be calculated if not supplied as a font property, according
  1894. to the following algorithm:
  1895.  
  1896.  
  1897.      CapStemWidth = average width of the stems of capitals
  1898.      if (WEIGHT undefined) then
  1899.     WEIGHT = ROUND ((CapStemWidth * 1000) / CAP_HEIGHT)
  1900.  
  1901.  
  1902. A calculated value for weight is necessary when matching fonts from dif-
  1903. ferent families because both the RELATIVE_WEIGHT and the WEIGHT_NAME are
  1904. assigned by the typeface supplier, according to its tradition and prac-
  1905. tice, and therefore, are somewhat subjective.  Calculated WEIGHT pro-
  1906. vides a font-independent way of identifying the weight across all fonts
  1907. and all font vendors.
  1908.  
  1909.  
  1910.  
  1911.  
  1912.                    26
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. X Logical Font Description Conventions            X11, Release 6.4
  1919.  
  1920.  
  1921. 3.2.40.  RESOLUTION
  1922.  
  1923. RESOLUTION is an integer value (of type INT32) that gives the resolution
  1924. for which this font was created, measured in 1/100 pixels per point.
  1925.  
  1926.                   Note
  1927.  
  1928.      As independent horizontal and vertical design resolution com-
  1929.      ponents are required to accommodate displays with nonsquare
  1930.      aspect ratios, the use of this font property has been depre-
  1931.      cated, and independent RESOLUTION_X and RESOLUTION_Y font name
  1932.      fields/properties have been defined (see sections 3.1.2.9 and
  1933.      3.1.2.10).  X clients are encouraged to discontinue use of the
  1934.      RESOLUTION property and are encouraged to use the appropriate
  1935.      X,Y resolution properties, as required.
  1936.  
  1937.  
  1938. 3.2.41.  FONT
  1939.  
  1940. FONT is a string (of type ATOM) that gives the full XLFD name of the
  1941. font--that is, the value can be used to open another instance of the
  1942. same font.
  1943.  
  1944. If not provided, the FONT property cannot be calculated.
  1945.  
  1946. 3.2.42.  FACE_NAME
  1947.  
  1948. FACE_NAME is a human-understandable string (of type ATOM) that gives the
  1949. full device-independent typeface name, including the owner, weight,
  1950. slant, set, and so on but not the resolution, size, and so on.    This
  1951. property may be used as feedback during font selection.
  1952.  
  1953. FACE_NAME cannot be calculated or approximated if not provided as a font
  1954. property.
  1955.  
  1956. 3.2.43.  FULL_NAME
  1957.  
  1958. FULL_NAME is the same as FACE_NAME.  Its use is deprecated, but it is
  1959. found on some old fonts.
  1960.  
  1961. 3.2.44.  COPYRIGHT
  1962.  
  1963. COPYRIGHT is a human-understandable string (of type ATOM) that gives the
  1964. copyright information of the legal owner of the digital font data.
  1965.  
  1966. This information is a required component of a font but is independent of
  1967. the particular format used to represent it (that is, it cannot be cap-
  1968. tured as a comment that could later be thrown away for efficiency rea-
  1969. sons).
  1970.  
  1971. COPYRIGHT cannot be calculated or approximated if not provided as a font
  1972. property.
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.                    27
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. X Logical Font Description Conventions            X11, Release 6.4
  1985.  
  1986.  
  1987. 3.2.45.  NOTICE
  1988.  
  1989. NOTICE is a human-understandable string (of type ATOM) that gives the
  1990. copyright information of the legal owner of the font design or, if not
  1991. applicable, the trademark information for the typeface FAMILY_NAME.
  1992.  
  1993. Typeface design and trademark protection laws vary from country to coun-
  1994. try, the USA having no design copyright protection currently while vari-
  1995. ous countries in Europe offer both design and typeface family name
  1996. trademark protection.  As with COPYRIGHT, this information is a required
  1997. component of a font but is independent of the particular format used to
  1998. represent it.
  1999.  
  2000. NOTICE cannot be calculated or approximated if not provided as a font
  2001. property.
  2002.  
  2003. 3.2.46.  DESTINATION
  2004.  
  2005. DESTINATION is an unsigned integer code (of type CARD32) that gives the
  2006. font design destination, that is, whether it was designed as a screen
  2007. proofing font to match printer font glyph widths (WYSIWYG), as an opti-
  2008. mal video font (possibly with corresponding printer font) for extended
  2009. screen viewing (video text), and so on.
  2010.  
  2011. The font design considerations are very different, and at current dis-
  2012. play resolutions, the readability and legibility of these two kinds of
  2013. screen fonts are very different.  DESTINATION allows publishing clients
  2014. that use X to model the printed page and video text clients, such as on-
  2015. line documentation browsers, to query for X screen fonts that suit their
  2016. particular requirements.
  2017.  
  2018. The encoding is as follows:
  2019.  
  2020. --------------------------------------------------------------------
  2021. Code    English Translation   Description
  2022. --------------------------------------------------------------------
  2023. 0    WYSIWYG           The font is optimized to match the
  2024.                   typographic design and metrics of an
  2025.                   equivalent printer font.
  2026. 1    Video text          The font is optimized for screen leg-
  2027.                   ibility and readability.
  2028. --------------------------------------------------------------------
  2029.  
  2030.  
  2031.  
  2032. 3.2.47.  FONT_TYPE
  2033.  
  2034. FONT_TYPE is a human-understandable string (of type ATOM) that describes
  2035. the format of the font data as they are read from permanent storage by
  2036. the current font source.  It is a static attribute of the source data.
  2037. It can be used by clients to select a type of bitmap or outline font
  2038. without regard to the rasterizer used to render the font.
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.                    28
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050. X Logical Font Description Conventions            X11, Release 6.4
  2051.  
  2052.  
  2053. Predefined values are as follows:
  2054.  
  2055. ----------------------------------------------------------------
  2056. Value         When applicable
  2057. ----------------------------------------------------------------
  2058. "Bitmap"     Hand-tuned bitmap fonts.  Some attempt has been
  2059.          made to optimize the visual appearance of the font
  2060.          for the requested size and resolution.
  2061. "Prebuilt"   All bitmap format fonts that cannot be described
  2062.          as "Bitmap", that is, hand-tuned.    For example, a
  2063.          bitmap format font that was generated mechanically
  2064.          using a scalable font rasterizer would be consid-
  2065.          ered "Prebuilt", not "Bitmap".
  2066. "Type 1"     Any Type 1 font.
  2067. "TrueType"   Any TrueType font.
  2068. "Speedo"     Any Speedo font.
  2069. "F3"         Any F3 font.
  2070. ----------------------------------------------------------------
  2071.  
  2072.  
  2073. Other values may be registered with the X Consortium.
  2074.  
  2075. 3.2.48.  FONT_VERSION
  2076.  
  2077. FONT_VERSION is a human-understandable string (of type ATOM) that
  2078. describes the formal or informal version of the font.  None is a valid
  2079. value.
  2080.  
  2081. 3.2.49.  RASTERIZER_NAME
  2082.  
  2083. RASTERIZER_NAME is a human-understandable string (of type ATOM) that is
  2084. the specific name of the rasterizer that has performed some rasteriza-
  2085. tion operation (such as scaling from outlines) on this font.
  2086.  
  2087. To define a RASTERIZER_NAME, the following format is recommended:
  2088.  
  2089. RasterizerName ::=   OrganizationId Space Rasterizer
  2090. OrganizationId ::=   STRING8--the X Registry ORGANIZATION
  2091.              name of the rasterizer implementor or
  2092.              maintainer.
  2093.     Rasterizer ::=   the case-sensitive, human-understand-
  2094.              able product name of the rasterizer.
  2095.              Words within this name should be sep-
  2096.              arated by a single SPACE.
  2097.      Space ::=   OCTET-" " (SPACE)
  2098.  
  2099.  
  2100. Examples:
  2101.       X Consortium Bit Scaler
  2102.       X Consortium Type 1 Rasterizer
  2103.       X Consortium Speedo Rasterizer
  2104.       Adobe Type Manager
  2105.       Sun TypeScaler
  2106.  
  2107.  
  2108.  
  2109.  
  2110.                    29
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. X Logical Font Description Conventions            X11, Release 6.4
  2117.  
  2118.  
  2119. If RASTERIZER_NAME is not defined, or is None, no rasterization opera-
  2120. tion has been applied to the FONT_TYPE.
  2121.  
  2122. 3.2.50.  RASTERIZER_VERSION
  2123.  
  2124. RASTERIZER_VERSION is a human-understandable string (of type ATOM) that
  2125. represents the formal or informal version of a font rasterizer.  The
  2126. RASTERIZER_VERSION should match the corresponding product version number
  2127. known to users, when applicable.
  2128.  
  2129. 3.2.51.  RAW_ASCENT
  2130.  
  2131. For a font with a transformation matrix, RAW_ASCENT is the font ascent
  2132. in 1000 pixel metrics (see section 4.1).
  2133.  
  2134. 3.2.52.  RAW_DESCENT
  2135.  
  2136. For a font with a transformation matrix, RAW_DESCENT is the font descent
  2137. in 1000 pixel metrics (see section 4.1).
  2138.  
  2139. 3.2.53.  RAW_*
  2140.  
  2141. For a font with a transformation matrix, all font properties that repre-
  2142. sent horizontal or vertical sizes or displacements will be accompanied
  2143. by a new property, named as the original except prefixed with "RAW_",
  2144. that is computed as described in section 4.1.
  2145.  
  2146. 3.2.54.  AXIS_NAMES
  2147.  
  2148. AXIS_NAMES is a list of all the names of the axes for a polymorphic
  2149. font, separated by a null (0) byte.  These names are suitable for pre-
  2150. sentation in a user interface (see section 6).
  2151.  
  2152. 3.2.55.  AXIS_LIMITS
  2153.  
  2154. AXIS_LIMITS is a list of integers, two for each axis, giving the minimum
  2155. and maximum allowable values for that axis of a polymorphic font (see
  2156. section 6).
  2157.  
  2158. 3.2.56.  AXIS_TYPES
  2159.  
  2160. AXIS_TYPES is like AXIS_NAMES, but can be registered as having specific
  2161. semantics (see section 6).
  2162.  
  2163. 3.3.  Built-in Font Property Atoms
  2164.  
  2165. The following font property atom definitions were predefined in the ini-
  2166. tial version of the core protocol:
  2167.  
  2168. ----------------------------------------------
  2169. Font Property/Atom Name   Property Type
  2170. ----------------------------------------------
  2171. MIN_SPACE          INT32
  2172.  
  2173.  
  2174.  
  2175.  
  2176.                    30
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182. X Logical Font Description Conventions            X11, Release 6.4
  2183.  
  2184.  
  2185. ----------------------------------------------
  2186. Font Property/Atom Name   Property Type
  2187. ----------------------------------------------
  2188. NORM_SPACE          INT32
  2189. MAX_SPACE          INT32
  2190. END_SPACE          INT32
  2191. SUPERSCRIPT_X          INT32
  2192. SUPERSCRIPT_Y          INT32
  2193. SUBSCRIPT_X          INT32
  2194. SUBSCRIPT_Y          INT32
  2195. UNDERLINE_POSITION      INT32
  2196. UNDERLINE_THICKNESS      INT32
  2197. STRIKEOUT_ASCENT      INT32
  2198. STRIKEOUT_DESCENT      INT32
  2199. FONT_ASCENT          INT32
  2200. FONT_DESCENT          INT32
  2201. ITALIC_ANGLE          INT32
  2202. X_HEIGHT          INT32
  2203. QUAD_WIDTH          INT32 - deprecated
  2204. WEIGHT              CARD32
  2205. POINT_SIZE          INT32
  2206. RESOLUTION          CARD32 - deprecated
  2207. COPYRIGHT          ATOM
  2208. FULL_NAME          ATOM - deprecated
  2209. FAMILY_NAME          ATOM
  2210. DEFAULT_CHAR          CARD32
  2211. ----------------------------------------------
  2212.  
  2213.  
  2214. 4.  Matrix Transformations
  2215.  
  2216. An XLFD name presented to the server can have the POINT_SIZE or
  2217. PIXEL_SIZE field begin with the character "[".    If the first character
  2218. of the field is "[", the character must be followed with ASCII represen-
  2219. tations of four floating point numbers and a trailing "]", with white
  2220. space separating the numbers and optional white space separating the
  2221. numbers from the "[" and "]" characters.  Numbers use standard floating
  2222. point syntax but use the character "~" to represent a minus sign in the
  2223. mantissa or exponent.
  2224.  
  2225. The BNF for a matrix transformation string is as follows:
  2226.  
  2227.  MatrixString ::=   LeftBracket OptionalSpace Float Space Float Space Float
  2228.             Space Float OptionalSpace RightBracket
  2229. OptionalSpace ::=   "" | Space
  2230.     Space ::=   SpaceChar | SpaceChar Space
  2231.     Float ::=   Mantissa | Mantissa Exponent
  2232.      Mantissa ::=   Sign Number | Number
  2233.      Sign ::=   Plus | Tilde
  2234.        Number ::=   Integer | Integer Dot Integer | Dot Integer
  2235.       Integer ::=   Digit | Digit Integer
  2236.     Digit ::=   "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
  2237.      Exponent ::=   "e" SignedInteger | "E" SignedInteger
  2238.  
  2239.  
  2240.  
  2241.  
  2242.                    31
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248. X Logical Font Description Conventions            X11, Release 6.4
  2249.  
  2250.  
  2251. SignedInteger ::=   Sign Integer | Integer
  2252.   LeftBracket ::=   OCTET - "[" (LEFT SQUARE BRACKET)
  2253.  RightBracket ::=   OCTET - "]" (RIGHT SQUARE BRACKET)
  2254.     SpaceChar ::=   OCTET - " " (SPACE)
  2255.     Tilde ::=   OCTET - "~" (TILDE)
  2256.      Plus ::=   OCTET - "+" (PLUS)
  2257.       Dot ::=   OCTET - "." (FULL STOP)
  2258.  
  2259.  
  2260. The string "[a b c d]" represents a graphical transformation of the
  2261. glyphs in the font by the matrix
  2262.  
  2263. [   a    b   0    ]
  2264. [   c    d   0    ]
  2265. [   0    0   1    ]
  2266.  
  2267.  
  2268. All transformations occur around the origin of the glyph.  The relation-
  2269. ship between the current scalar values and the matrix transformation
  2270. values is that the scalar value "N" in the POINT_SIZE field produces the
  2271. same glyphs as the matrix "[N/10 0 0 N/10]" in that field, and the
  2272. scalar value "N" in the PIXEL_SIZE field produces the same glyphs as the
  2273. matrix "[N*RESOLUTION_X/RESOLUTION_Y 0 0 N]" in that field.
  2274.  
  2275. If matrices are specified for both the POINT_SIZE and PIXEL_SIZE, they
  2276. must bear the following relationship to each other within an implementa-
  2277. tion-specific tolerance:
  2278.      PIXEL_SIZE_MATRIX = [Sx 0 0 Sy] * POINT_SIZE_MATRIX
  2279. where
  2280.      Sx = RESOLUTION_X / 72.27
  2281.      Sy = RESOLUTION_Y / 72.27
  2282.  
  2283. If either the POINT_SIZE or PIXEL_SIZE field is unspecified (either "0"
  2284. or wildcarded), the preceding formulas can be used to compute one from
  2285. the other.
  2286.  
  2287. 4.1.  Metrics and Font Properties
  2288.  
  2289. In this section, the phrase "1000 pixel metrics" means the metrics that
  2290. would be obtained if the rasterizer took the base untransformed design
  2291. used to generate the transformed font and scaled it linearly to a height
  2292. of 1000 pixels, with no rotation component.  Note that there may be no
  2293. way for the application to actually request this font since the raster-
  2294. izer may use different outlines or rasterization techniques at that size
  2295. from the ones used to generate the transformed font.
  2296.  
  2297. Notes on properties and metrics:
  2298.  
  2299. The per-char ink metrics (lbearing, rbearing, ascent, and descent) rep-
  2300. resent the ink extent of the transformed glyph around its origin.
  2301.  
  2302. The per-char width is the x component of the transformed character
  2303. width.
  2304.  
  2305.  
  2306.  
  2307.  
  2308.                    32
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314. X Logical Font Description Conventions            X11, Release 6.4
  2315.  
  2316.  
  2317. The font ascent and descent are the y component of the transformed font
  2318. ascent or descent.
  2319.  
  2320. The FONT property returns a name reflecting the matrix being used--that
  2321. is, the name returned can be used to open another instance of the same
  2322. font.  The returned name is not necessarily an exact copy of the
  2323. requested name.  If, for example, the user requests
  2324.    -misc-fixed-medium-r-normal--0-[2e1 0 0.0 +10.0]-72-72-c-0-iso8859-1
  2325. the resulting FONT property might be
  2326.    -misc-fixed-medium-r-normal--[19.9 0 0 10]-[20 0 0
  2327. 10]-72-72-c-0-iso8859-1
  2328. The FONT property will always include matrices in both the PIXEL_SIZE
  2329. and the POINT_SIZE fields.
  2330.  
  2331. To allow accurate client positioning of transformed characters, the
  2332. attributes field of the XCharInfo contains the width of the character in
  2333. 1000 pixel metrics.  This attributes field should be interpreted as a
  2334. signed integer.
  2335.  
  2336. There will always be 2 new font properties defined, RAW_ASCENT and
  2337. RAW_DESCENT, that hold the ascent and descent in 1000 pixel metrics.
  2338.  
  2339. All font properties that represent horizontal widths or displacements
  2340. have as their value the x component of the transformed width or dis-
  2341. placement.  All font properties that represent vertical heights or dis-
  2342. placements have as their value the y component of the transformed height
  2343. or displacement.  Each such property will be accompanied by a new prop-
  2344. erty, named as the original except prefixed with "RAW_", that gives the
  2345. value of the width, height, or displacement in 1000 pixel metrics.
  2346.  
  2347. 5.  Scalable Fonts
  2348.  
  2349. The XLFD is designed to support scalable fonts.  A scalable font is a
  2350. font source from which instances of arbitrary size can be derived.  A
  2351. scalable font source might be one or more outlines together with zero or
  2352. more hand-tuned bitmap fonts at specific sizes and resolutions, or it
  2353. might be a programmatic description together with zero or more bitmap
  2354. fonts, or some other format (perhaps even just a single bitmap font).
  2355.  
  2356. The following definitions are useful for discussing scalable fonts:
  2357.  
  2358. Well-formed XLFD pattern
  2359.  
  2360.      A pattern string containing 14 hyphens, one of which is the first
  2361.      character of the pattern.    Wildcard characters are permitted in the
  2362.      fields of a well-formed XLFD pattern.
  2363.  
  2364. Scalable font name
  2365.  
  2366.      A well-formed XLFD pattern containing no wildcards and containing
  2367.      the digit "0" in the PIXEL_SIZE, POINT_SIZE, and AVERAGE_WIDTH
  2368.      fields.
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.                    33
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380. X Logical Font Description Conventions            X11, Release 6.4
  2381.  
  2382.  
  2383. Scalable fields
  2384.  
  2385.      The XLFD fields PIXEL_SIZE, POINT_SIZE, RESOLUTION_X, RESOLUTION_Y,
  2386.      and AVERAGE_WIDTH.
  2387.  
  2388. Derived instance
  2389.  
  2390.      The result of replacing the scalable fields of a font name with
  2391.      values to yield a font name that could actually be produced from
  2392.      the font source.  A scaling engine is permitted, but not required,
  2393.      to interpret the scalable fields in font names to support anamor-
  2394.      phic scaling.
  2395.  
  2396. Global list
  2397.  
  2398.      The list of names that would be returned by an X server for a List-
  2399.      Fonts protocol request on the pattern "*" if there were no protocol
  2400.      restrictions on the total number of names returned.
  2401.  
  2402.  
  2403. The global list consists of font names derived from font sources.  If a
  2404. single font source can support multiple character sets (specified in the
  2405. CHARSET_REGISTRY and CHARSET_ENCODING fields), each such character set
  2406. should be used to form a separate font name in the list.  For a nonscal-
  2407. able font source, the simple font name for each character set is
  2408. included in the global list.  For a scalable font source, a scalable
  2409. font name for each character set is included in the list.  In addition
  2410. to the scalable font name, specific derived instance names may also be
  2411. included in the list.  The relative order of derived instances with
  2412. respect to the scalable font name is not constrained.  Finally, font
  2413. name aliases may also be included in the list.    The relative order of
  2414. aliases with respect to the real font name is not constrained.
  2415.  
  2416. The values of the RESOLUTION_X and RESOLUTION_Y fields of a scalable
  2417. font name are implementation dependent, but to maximize backward compat-
  2418. ibility, they should be reasonable nonzero values, for example, a reso-
  2419. lution close to that provided by the screen (in a single-screen server).
  2420. Because some existing applications rely on seeing a collection of point
  2421. and pixel sizes, server vendors are strongly encouraged in the near term
  2422. to provide a mechanism for including, for each scalable font name, a set
  2423. of specific derived instance names.  For font sources that contain a
  2424. collection of hand-tuned bitmap fonts, including names of these
  2425. instances in the global list is recommended and sufficient.
  2426.  
  2427. The X protocol request OpenFont on a scalable font name returns a font
  2428. corresponding to an implementation-dependent derived instance of that
  2429. font name.
  2430.  
  2431. The X protocol request ListFonts on a well-formed XLFD pattern returns
  2432. the following.    Starting with the global list, if the actual pattern
  2433. argument has values containing no wildcards in scalable fields, then
  2434. substitute each such field into the corresponding field in each scalable
  2435. font name in the list.    For each resulting font name, if the remaining
  2436. scalable fields cannot be replaced with values to produce a derived
  2437.  
  2438.  
  2439.  
  2440.                    34
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446. X Logical Font Description Conventions            X11, Release 6.4
  2447.  
  2448.  
  2449. instance, remove the font name from the list.  Now take the modified
  2450. list, and perform a simple pattern match against the pattern argument.
  2451. ListFonts returns the resulting list.
  2452.  
  2453. For example, given the global list:
  2454.  
  2455.      -Linotype-Times-Bold-I-Normal--0-0-100-100-P-0-ISO8859-1
  2456.      -Linotype-Times-Bold-R-Normal--0-0-100-100-P-0-ISO8859-1
  2457.      -Linotype-Times-Medium-I-Normal--0-0-100-100-P-0-ISO8859-1
  2458.      -Linotype-Times-Medium-R-Normal--0-0-100-100-P-0-ISO8859-1
  2459.  
  2460.  
  2461. a ListFonts request with the pattern:
  2462.  
  2463.  
  2464.      -*-Times-*-R-Normal--*-120-100-100-P-*-ISO8859-1
  2465.  
  2466.  
  2467. would return:
  2468.  
  2469.      -Linotype-Times-Bold-R-Normal--0-120-100-100-P-0-ISO8859-1
  2470.      -Linotype-Times-Medium-R-Normal--0-120-100-100-P-0-ISO8859-1
  2471.  
  2472.  
  2473. ListFonts on a pattern containing wildcards that is not a well-formed
  2474. XLFD pattern is only required to return the list obtained by performing
  2475. a simple pattern match against the global list.  X servers are permit-
  2476. ted, but not required, to use a more sophisticated matching algorithm.
  2477.  
  2478. 6.  Polymorphic Fonts
  2479.  
  2480. Fonts that can be varied in ways other than size or resolution are
  2481. called polymorphic fonts.  Multiple Master Type 1 font programs are one
  2482. type of a polymorphic font.  Current examples of axes along which the
  2483. fonts can be varied are width, weight, and optical size; others might
  2484. include formality or x-height.
  2485.  
  2486. To support polymorphic fonts, special values indicating variability are
  2487. defined for the following XLFD fields:
  2488.      WEIGHT_NAME
  2489.      SLANT
  2490.      SETWIDTH_NAME
  2491.      ADD_STYLE_NAME
  2492.  
  2493. The string "0" is the special polymorphic value.  In the WEIGHT_NAME,
  2494. SLANT, or SETWIDTH_NAME field, "0" must be the entire field.  There may
  2495. be multiple polymorphic values in the ADD_STYLE_NAME field.  They are
  2496. surrounded by "[" and "]" and separated by a Space, as "[0 0]".  The
  2497. polymorphic values may coexist with other data in the field.  It is rec-
  2498. ommended that the polymorphic values be at the end of the ADD_STYLE_NAME
  2499. field.
  2500.  
  2501. The font-matching algorithms for a font with polymorphic fields are
  2502. identical to the matching algorithms for a font with scalable fields.
  2503.  
  2504.  
  2505.  
  2506.                    35
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512. X Logical Font Description Conventions            X11, Release 6.4
  2513.  
  2514.  
  2515. There are three new font properties to describe the axes of variation,
  2516. AXIS_NAMES, AXIS_LIMITS, and AXIS_TYPES.  AXIS_NAMES is a list of all
  2517. the names of the axes for the font, separated by a null (0) byte.  These
  2518. names are suitable for presentation in a user interface.  AXIS_LIMITS is
  2519. a list of integers, two for each axis, giving the minimum and maximum
  2520. allowable values for that axis.  AXIS_TYPES is like AXIS_NAMES, but can
  2521. be registered as having specific semantics.
  2522.  
  2523. The axes are listed in the properties in the same order as they appear
  2524. in the font name.  They are matched with font name fields by looking for
  2525. the special polymorphic values in the font name.
  2526.  
  2527. Examples:
  2528.  
  2529. The Adobe Myriad MM font program has width and weight axes.  Weight can
  2530. vary from 215 to 830, and width from 300 to 700.
  2531.  
  2532.      Name:
  2533.       -Adobe-Myriad MM-0-R-0--0-0-0-0-P-0-ISO8859-1
  2534.      AXIS_NAMES:
  2535.       Weight, Width
  2536.      AXIS_LIMITS:
  2537.       215, 830, 300, 700
  2538.      AXIS_TYPES:
  2539.       Adobe-Weight, Adobe-Width
  2540.      Sample derived instance:
  2541.       -Adobe-Myriad MM-412-R-575--*-120-100-100-P-*-ISO8859-1
  2542.  
  2543.  
  2544. The Adobe Minion MM Italic font program has width, weight, and optical
  2545. size axes.
  2546.  
  2547.      Name:
  2548.       -Adobe-Minion MM-0-I-0-[0]-0-0-0-0-P-0-ISO8859-1
  2549.      AXIS_NAMES:
  2550.       Weight, Width, Optical size
  2551.      AXIS_LIMITS:
  2552.       345, 620, 450, 600, 6, 72
  2553.      AXIS_TYPES:
  2554.       Adobe-Weight, Adobe-Width, Adobe-OpticalSize
  2555.      Sample derived instance:
  2556.       -Adobe-Minion MM-550-I-480-[18]-*-180-100-100-P-*-ISO8859-1
  2557.  
  2558.  
  2559. The Adobe Minion MM Swash Italic font program has the same axes and val-
  2560. ues.  This shows how "[0]" in the ADD_STYLE_NAME field can coexist with
  2561. other words.
  2562.  
  2563.      Name:
  2564.       -Adobe-Minion MM-0-I-0-Swash[0]-0-0-0-0-P-0-ISO8859-1
  2565.      AXIS_NAMES:
  2566.       Weight, Width, Optical size
  2567.      AXIS_LIMITS:
  2568.       345, 620, 450, 600, 6, 72
  2569.  
  2570.  
  2571.  
  2572.                    36
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578. X Logical Font Description Conventions            X11, Release 6.4
  2579.  
  2580.  
  2581.      AXIS_TYPES:
  2582.       Adobe-Weight, Adobe-Width, Adobe-OpticalSize
  2583.      Sample derived instance:
  2584.       -Adobe-Minion MM-550-I-480-Swash[18]-*-180-100-100-P-*-ISO8859-1
  2585.  
  2586.  
  2587. The XYZ Abc font, a hypothetical font, has optical size and x-height
  2588. axes.  This shows how there can be more than one polymorphic value in
  2589. the ADD_STYLE_NAME field.
  2590.  
  2591.      Name:
  2592.       -XYZ-Abc-Medium-R-Normal-[0 0]-0-0-0-0-P-0-ISO8859-1
  2593.      AXIS_NAMES:
  2594.       Optical size, X-height
  2595.      AXIS_LIMITS:
  2596.       6, 72, 400, 600
  2597.      AXIS_TYPES:
  2598.       XYZ-OpticalSize, XYZ-Xheight
  2599.      Sample derived instance:
  2600.       -XYZ-Abc-Medium-R-Normal-[14 510]-*-140-100-100-P-*-ISO8859-1
  2601.  
  2602.  
  2603. If an axis allows negative values, a client requests a negative value by
  2604. using "~" (TILDE) as a minus sign.
  2605.  
  2606. Axis types can be registered with the X Consortium, along with their
  2607. semantics.
  2608.  
  2609. If a font name that contains the polymorphic value or a wildcard in a
  2610. polymorphic field is presented to a font source, the font source is free
  2611. to substitute any value that is convenient.  However, font sources
  2612. should try to use a value that would be considered normal or medium for
  2613. the particular font.  For example, if an optical size variable is unre-
  2614. solved, the font source should provide a value appropriate to the size
  2615. of the font.
  2616.  
  2617. The result of specifying an out-of-range value for a polymorphic field
  2618. is undefined.  The font source may treat this as a BadName error, treat
  2619. the value as if it were the closest legal value, or extrapolate to try
  2620. to accommodate the value.
  2621.  
  2622. 7.  Affected Elements of Xlib and the X Protocol
  2623.  
  2624. The following X protocol requests must support the XLFD conventions:
  2625.  
  2626. o    OpenFont - for the name argument
  2627.  
  2628. o    ListFonts - for the pattern argument
  2629.  
  2630. o    ListFontsWithInfo - for the pattern argument
  2631.  
  2632. In addition, the following Xlib functions must support the XLFD conven-
  2633. tions:
  2634.  
  2635.  
  2636.  
  2637.  
  2638.                    37
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644. X Logical Font Description Conventions            X11, Release 6.4
  2645.  
  2646.  
  2647. o    XLoadFont - for the name argument
  2648.  
  2649. o    XListFontsWithInfo - for the pattern argument
  2650.  
  2651. o    XLoadQueryFont - for the name argument
  2652.  
  2653. o    XListFonts - for the pattern argument
  2654.  
  2655. 8.  BDF Conformance
  2656.  
  2657. The bitmap font distribution and interchange format adopted by the X
  2658. Consortium (BDF V2.1) provides a general mechanism for identifying the
  2659. font name of an X font and a variable list of font properties, but it
  2660. does not mandate the syntax or semantics of the font name or the seman-
  2661. tics of the font properties that might be provided in a BDF font.  This
  2662. section identifies the requirements for BDF fonts that conform to XLFD.
  2663.  
  2664. 8.1.  XLFD Conformance Requirements
  2665.  
  2666. A BDF font conforms to the XLFD specification if and only if the follow-
  2667. ing conditions are satisfied:
  2668.  
  2669. o    The value for the BDF item FONT conforms to the syntax and semantic
  2670.      definition of a XLFD FontName string.
  2671.  
  2672. o    The FontName begins with the X FontNameRegistry prefix: "-".
  2673.  
  2674. o    All XLFD FontName fields are defined.
  2675.  
  2676. o    Any FontProperties provided conform in name and semantics to the
  2677.      XLFD FontProperty definitions.
  2678.  
  2679. A simple method of testing for conformance would entail verifying that
  2680. the FontNameRegistry prefix is the string "-", that the number of field
  2681. delimiters in the string and coded field values are valid, and that each
  2682. font property name either matches a standard XLFD property name or fol-
  2683. lows the definition of a private property.
  2684.  
  2685. 8.2.  FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR
  2686.  
  2687. FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR are provided in the BDF
  2688. specification as properties that are moved to the XFontStruct by the BDF
  2689. font compiler in generating the X server-specific binary font encoding.
  2690. If present, these properties shall comply with the following semantic
  2691. definitions.
  2692.  
  2693. 8.2.1.    FONT_ASCENT
  2694.  
  2695. FONT_ASCENT is an integer value (of type INT32) that gives the recom-
  2696. mended typographic ascent above the baseline for determining interline
  2697. spacing.  Specific glyphs of the font may extend beyond this.  If the
  2698. current position point for line n is at [X,Y], then the origin of the
  2699. next line m = n + 1 (allowing for a possible font change) is [X, Y +
  2700. FONT_DESCENTn + FONT_ASCENTm].
  2701.  
  2702.  
  2703.  
  2704.                    38
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710. X Logical Font Description Conventions            X11, Release 6.4
  2711.  
  2712.  
  2713. FONT_ASCENT can be approximated if not provided as a font property,
  2714. according to the following algorithm:
  2715.  
  2716.  
  2717.      if (FONT_ASCENT undefined) then
  2718.     FONT_ASCENT = maximum ascent
  2719.  
  2720. where maximum ascent is the maximum ascent (above the baseline) in pix-
  2721. els of any glyph in the font.
  2722.  
  2723. 8.2.2.    FONT_DESCENT
  2724.  
  2725. FONT_DESCENT is an integer value (of type INT32) that gives the recom-
  2726. mended typographic descent below the baseline for determining interline
  2727. spacing.  Specific glyphs of the font may extend beyond this.  If the
  2728. current position point for line n is at [X,Y], then the origin of the
  2729. next line m = n+1 (allowing for a possible font change) is [X, Y +
  2730. FONT_DESCENTn + FONT_ASCENTm].
  2731.  
  2732. The logical extent of the font is inclusive between the Y-coordinate
  2733. values: Y - FONT_ASCENT and Y + FONT_DESCENT + 1.
  2734.  
  2735. FONT_DESCENT can be approximated if not provided as a font property,
  2736. according to the following algorithm:
  2737.  
  2738.  
  2739.      if (FONT_DESCENT undefined) then
  2740.     FONT_DESCENT = maximum descent
  2741.  
  2742. where maximum descent is the maximum descent (below the baseline) in
  2743. pixels of any glyph in the font.
  2744.  
  2745. 8.2.3.    DEFAULT_CHAR
  2746.  
  2747. The DEFAULT_CHAR is an unsigned integer value (of type CARD32) that
  2748. specifies the index of the default character to be used by the X server
  2749. when an attempt is made to display an undefined or nonexistent character
  2750. in the font.  (For a font using a 2-byte matrix format, the index bytes
  2751. are encoded in the integer as byte1 * 65536 + byte2.)  If the
  2752. DEFAULT_CHAR itself specifies an undefined or nonexistent character in
  2753. the font, then no display is performed.
  2754.  
  2755. DEFAULT_CHAR cannot be approximated if not provided as a font property.
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.                    39
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776. X Logical Font Description Conventions            X11, Release 6.4
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.                    40
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.                Table of Contents
  2846.  
  2847.  
  2848. 1. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . .   1
  2849. 2. Requirements and Goals  . . . . . . . . . . . . . . . . . . . . .   1
  2850. 2.1. Provide Unique and Descriptive Font Names . . . . . . . . . . .   2
  2851. 2.2. Support Multiple Font Vendors and Character Sets  . . . . . . .   2
  2852. 2.3. Support Scalable and Polymorphic Fonts  . . . . . . . . . . . .   2
  2853. 2.4. Support Transformations and Subsetting of Fonts . . . . . . . .   2
  2854. 2.5. Be Independent of X Server and Operating or File System
  2855. Implementations  . . . . . . . . . . . . . . . . . . . . . . . . . .   2
  2856. 2.6. Support Arbitrarily Complex Font Matching and Substitution
  2857.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3
  2858. 2.7. Be Extensible . . . . . . . . . . . . . . . . . . . . . . . . .   3
  2859. 3. X Logical Font Description  . . . . . . . . . . . . . . . . . . .   3
  2860. 3.1. FontName  . . . . . . . . . . . . . . . . . . . . . . . . . . .   3
  2861. 3.1.1. FontName Syntax . . . . . . . . . . . . . . . . . . . . . . .   4
  2862. 3.1.2. FontName Field Definitions  . . . . . . . . . . . . . . . . .   5
  2863. 3.1.2.1. FOUNDRY Field . . . . . . . . . . . . . . . . . . . . . . .   5
  2864. 3.1.2.2. FAMILY_NAME Field . . . . . . . . . . . . . . . . . . . . .   6
  2865. 3.1.2.3. WEIGHT_NAME Field . . . . . . . . . . . . . . . . . . . . .   6
  2866. 3.1.2.4. SLANT Field . . . . . . . . . . . . . . . . . . . . . . . .   7
  2867. 3.1.2.5. SETWIDTH_NAME Field . . . . . . . . . . . . . . . . . . . .   7
  2868. 3.1.2.6. ADD_STYLE_NAME Field  . . . . . . . . . . . . . . . . . . .   8
  2869. 3.1.2.7. PIXEL_SIZE Field  . . . . . . . . . . . . . . . . . . . . .   8
  2870. 3.1.2.8. POINT_SIZE Field  . . . . . . . . . . . . . . . . . . . . .   8
  2871. 3.1.2.9. RESOLUTION_X and RESOLUTION_Y Fields  . . . . . . . . . . .   9
  2872. 3.1.2.10. SPACING Field  . . . . . . . . . . . . . . . . . . . . . .   9
  2873. 3.1.2.11. AVERAGE_WIDTH Field  . . . . . . . . . . . . . . . . . . .  10
  2874. 3.1.2.12. CHARSET_REGISTRY and CHARSET_ENCODING Fields . . . . . . .  10
  2875. 3.1.3. Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .  12
  2876. 3.2. Font Properties . . . . . . . . . . . . . . . . . . . . . . . .  13
  2877. 3.2.1. FOUNDRY . . . . . . . . . . . . . . . . . . . . . . . . . . .  14
  2878. 3.2.2. FAMILY_NAME . . . . . . . . . . . . . . . . . . . . . . . . .  14
  2879. 3.2.3. WEIGHT_NAME . . . . . . . . . . . . . . . . . . . . . . . . .  14
  2880. 3.2.4. SLANT . . . . . . . . . . . . . . . . . . . . . . . . . . . .  15
  2881. 3.2.5. SETWIDTH_NAME . . . . . . . . . . . . . . . . . . . . . . . .  15
  2882. 3.2.6. ADD_STYLE_NAME  . . . . . . . . . . . . . . . . . . . . . . .  15
  2883. 3.2.7. PIXEL_SIZE  . . . . . . . . . . . . . . . . . . . . . . . . .  15
  2884. 3.2.8. POINT_SIZE  . . . . . . . . . . . . . . . . . . . . . . . . .  16
  2885. 3.2.9. RESOLUTION_X  . . . . . . . . . . . . . . . . . . . . . . . .  16
  2886. 3.2.10. RESOLUTION_Y . . . . . . . . . . . . . . . . . . . . . . . .  16
  2887. 3.2.11. SPACING  . . . . . . . . . . . . . . . . . . . . . . . . . .  17
  2888. 3.2.12. AVERAGE_WIDTH  . . . . . . . . . . . . . . . . . . . . . . .  17
  2889. 3.2.13. CHARSET_REGISTRY . . . . . . . . . . . . . . . . . . . . . .  17
  2890. 3.2.14. CHARSET_ENCODING . . . . . . . . . . . . . . . . . . . . . .  17
  2891. 3.2.15. MIN_SPACE  . . . . . . . . . . . . . . . . . . . . . . . . .  17
  2892. 3.2.16. NORM_SPACE . . . . . . . . . . . . . . . . . . . . . . . . .  18
  2893. 3.2.17. MAX_SPACE  . . . . . . . . . . . . . . . . . . . . . . . . .  18
  2894. 3.2.18. END_SPACE  . . . . . . . . . . . . . . . . . . . . . . . . .  18
  2895. 3.2.19. AVG_CAPITAL_WIDTH  . . . . . . . . . . . . . . . . . . . . .  18
  2896. 3.2.20. AVG_LOWERCASE_WIDTH  . . . . . . . . . . . . . . . . . . . .  19
  2897. 3.2.21. QUAD_WIDTH . . . . . . . . . . . . . . . . . . . . . . . . .  19
  2898. 3.2.22. FIGURE_WIDTH . . . . . . . . . . . . . . . . . . . . . . . .  20
  2899.  
  2900.  
  2901.  
  2902.                     i
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908. X Logical Font Description Conventions            X11, Release 6.4
  2909.  
  2910.  
  2911. 3.2.23. SUPERSCRIPT_X  . . . . . . . . . . . . . . . . . . . . . . .  20
  2912. 3.2.24. SUPERSCRIPT_Y  . . . . . . . . . . . . . . . . . . . . . . .  20
  2913. 3.2.25. SUBSCRIPT_X  . . . . . . . . . . . . . . . . . . . . . . . .  21
  2914. 3.2.26. SUBSCRIPT_Y  . . . . . . . . . . . . . . . . . . . . . . . .  21
  2915. 3.2.27. SUPERSCRIPT_SIZE . . . . . . . . . . . . . . . . . . . . . .  21
  2916. 3.2.28. SUBSCRIPT_SIZE . . . . . . . . . . . . . . . . . . . . . . .  22
  2917. 3.2.29. SMALL_CAP_SIZE . . . . . . . . . . . . . . . . . . . . . . .  22
  2918. 3.2.30. UNDERLINE_POSITION . . . . . . . . . . . . . . . . . . . . .  22
  2919. 3.2.31. UNDERLINE_THICKNESS  . . . . . . . . . . . . . . . . . . . .  22
  2920. 3.2.32. STRIKEOUT_ASCENT . . . . . . . . . . . . . . . . . . . . . .  23
  2921. 3.2.33. STRIKEOUT_DESCENT  . . . . . . . . . . . . . . . . . . . . .  23
  2922. 3.2.34. ITALIC_ANGLE . . . . . . . . . . . . . . . . . . . . . . . .  23
  2923. 3.2.35. CAP_HEIGHT . . . . . . . . . . . . . . . . . . . . . . . . .  24
  2924. 3.2.36. X_HEIGHT . . . . . . . . . . . . . . . . . . . . . . . . . .  24
  2925. 3.2.37. RELATIVE_SETWIDTH  . . . . . . . . . . . . . . . . . . . . .  25
  2926. 3.2.38. RELATIVE_WEIGHT  . . . . . . . . . . . . . . . . . . . . . .  25
  2927. 3.2.39. WEIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . .  26
  2928. 3.2.40. RESOLUTION . . . . . . . . . . . . . . . . . . . . . . . . .  27
  2929. 3.2.41. FONT . . . . . . . . . . . . . . . . . . . . . . . . . . . .  27
  2930. 3.2.42. FACE_NAME  . . . . . . . . . . . . . . . . . . . . . . . . .  27
  2931. 3.2.43. FULL_NAME  . . . . . . . . . . . . . . . . . . . . . . . . .  27
  2932. 3.2.44. COPYRIGHT  . . . . . . . . . . . . . . . . . . . . . . . . .  27
  2933. 3.2.45. NOTICE . . . . . . . . . . . . . . . . . . . . . . . . . . .  28
  2934. 3.2.46. DESTINATION  . . . . . . . . . . . . . . . . . . . . . . . .  28
  2935. 3.2.47. FONT_TYPE  . . . . . . . . . . . . . . . . . . . . . . . . .  28
  2936. 3.2.48. FONT_VERSION . . . . . . . . . . . . . . . . . . . . . . . .  29
  2937. 3.2.49. RASTERIZER_NAME  . . . . . . . . . . . . . . . . . . . . . .  29
  2938. 3.2.50. RASTERIZER_VERSION . . . . . . . . . . . . . . . . . . . . .  30
  2939. 3.2.51. RAW_ASCENT . . . . . . . . . . . . . . . . . . . . . . . . .  30
  2940. 3.2.52. RAW_DESCENT  . . . . . . . . . . . . . . . . . . . . . . . .  30
  2941. 3.2.53. RAW_*  . . . . . . . . . . . . . . . . . . . . . . . . . . .  30
  2942. 3.2.54. AXIS_NAMES . . . . . . . . . . . . . . . . . . . . . . . . .  30
  2943. 3.2.55. AXIS_LIMITS  . . . . . . . . . . . . . . . . . . . . . . . .  30
  2944. 3.2.56. AXIS_TYPES . . . . . . . . . . . . . . . . . . . . . . . . .  30
  2945. 3.3. Built-in Font Property Atoms  . . . . . . . . . . . . . . . . .  30
  2946. 4. Matrix Transformations  . . . . . . . . . . . . . . . . . . . . .  31
  2947. 4.1. Metrics and Font Properties . . . . . . . . . . . . . . . . . .  32
  2948. 5. Scalable Fonts  . . . . . . . . . . . . . . . . . . . . . . . . .  33
  2949. 6. Polymorphic Fonts . . . . . . . . . . . . . . . . . . . . . . . .  35
  2950. 7. Affected Elements of Xlib and the X Protocol  . . . . . . . . . .  37
  2951. 8. BDF Conformance . . . . . . . . . . . . . . . . . . . . . . . . .  38
  2952. 8.1. XLFD Conformance Requirements . . . . . . . . . . . . . . . . .  38
  2953. 8.2. FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR . . . . . . . . . .  38
  2954. 8.2.1. FONT_ASCENT . . . . . . . . . . . . . . . . . . . . . . . . .  38
  2955. 8.2.2. FONT_DESCENT  . . . . . . . . . . . . . . . . . . . . . . . .  39
  2956. 8.2.3. DEFAULT_CHAR  . . . . . . . . . . . . . . . . . . . . . . . .  39
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.                    ii
  2969.  
  2970.  
  2971.