1056N/A━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1056N/A Configuring the core X11 fonts system
1056N/A The ClearlyU Unicode font family
1056N/A The Bigelow & Holmes Luxi family
1056N/A Core fonts and internationalisation
1056N/A Additional notes about scalable core fonts
1056N/AAppendix: background and terminology
1056N/A Font files, fonts, and XLFD
1276N/AThis document describes the support for fonts in X11R7.7. Installing fonts is
1276N/Aaimed at the casual user wishing to install fonts in X11R7.7 the rest of the
1056N/Adocument describes the font support in more detail.
1056N/AWe assume some familiarity with digital fonts. If anything is not clear to you,
1276N/Aplease consult Appendix: background and terminology at the end of this document
1056N/AX11 includes two font systems: the original core X11 fonts system, which is
1056N/Apresent in all implementations of X11, and the Xft fonts system, which may not
1056N/Ayet be distributed with implementations of X11 that are not based on either
1056N/AXFree86 or X11R6.8 or later.
1056N/AThe core X11 fonts system is directly derived from the fonts system included
1056N/Awith X11R1 in 1987, which could only use monochrome bitmap fonts. Over the
1056N/Ayears, it has been more or less happily coerced into dealing with scalable
1056N/AXft was designed from the start to provide good support for scalable fonts, and
1056N/Ato do so efficiently. Unlike the core fonts system, it supports features such
1056N/Aas anti-aliasing and sub-pixel rasterisation. Perhaps more importantly, it
1056N/Agives applications full control over the way glyphs are rendered, making fine
1056N/Atypesetting and WYSIWIG display possible. Finally, it allows applications to
1056N/Ause fonts that are not installed system-wide for displaying documents with
1056N/AXft is not compatible with the core fonts system: usage of Xft requires fairly
1056N/Aextensive changes to toolkits (user-interface libraries). While
X.Org will
1056N/Acontinue to maintain the core fonts system, toolkit authors are encouraged to
1056N/Aswitch to Xft as soon as possible.
1056N/AThis section explains how to configure both Xft and the core fonts system to
1056N/Aaccess newly-installed fonts.
1056N/AXft has no configuration mechanism itself, it relies upon the fontconfig
1056N/Alibrary to configure and customise fonts. That library is not specific to the X
1056N/AWindow system, and does not rely on any particular font output mechanism.
1056N/AFontconfig looks for fonts in a set of well-known directories that include all
1276N/Aas well as a directory called “.fonts/” in the user's home directory.
1056N/AInstalling a font for use by Xft applications is as simple as copying a font
1056N/Afile into one of these directories.
1056N/AFontconfig will notice the new font at the next opportunity and rebuild its
1056N/Alist of fonts. If you want to trigger this update from the command line, you
1276N/Amay run the command “fc-cache”.
1056N/AIn order to globally update the system-wide Fontconfig information on Unix
1056N/Asystems, you will typically need to run this command as root:
1056N/AFontconfig's behaviour is controlled by a set of configuration files: a
1276N/A“FONTCONFIG_FILE” environment variable).
1056N/AEvery Fontconfig configuration file must start with the following boilerplate:
1056N/AIn addition, every Fontconfig configuration file must end with the following
1276N/AThe default Fontconfig configuration file includes the directory “˜/.fonts/” in
1056N/Athe list of directories searched for font files, and this is where
1056N/Auser-specific font files should be installed. In the unlikely case that a new
1056N/Afont directory needs to be added, this can be done with the following syntax:
1056N/AAnother useful option is the ability to disable anti-aliasing (font smoothing)
1056N/Afor selected fonts. This can be done with the following syntax:
1056N/A <test qual="any" name="family">
1056N/A <string>Lucida Console</string>
1056N/A <edit name="antialias" mode="assign">
1056N/AAnti-aliasing can be disabled for all fonts by the following incantation:
1056N/A <edit name="antialias" mode="assign">
1276N/AXft supports sub-pixel rasterisation on LCD displays. X11R7.7 should
1056N/Aautomatically enable this feature on laptops and when using an LCD monitor
1056N/Aconnected with a DVI cable; you can check whether this was done by typing
1056N/A$ xdpyinfo -ext RENDER | grep sub-pixel
1056N/AIf this doesn't print anything, you will need to configure Render for your
1056N/Aparticular LCD hardware manually; this is done with the following syntax:
1056N/A <edit name="rgba" mode="assign">
1276N/AThe string “rgb” within the “<const>”...“</const>” specifies the order of pixel
1056N/Acomponents on your display, and should be changed to match your hardware; it
1276N/Acan be one of “rgb” (normal LCD screen), “bgr” (backwards LCD screen), “vrgb”
1276N/A(LCD screen rotated clockwise) or “vbgr” (LCD screen rotated counterclockwise).
1056N/AA growing number of applications use Xft in preference to the core fonts
1056N/Asystem. Some applications, however, need to be explicitly configured to use
1276N/AA case in point is XTerm, which can be set to use Xft by using the “-fa”
1276N/Acommand line option or by setting the “XTerm*faceName” resource:
1276N/AFor KDE applications, you should select “Anti-alias fonts” in the “Fonts” panel
1276N/Aof KDE's “Control Center”. Note that this option is misnamed: it switches KDE
1276N/Ato using Xft but doesn't enable anti-aliasing in case it was disabled by your
1056N/AGnome applications and Mozilla Firefox will use Xft by default.
1056N/AConfiguring the core X11 fonts system
1056N/AInstalling fonts in the core system is a two step process. First, you need to
1056N/Acreate a font directory that contains all the relevant font files as well as
1056N/Asome index files. You then need to inform the X server of the existence of this
1056N/Anew directory by including it in the font path.
1276N/AThe X11R7.7 server can use bitmap fonts in both the cross-platform BDF format
1276N/Aand the somewhat more efficient binary PCF format. (X11R7.7 also supports the
1056N/ABitmap fonts are normally distributed in the BDF format. Before installing such
1056N/Afonts, it is desirable (but not absolutely necessary) to convert the font files
1276N/Ato the PCF format. This is done by using the command “bdftopcf”,
e.g. 1276N/AYou may then want to compress the resulting PCF font files:
1056N/AAfter the fonts have been converted, you should copy all the font files that
1276N/Athe command “mkfontdir” (please see the mkfontdir(1) manual page for more
1056N/AAll that remains is to tell the X server about the existence of the new font
1276N/Adirectory; see Setting the server's font path below.
1276N/AThe X11R7.7 server supports scalable fonts in multiple formats, including
1056N/Asupport for the Speedo and CID scalable font formats, but that is not included
1056N/AInstalling scalable fonts is very similar to installing bitmap fonts: you
1276N/Acreate a directory with the font files, and run “mkfontdir” to create an index
1276N/AThere is, however, a big difference: “mkfontdir” cannot automatically recognise
1056N/Ascalable font files. For that reason, you must first index all the font files
1276N/Aby using the “mkfontscale” utility.
1056N/Agenerated by mkfontscale; for more information, please see the mkfontdir(1) and
1056N/Amkfontscale(1) manual pages and Core fonts and internationalisation later in
1056N/AThe CID-keyed font format was designed by Adobe Systems for fonts with large
1056N/Acharacter sets. The CID-keyed format is obsolete, as it has been superseded by
1056N/ASetting the server's font path
1056N/AThe list of directories where the server looks for fonts is known as the font
1056N/Apath. Informing the server of the existence of a new font directory consists of
1056N/Aputting it on the font path.
1056N/AThe font path is an ordered list; if a client's request matches multiple fonts,
1056N/Athe first one in the font path is the one that gets used. When matching fonts,
1056N/Athe server makes two passes over the font path: during the first pass, it
1056N/Asearches for an exact match; during the second, it searches for fonts suitable
1056N/AFor best results, scalable fonts should appear in the font path before the
1056N/Abitmap fonts; this way, the server will prefer bitmap fonts to scalable fonts
1056N/Awhen an exact match is possible, but will avoid scaling bitmap fonts when a
1276N/Ascalable font can be used. (The “:unscaled” hack, while still supported, should
1276N/Ano longer be necessary in X11R7.7.)
1056N/AYou may check the font path of the running server by typing the command
1056N/AFont path catalogue directories
1056N/AYou can specify a special kind of font path directory in the form catalogue:
1056N/A<dir>. The directory specified after the catalogue: prefix will be scanned for
1056N/Asymlinks and each symlink destination will be added as a local font path entry.
1056N/AThe symlink can be suffixed by attributes such as 'unscaled', which will be
1056N/Apassed through to the underlying font path entry. The only exception is the
1056N/Anewly introduced 'pri' attribute, which will be used for ordering the font
1056N/Apaths specified by the symlinks.
1056N/Aattribute unscaled. This is functionally equivalent to setting the following
1056N/ATemporary modification of the font path
1276N/AThe “xset” utility may be used to modify the font path for the current session.
1056N/AThe font path is set with the command xset fp; a new element is added to the
1056N/Afront with xset +fp, and added to the end with xset fp+. For example,
1276N/AConversely, an element may be removed from the front of the font path with “
1276N/Axset -fp”, and removed from the end with “xset fp-”. You may reset the font
1276N/Apath to its default value with “xset fp default”.
1056N/AFor more information, please consult the xset(1) manual page.
1056N/APermanent modification of the font path
1276N/AThe default font path (the one used just after server startup or after “xset fp
1276N/Adefault”) may be specified in the X server's “
xorg.conf” file. It is computed
1276N/Aby appending all the directories mentioned in the “FontPath” entries of the
1276N/A“Files” section in the order in which they appear. If no font path is specified
1056N/Ain a config file, the server uses a default value specified when it was built.
1056N/AIf you seem to be unable to use some of the fonts you have installed, the first
1276N/Athing to check is that the “
fonts.dir” files are correct and that they are
1056N/Areadable by the server (the X server usually runs as root, beware of
1056N/ANFS-mounted font directories). If this doesn't help, it is quite possible that
1056N/Ayou are trying to use a font in a format that is not supported by your server.
1276N/AX11R7.7 supports the BDF, PCF, SNF, Type 1, TrueType, and OpenType font
1276N/Aformats. However, not all X11R7.7 servers come with all the font backends
1276N/AOn most platforms, the X11R7.7 servers no longer uses font backends from
1056N/Amodules that are loaded at runtime. The built in font support corresponds to
1056N/Athe functionality formerly provided by these modules:
1276N/A ● "bitmap": bitmap fonts (“*.bdf”, “*.pcf” and “*.snf”);
1276N/A ● "freetype": TrueType fonts (“*.ttf” and “*.ttc”), OpenType fonts (“*.otf”
1276N/A and “*.otc”) and Type 1 fonts (“*.pfa” and “*.pfb”).
1056N/AThe Sample Implementation of X11 (SI) comes with a large number of bitmap
1276N/Afonts, including the “fixed” family, and bitmap versions of Courier, Times,
1056N/AHelvetica and some members of the Lucida family.
1276N/AIn X11R7.7, a number of these fonts are provided in Unicode-encoded font files
1056N/Anow. At build time, these fonts are split into font files encoded according to
1056N/Alegacy encodings, a process which allows us to provide the standard fonts in a
1056N/Anumber of regional encodings with no duplication of work.
1056N/A-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
1276N/Ais a Unicode-encoded version of the standard “fixed” font with added support
1056N/Afor the Latin, Greek, Cyrillic, Georgian, Armenian, IPA and other scripts plus
1056N/Anumerous technical symbols. It contains over 2800 glyphs, covering all
1056N/Acharacters of ISO 8859 parts 1-5, 7-10, 13-15, as well as all European IBM and
1056N/AMicrosoft code pages, KOI8, WGL4, and the repertoires of many other character
1056N/AThis font is used at build time for generating the font files
1056N/A-misc-fixed-medium-r-normal--13-120-75-75-c-60-iso8859-1
1056N/A-misc-fixed-medium-r-normal--13-120-75-75-c-60-iso8859-15
1056N/A-misc-fixed-medium-r-normal--13-120-75-75-c-60-koi8-r
1276N/AThe standard short name “fixed” is normally an alias for
1056N/A-misc-fixed-medium-r-normal--13-120-75-75-c-60-iso8859-1
1056N/AThe ClearlyU Unicode font family
1056N/AThe ClearlyU family of fonts provides a set of 12 pt, 100 dpi proportional
1056N/Afonts with many of the glyphs needed for Unicode text. Together, the fonts
1056N/Acontain approximately 7500 glyphs.
1056N/AThe main ClearlyU font has the XLFD
1056N/A-mutt-clearlyu-medium-r-normal--17-120-100-100-p-101-iso10646-1
1056N/Aand resides in the font file
1056N/AAdditional ClearlyU fonts include
1056N/A-mutt-clearlyu alternate glyphs-medium-r-normal--17-120-100-100-p-91-iso10646-1
1056N/A-mutt-clearlyu pua-medium-r-normal--17-120-100-100-p-111-iso10646-1
1056N/A-mutt-clearlyu arabic extra-medium-r-normal--17-120-100-100-p-103-fontspecific-0
1056N/A-mutt-clearlyu ligature-medium-r-normal--17-120-100-100-p-141-fontspecific-0
1056N/AThe Alternate Glyphs font contains additional glyph shapes that are needed for
1056N/Acertain languages. A second alternate glyph font will be provided later for
1056N/Acases where a character has more than one commonly used alternate shape (
e.g. 1056N/AThe PUA font contains extra glyphs that are useful for certain rendering
1056N/AThe Arabic Extra font contains the glyphs necessary for characters that don't
1056N/Ahave all of their possible shapes encoded in ISO 10646. The glyphs are roughly
1056N/Aordered according to the order of the characters in the ISO 10646 standard.
1056N/AThe Ligature font contains ligatures for various scripts that may be useful for
1056N/Aimproved presentation of text.
1276N/AX11R7.7 includes all the scalable fonts distributed with X11R6.
1056N/AThe IBM Courier set of fonts cover ISO 8859-1 and ISO 8859-2 as well as Adobe
1056N/AStandard Encoding. These fonts have XLFD
1056N/A-adobe-courier-medium-*-*--0-0-0-0-m-0-*-*
1056N/Aand reside in the font files
1056N/AThe Adobe Utopia set of fonts only cover ISO 8859-1 as well as Adobe Standard
1056N/AEncoding. These fonts have XLFD
1056N/A-adobe-utopia-*-*-normal--0-0-0-0-p-0-iso8859-1
1056N/Aand reside in the font files
1276N/AFinally, X11R7.7 also comes with Type 1 versions of Bitstream Courier and
1056N/ACharter. These fonts have XLFD
1056N/A-bitstream-courier-*-*-normal--0-0-0-0-m-0-iso8859-1
1056N/A-bitstream-charter-*-*-normal--0-0-0-0-p-0-iso8859-1
1056N/Aand reside in the font files
1056N/AThe Bigelow & Holmes Luxi family
1276N/AX11R7.7 includes the Luxi family of scalable fonts, in both TrueType and Type 1
1056N/Aformat. This family consists of the fonts Luxi Serif, with XLFD
1056N/A-b&h-luxi serif-medium-*-normal--*-*-*-*-p-*-*-*
1056N/A-b&h-luxi sans-medium-*-normal--*-*-*-*-p-*-*-*
1056N/A-b&h-luxi mono-medium-*-normal--*-*-*-*-m-*-*-*
1056N/AEach of these fonts comes Roman, oblique, bold and bold oblique variants The
1056N/ATrueType version have glyphs covering the basic ASCII Unicode range, the
1056N/ALatin 1 range, as well as the Extended Latin range and some additional
1056N/Apunctuation characters. In particular, these fonts include all the glyphs
1056N/Aneeded for ISO 8859 parts 1, 2, 3, 4, 9, 13 and 15, as well as all the glyphs
1056N/Ain the Adobe Standard encoding and the Windows 3.1 character set.
1056N/AThe glyph coverage of the Type 1 versions is somewhat reduced, and only covers
1056N/AISO 8859 parts 1, 2 and 15 as well as the Adobe Standard encoding.
1056N/AThe Luxi fonts are original designs by Kris Holmes and Charles Bigelow. Luxi
1056N/Afonts include seriffed, sans serif, and monospaced styles, in roman and
1056N/Aoblique, and normal and bold weights. The fonts share stem weight, x-height,
1056N/Acapital height, ascent and descent, for graphical harmony.
1056N/AThe character width metrics of Luxi roman and bold fonts match those of core
1056N/Afonts bundled with popular operating and window systems.
1056N/Aas well as in the License document.
1056N/ACharles Bigelow and Kris Holmes from Bigelow and Holmes Inc. developed the Luxi
1056N/Atypeface designs in Ikarus digital format.
1056N/AURW++ Design and Development GmbH converted the Ikarus format fonts to TrueType
1056N/Aand Type1 font programs and implemented the grid-fitting "hints" and kerning
1056N/AFor more information, please contact <design@bigelowandholmes.com> or <
1056N/Ainfo@urwpp.de>, or consult the URW++ web site.
1056N/AAn earlier version of the Luxi fonts was made available under the name Lucidux.
1056N/AThis name should no longer be used due to trademark uncertainties, and all
1276N/Atraces of the Lucidux name have been removed from X11R7.7.
1276N/AThis section describes XFree86-created enhancements to the core X11 fonts
1056N/ACore fonts and internationalisation
1056N/AThe scalable font backends (Type 1 and TrueType) can automatically re-encode
1276N/Afonts to the encoding specified in the XLFD in “
fonts.dir”. For example, a
1056N/Awhich will lead to the font being recoded to ISO 8859-1 and ISO 8859-2
1056N/ATwo of the scalable backends (Type 1 and the FreeType TrueType backend) use a
1056N/Acommon fontenc layer for font re-encoding. This allows these backends to share
1056N/Atheir encoding data, and allows simple configuration of new locales
1276N/APlease note: the X-TrueType (X-TT) backend is not included in X11R7.7. That
1276N/Afunctionality has been merged into the FreeType backend.
1056N/AIn the fontenc layer, an encoding is defined by a name (such as iso8859-1),
1056N/Apossibly a number of aliases (alternate names), and an ordered collection of
1056N/Amappings. A mapping defines the way the encoding can be mapped into one of the
1056N/Atarget encodings known to fontenc; currently, these consist of Unicode, Adobe
1276N/Aglyph names, and arbitrary TrueType “cmap”s.
1056N/AA number of encodings are hardwired into fontenc, and are therefore always
1056N/Aavailable; the hardcoded encodings cannot easily be redefined. These include:
1056N/A ● iso8859-1: ISO Latin-1 (Western Europe);
1056N/A ● iso8859-2: ISO Latin-2 (Eastern Europe);
1056N/A ● iso8859-3: ISO Latin-3 (Southern Europe);
1056N/A ● iso8859-4: ISO Latin-4 (Northern Europe);
1056N/A ● iso8859-9: ISO Latin-5 (Turkish);
1056N/A ● iso8859-10: ISO Latin-6 (Nordic);
1056N/A ● iso8859-15: ISO Latin-9, or Latin-0 (Revised Western-European);
1056N/A ● koi8-u: KOI8 Ukrainian (see RFC 2319);
1276N/A ● koi8-uni: KOI8 “Unified” (Russian, Ukrainian, and Byelorussian);
1276N/A ● koi8-e: KOI8 “European,” ISO-IR-111, or ECMA-Cyrillic;
1056N/A ● microsoft-symbol and apple-roman: these are only likely to be useful with
1056N/AAdditional encodings can be added by defining encoding files. When a font
1056N/Aencoding is requested that the fontenc layer doesn't know about, the backend
1056N/Achecks the directory in which the font file resides (not necessarily the
1056N/Afile is scanned for the requested encoding, and the relevant encoding
1276N/Adefinition file is read in. The “mkfontdir” utility, when invoked with the “-e”
1056N/Aoption followed by the name of a directory containing encoding files, can be
1056N/Amanual page for more details.
1276N/AA number of encoding files for common encodings are included with X11R7.7.
1276N/AInformation on writing new encoding files can be found in Format of encoding
1056N/Adirectory files and Format of encoding files later in this document.
1056N/ABackend-specific notes about fontenc
1056N/AFor TrueType and OpenType fonts, the FreeType backend scans the mappings in
1056N/Aorder. Mappings with a target of PostScript are ignored; mappings with a
1056N/ATrueType or Unicode target are checked against all the cmaps in the file. The
1056N/Afirst applicable mapping is used.
1056N/AFor Type 1 fonts, the FreeType backend first searches for a mapping with a
1056N/Atarget of PostScript. If one is found, it is used. Otherwise, the backend
1056N/Asearches for a mapping with target Unicode, which is then composed with a
1056N/Abuilt-in table mapping codes to glyph names. Note that this table only covers
1056N/Apart of the Unicode code points that have been assigned names by Adobe.
1056N/ASpecifying an encoding value of adobe-fontspecific for a Type 1 font disables
1056N/Athe encoding mechanism. This is useful with symbol and incorrectly encoded
1276N/Afonts (see Hints about using badly encoded fonts below).
1056N/AIf a suitable mapping is not found, the FreeType backend defaults to
1056N/AFormat of encoding directory files
1056N/AIn order to use a font in an encoding that the font backend does not know
1056N/Aspecifies the number of encodings, while every successive line has two columns,
1056N/Athe name of the encoding, and the name of the encoding file; this can be
1056N/Arelative to the current directory, or absolute. Every encoding name should
1056N/Aagree with the encoding name defined in the encoding file. For example,
1056N/AThe name of an encoding must be specified in the encoding file's
1056N/AIf your platform supports it (it probably does), encoding files may be
1056N/Asee the mkfontdir(1) manual page for more information.
1276N/AThe encoding files are “free form,”
i.e. any string of whitespace is equivalent
1276N/Ato a single space. Keywords are parsed in a non-case-sensitive manner, meaning
1276N/Athat “size”, “SIZE”, and “SiZE” all parse as the same keyword; on the other
1276N/Ahand, case is significant in glyph names.
1276N/ANumbers can be written in decimal, as in “256”, in hexadecimal, as in “0x100”,
1276N/AComments are introduced by a hash sign “#”. A “#” may appear at any point in a
1276N/Aline, and all characters following the “#” are ignored, up to the end of the
1056N/AThe encoding file starts with the definition of the name of the encoding, and
1056N/Apossibly its alternate names (aliases):
1056N/AThe name of the encoding and its aliases should be suitable for use in an XLFD
1276N/Afont name, and therefore contain exactly one dash “-”.
1056N/AThe encoding file may then optionally declare the size of the encoding. For a
1056N/Alinear encoding (such as ISO 8859-1), the SIZE line specifies the maximum code
1056N/AFor a matrix encoding, it should specify two numbers. The first is the number
1056N/Aof the last row plus one, the other, the highest column number plus one. In the
1276N/Acase of “jisx0208.1990-0” (JIS X 0208(1990), double-byte encoding, high bit
1276N/AIn the case of a matrix encoding, a “FIRSTINDEX” line may be included to
1276N/Aspecify the minimum glyph index in an encoding. The keyword “FIRSTINDEX” is
1056N/Afollowed by two integers, the minimum row number followed by the minimum column
1276N/AIn the case of a linear encoding, a “FIRSTINDEX” line is not very useful. If
1056N/Afor some reason however you chose to include on, it should be followed by a
1276N/ANote that in most font backends inclusion of a “FIRSTINDEX” line has the side
1056N/Aeffect of disabling default glyph generation, and this keyword should therefore
1056N/Abe avoided unless absolutely necessary.
1276N/ACodes outside the region defined by the “SIZE” and “FIRSTINDEX” lines are
1056N/Aunderstood to be undefined. Encodings default to linear encoding with a size of
1056N/A256 (0x100). This means that you must declare the size of all 16 bit encodings.
1056N/AWhat follows is one or more mapping sections. A mapping section starts with a
1276N/A“STARTMAPPING” line stating the target of the mapping. The target may be one
1056N/AEvery line in a mapping section maps one from the encoding being defined to the
1056N/Atarget of the mapping. In mappings with a Unicode or TrueType mapping, codes
1056N/AAs an abbreviation, it is possible to map a contiguous range of codes in a
1056N/Asingle line. A line consisting of three integers
1056N/Ais an abbreviation for the range of lines
1056N/ACodes not listed are assumed to map through the identity (
i.e. to the same
1056N/Anumerical value). In order to override this default mapping, you may specify a
1276N/Arange of codes to be undefined by using an “UNDEFINE” line:
1056N/APostScript mappings are different. Every line in a PostScript mapping maps a
1056N/Aand codes not explicitly listed are undefined.
1056N/AA mapping section ends with an ENDMAPPING line
1056N/AAfter all the mappings have been defined, the file ends with an ENDENCODING
1056N/AIn order to make future extensions to the format possible, lines starting with
1056N/Aan unknown keyword are silently ignored, as are mapping sections with an
1056N/AType 1 symbol fonts should be installed using the adobe-fontspecific encoding.
1056N/AIn an ideal world, all TrueType symbol fonts would be installed using one of
1056N/Athe microsoft-symbol and apple-roman encodings. A number of symbol fonts,
1056N/Ahowever, are not marked as such; such fonts should be installed using
1056N/Amicrosoft-cp1252, or, for older fonts, microsoft-win3.1.
1056N/AIn order to guarantee consistent results (especially between Type 1 and
1056N/ATrueType versions of the same font), it is possible to define a special
1056N/Aencoding for a given font. This has already been done for the ZapfDingbats
1056N/AHints about using badly encoded fonts
1056N/AA number of text fonts are incorrectly encoded. Incorrect encoding is sometimes
1056N/Adone by design, in order to make a font for an exotic script appear like an
1056N/Aordinary Western text font on systems which are not easily extended with new
1056N/Alocale data. It is often the result of the font designer's laziness or
1056N/Aincompetence; for some reason, most people seem to find it easier to invent
1056N/Aidiosyncratic glyph names rather than follow the Adobe glyph list.
1056N/AThere are two ways of dealing with such fonts: using them with the encoding
1056N/Athey were designed for, and creating an ad hoc encoding file.
1056N/AUsing fonts with the designer's encoding
1056N/AIn the case of Type 1 fonts, the font designer can specify a default encoding;
1276N/Athis encoding is requested by using the “adobe-fontspecific” encoding in the
1056N/AXLFD name. Sometimes, the font designer omitted to specify a reasonable default
1276N/Aencoding, in which case you should experiment with “adobe-standard”,
1276N/A“iso8859-1”, “microsoft-cp1252”, and “microsoft-win3.1”. (The encoding
1276N/A“microsoft-symbol” doesn't make sense for Type 1 fonts).
1056N/ATrueType fonts do not have a default encoding. However, most TrueType fonts are
1056N/Adesigned with either Microsoft or Apple platforms in mind, so one of
1276N/A“microsoft-symbol”, “microsoft-cp1252”, “microsoft-win3.1”, or “apple-roman”
1056N/Ashould yield reasonable results.
1056N/ASpecifying an ad hoc encoding file
1056N/AIt is always possible to define an encoding file to put the glyphs in a font in
1056N/ABy following the directions above, you will find yourself with a number of
1276N/Afonts with unusual names --- with encodings such as “adobe-fontspecific”,
1276N/A“microsoft-win3.1” etc. In order to use these fonts with standard applications,
1056N/Ait may be useful to remap them to their proper names.
1056N/Asimple: it consists of a series of lines each mapping an alias name to a font
1056N/A"-ogonki-alamakota-medium-r-normal--0-0-0-0-p-0-iso8859-2" \
1056N/A "-ogonki-alamakota-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific"
1056N/Amore precisely described in the mkfontdir(1) manual page.
1056N/AAdditional notes about scalable core fonts
1056N/AThe FreeType backend (formerly xfsft) is a backend based on version 2 of the
1056N/AFreeType library (see the FreeType web site) and has the X-TT functionalities
1056N/Afor CJKV support provided by the After X-TT Project (see the After X-TT Project
1276N/Aweb site). The FreeType backend has support for the “fontenc” style of
1276N/Ainternationalisation (see The fontenc layer). This backend supports TrueType
1276N/Afont files (“*.ttf”), OpenType font files (“*.otf”), TrueType Collections
1276N/A(“*.ttc”), OpenType Collections (“*.otc”) and Type 1 font files (“*.pfa” and
1056N/AIn order to access the faces in a TrueType Collection file, the face number
1056N/Amust be specified in the
fonts.dir file before the filename, within a pair of
1056N/Acolons, or by setting the 'fn' TTCap option. For example,
1276N/AThe new FreeType backend supports the extended “
fonts.dir” syntax introduced by
1276N/AX-TrueType with a number of options, collectively known as “TTCap”. A “TTCap”
1056N/Aentry follows the general syntax
1056N/Aand should be specified before the filename. The new FreeType almost perfectly
1056N/Asupports TTCap options that are compatible with X-TT 1.4. The Automatic Italic
1276N/A(“ai”), Double Strike (“ds”) and Bounding box Width (“bw”) options are
1056N/Aindispensable in CJKV. For example,
1056N/Ads=y:ai=0.2:
mincho.ttc -misc-mincho-bold-i-normal--0-0-0-0-c-0-jisx0208.1990-0
1056N/Abw=0.5:ds=y:
mincho.ttc -misc-mincho-bold-r-normal--0-0-0-0-c-0-jisx0201.1976-0
1056N/Abw=0.5:ai=0.2:
mincho.ttc -misc-mincho-medium-i-normal--0-0-0-0-c-0-jisx0201.1976-0
1056N/Abw=0.5:ds=y:ai=0.2:
mincho.ttc -misc-mincho-bold-i-normal--0-0-0-0-c-0-jisx0201.1976-0
1056N/Asetup the complete combination of jisx0208 and jisx0201 using
mincho.ttc only.
1056N/AMore information on the TTCap syntax is found on the After X-TT Project page.
1056N/AThe FreeType backend uses the fontenc layer in order to support recoding of
1276N/Afonts; this was described in The fontenc layer and especially The FreeType
1276N/Abackend earlier in this document.
1056N/AWhen loading a proportional fonts which contain a huge number of glyphs, the
1056N/Aold FreeType delayed glyph rasterisation until the time at which the glyph was
1276N/Afirst used. The new FreeType (libfreetype-xtt2) has an improved “very lazy”
1056N/Ametric calculation method to speed up the process when loading TrueType or
1056N/AOpenType fonts. Although the X-TT module also has this method, the "vl=y" TTCap
1056N/Aoption must be set if you want to use it. This is the default method for
1056N/AFreeType when it loads multi-byte fonts. Even if you use a unicode font which
1056N/Ahas tens of thousands of glyphs, this delay will not be worrisome as long as
1276N/Ayou use the new FreeType backend -- its “very lazy” method is super-fast.
1276N/AThe maximum error of bitmap position using “very lazy” method is 1 pixel, and
1056N/Ais the same as that of a character-cell spacing. When the X-TT backend is used
1276N/Awith the “vl=y” option, a chipped bitmap is displayed with certain fonts.
1056N/AHowever, the new FreeType backend has minimal problem with this, since it
1276N/Acorrects left- and right-side bearings using “italicAngle” in the TrueType/
1056N/AOpenType post table, and does automatic correction of bitmap positions when
1056N/Arasterisation so that chipped bitmaps are not displayed. Nevertheless if you
1276N/Adon't want to use the “very lazy” method when using multi-bytes fonts, set “vl=
1276N/An” in the TTCap option to disable it:
1056N/AOf course, both backends also support an optimisation for character-cell fonts
1056N/A(fonts with all glyph metrics equal, or terminal fonts). A font with an XLFD
1276N/Aspecifying a character-cell spacing “c”, as in
1056N/A-misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0
1056N/Awill not compute the metric for each glyph, but instead trust the font to be a
1056N/Acharacter-cell font. You are encouraged to make use of this optimisation when
1056N/Auseful, but be warned that not all monospaced fonts are character-cell fonts.
1056N/AAppendix: background and terminology
1056N/AA computer text-processing system inputs keystrokes and outputs glyphs, small
1056N/Apictures that are assembled on paper or on a computer screen. Keystrokes and
1056N/Aglyphs do not, in general, coincide: for example, if the system does generate
1056N/Aligatures, then to the sequence of two keystrokes <f><i> will typically
1056N/Acorrespond a single glyph. Similarly, if the system shapes Arabic glyphs in a
1056N/Avaguely reasonable manner, then multiple different glyphs may correspond to a
1056N/AThe complex transformation rules from keystrokes to glyphs are usually factored
1056N/Ainto two simpler transformations, from keystrokes to characters and from
1056N/Acharacters to glyphs. You may want to think of characters as the basic unit of
1056N/Atext that is stored
e.g. in the buffer of your text editor. While the
1056N/Adefinition of a character is intrinsically application-specific, a number of
1056N/Astandardised collections of characters have been defined.
1056N/AA coded character set is a set of characters together with a mapping from
1056N/Ainteger codes --- known as codepoints --- to characters. Examples of coded
1056N/Acharacter sets include US-ASCII, ISO 8859-1, KOI8-R, and JIS X 0208(1990).
1056N/AA coded character set need not use 8 bit integers to index characters. Many
1056N/Aearly systems used 6 bit character sets, while 16 bit (or more) character sets
1056N/Aare necessary for ideographic writing systems.
1056N/ATraditionally, typographers speak about typefaces and founts. A typeface is a
1056N/Aparticular style or design, such as Times Italic, while a fount is a
1056N/Amolten-lead incarnation of a given typeface at a given size.
1056N/ADigital fonts come in font files. A font file contains the information
1056N/Anecessary for generating glyphs of a given typeface, and applications using
1056N/Afont files may access glyph information in an arbitrary order.
1056N/ADigital fonts may consist of bitmap data, in which case they are said to be
1056N/Abitmap fonts. They may also consist of a mathematical description of glyph
1056N/Ashapes, in which case they are said to be scalable fonts. Common formats for
1056N/Ascalable font files are Type 1 (sometimes incorrectly called ATM fonts or
1056N/APostScript fonts), TrueType and OpenType.
1056N/AThe glyph data in a digital font needs to be indexed somehow. How this is done
1056N/Adepends on the font file format. In the case of Type 1 fonts, glyphs are
1056N/Aidentified by glyph names. In the case of TrueType fonts, glyphs are indexed by
1056N/Aintegers corresponding to one of a number of indexing schemes (usually Unicode
1056N/AThe X11 core fonts system uses the data in a font file to generate font
1056N/Ainstances, which are collections of glyphs at a given size indexed according to
1056N/AX11 core font instances are usually specified using a notation known as the X
1276N/ALogical Font Description (XLFD). An XLFD starts with a dash “-”, and consists
1056N/Aof fourteen fields separated by dashes, for example:
1056N/A-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
1276N/AOr particular interest are the last two fields “iso8859-1”, which specify the
1056N/AA scalable font is specified by an XLFD which contains zeroes instead of some
1056N/A-adobe-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1
1056N/AX11 font instances may also be specified by short name. Unlike an XLFD, a short
1056N/Aname has no structure and is simply a conventional name for a font instance.
1056N/ATwo short names are of particular interest, as the server will not start if
1276N/Afont instances with these names cannot be opened. These are “fixed”, which
1056N/Aspecifies the fallback font to use when the requested font cannot be opened,
1276N/Aand “cursor”, which specifies the set of glyphs to be used by the mouse
1276N/AShort names are usually implemented as aliases to XLFDs; the standard “fixed”
1276N/Aand “cursor” aliases are defined in
1056N/Auniquely identifying all characters for all scripts, current and historical.
1056N/AWhile Unicode was explicitly not designed as a glyph encoding scheme, it is
1056N/Aoften possible to use it as such.
1056N/AUnicode is an open character set, meaning that codepoint assignments may be
1056N/Aadded to Unicode at any time (once specified, though, an assignment can never
1056N/Abe changed). For this reason, a Unicode font will be sparse, meaning that it
1056N/Aonly defines glyphs for a subset of the character registry of Unicode.
1056N/AThe Unicode standard is defined in parallel with the international standard
1056N/AISO 10646. Assignments in the two standards are always equivalent, and we often
1056N/Ause the terms Unicode and ISO 10646 interchangeably.
1056N/AWhen used in the X11 core fonts system, Unicode-encoded fonts should have the
1276N/Alast two fields of their XLFD set to “iso10646-1”.
1276N/AX11R7.7 comes with extensive documentation in the form of manual pages and
1056N/Atypeset documents. Before installing fonts, you really should read the
1056N/Afontconfig(3) and mkfontdir(1) manual pages; other manual pages of interest
1056N/Ainclude X(7), Xserver(1), xset(1), Xft(3), xlsfonts(1) and showfont(1). In
1276N/Aaddition, you may want to read the X Logical Font Description document by Jim
1056N/AThe
comp.fonts FAQ, which is unfortunately no longer being maintained, contains
1056N/Aa wealth of information about digital fonts.
1276N/AXft and Fontconfig are described on the Fontconfig site.
1056N/AThe xfsft home page has been superseded by this document, and is now obsolete;
1056N/Ayou may however still find some of the information that it contains useful.
1276N/AJoerg Pommnitz' xfsft page is the canonical source for the “ttmkfdir” utility,
1056N/Awhich is the ancestor of mkfontscale.
1056N/AThe author's software pages might or might not contain related scribbles and
1056N/Adevelopment versions of software.
1056N/AThe documentation of X-TrueType is available from the After X-TT Project page.
1056N/AWhile the Unicode consortium site may be of interest, you are more likely to
1056N/Afind what you need in Markus Kuhn's UTF-8 and Unicode FAQ.
1276N/AThe IETF RFC documents, available from a number of sites throughout the world,
1056N/Aoften provide interesting information about character set issues; see for