1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml"><head><meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" /><title>Fonts in X11R7.7
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets Vsnapshot_9276" /><style xmlns=
"" type=
"text/css">/*
4 * Copyright (c)
2011 Gaetan Nadon
5 * Copyright (c)
2010, Oracle and/or its affiliates. All rights reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the
"Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
18 * THE SOFTWARE IS PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
28 * Shared stylesheet for X.Org documentation translated to HTML format
29 * http://www.sagehill.net/docbookxsl/UsingCSS.html
30 * http://www.w3schools.com/css/default.asp
31 * https://addons.mozilla.org/en-US/firefox/addon/web-developer/developers
32 * https://addons.mozilla.org/en-US/firefox/addon/font-finder/
36 * The sans-serif fonts are considered more legible on a computer screen
37 * http://dry.sailingissues.com/linux-equivalents-verdana-arial.html
41 font-family:
"Bitstream Vera Sans",
"DejaVu Sans", Tahoma, Geneva, Arial, Sans-serif;
42 /* In support of using
"em" font size unit, the w3c recommended method */
47 * Selection: all elements requiring mono spaced fonts.
49 * The family names attempt to match the proportionally spaced font
50 * family names such that the same font name is used for both.
51 * We'd like to use Bitstream, for example, in both proportionally and
52 * mono spaced font text.
70 font-family:
"Bitstream Vera Sans Mono",
"DejaVu Sans Mono", Courier,
"Liberation Mono", Monospace;
74 * Books have a title page, a preface, some chapters and appendices,
75 * a glossary, an index and a bibliography, in that order.
77 * An Article has no preface and no chapters. It has sections, appendices,
78 * a glossary, an index and a bibliography.
82 * Selection: book main title and subtitle
84 div.book
>div.titlepage h1.title,
85 div.book
>div.titlepage h2.subtitle {
90 * Selection: article main title and subtitle
92 div.article
>div.titlepage h2.title,
93 div.article
>div.titlepage h3.subtitle,
94 div.article
>div.sect1
>div.titlepage h2.title,
95 div.article
>div.section
>div.titlepage h2.title {
100 * Selection: various types of authors and collaborators, individuals or corporate
102 * These authors are not always contained inside an authorgroup.
103 * They can be contained inside a lot of different parent types where they might
105 * Reducing the margin at the bottom makes a visual separation between authors
106 * We specify here the ones on the title page, others may be added based on merit.
108 div.titlepage .authorgroup,
109 div.titlepage .author,
110 div.titlepage .collab,
111 div.titlepage .corpauthor,
112 div.titlepage .corpcredit,
113 div.titlepage .editor,
114 div.titlepage .othercredit {
116 margin-bottom:
0.25em;
120 * Selection: the affiliation of various types of authors and collaborators,
121 * individuals or corporate.
123 div.titlepage .affiliation {
128 * Selection: product release information (X Version
11, Release
7)
130 * The releaseinfo element can be contained inside a lot of different parent
131 * types where it might not be centered.
132 * We specify here the one on the title page, others may be added based on merit.
134 div.titlepage p.releaseinfo {
140 * Selection: publishing date
142 div.titlepage .pubdate {
147 * The legal notices are displayed in smaller sized fonts
148 * Justification is only supported in IE and therefore not requested.
157 * For documentation having multiple licenses, the copyright and legalnotice
158 * elements sequence cannot instantiated multiple times.
159 * The copyright notice and license text are therefore coded inside a legalnotice
160 * element. The role attribute on the paragraph is used to allow styling of the
161 * copyright notice text which should not be italicized.
169 * Selection: book or article main ToC title
170 * A paragraph is generated for the title rather than a level
2 heading.
171 * We do not want to select chapters sub table of contents, only the main one
174 div.article
>div.toc
>p {
180 * Selection: major sections of a book or an article
182 * Unlike books, articles do not have a titlepage element for appendix.
183 * Using the selector
"div.titlepage h2.title" would be too general.
185 div.book
>div.preface
>div.titlepage h2.title,
186 div.book
>div.chapter
>div.titlepage h2.title,
187 div.article
>div.sect1
>div.titlepage h2.title,
188 div.article
>div.section
>div.titlepage h2.title,
189 div.book
>div.appendix
>div.titlepage h2.title,
190 div.article
>div.appendix h2.title,
191 div.glossary
>div.titlepage h2.title,
192 div.index
>div.titlepage h2.title,
193 div.bibliography
>div.titlepage h2.title {
194 /* Add a border top over the major parts, just like printed books */
195 /* The Gray color is already used for the ruler over the main ToC. */
196 border-top-style: solid;
197 border-top-width:
2px;
198 border-top-color: Gray;
199 /* Put some space between the border and the title */
205 * A Screen is a verbatim environment for displaying text that the user might
206 * see on a computer terminal. It is often used to display the results of a command.
208 * http://www.css3.info/preview/rounded-border/
214 border-color: #B0C4DE;
215 border-radius:
1.0em;
216 /* Browser's vendor properties prior to CSS
3 */
217 -moz-border-radius:
1.0em;
218 -webkit-border-radius:
1.0em;
219 -khtml-border-radius:
1.0em;
226 * Emphasis program listings with a light shade of gray similar to what
227 * DocBook XSL guide does: http://www.sagehill.net/docbookxsl/ProgramListings.html
228 * Found many C API docs on the web using like shades of gray.
239 * Emphasis functions synopsis using a darker shade of gray.
240 * Add a border such that it stands out more.
241 * Set the padding so the text does not touch the border.
243 .funcsynopsis, .synopsis {
254 * Selection: paragraphs inside synopsis
256 * Removes the default browser margin, let the container set the padding.
257 * Paragraphs are not always used in synopsis
266 * Selection: variable lists, informal tables and tables
268 * Note the parameter name
"variablelist.as.table" in xorg-xhtml.xsl
269 * A table with rows and columns is constructed inside div.variablelist
271 * Set the left margin so it is indented to the right
272 * Display informal tables with single line borders
276 border-collapse: collapse;
280 * Selection: paragraphs inside tables
282 * Removes the default browser margin, let the container set the padding.
283 * Paragraphs are not always used in tables
291 * Add some space between the left and right column.
292 * The vertical alignment helps the reader associate a term
293 * with a multi-line definition.
297 padding-right:
1.0em;
302 border:
1px solid red;
306 </style></head><body><div class=
"article"><div class=
"titlepage"><div><div><h2 class=
"title"><a id=
"fonts"></a>Fonts in X11R7.7
</h2></div><div><div class=
"author"><h3 class=
"author"><span class=
"firstname">Juliusz
</span> <span class=
"surname">Chroboczek
</span></h3><code class=
"email"><<a class=
"email" href=
"mailto:jch@freedesktop.org">jch@freedesktop.org
</a>></code></div></div><div><p class=
"releaseinfo">X Version
11, Release
7.7</p></div><div><p class=
"pubdate">16 March
2012</p></div></div><hr /></div><div class=
"toc"><p><strong>Table of Contents
</strong></p><dl><dt><span class=
"sect1"><a href=
"#Introduction">Introduction
</a></span></dt><dd><dl><dt><span class=
"sect2"><a href=
"#Two_font_systems">Two font systems
</a></span></dt></dl></dd><dt><span class=
"sect1"><a href=
"#Installing_fonts">Installing fonts
</a></span></dt><dd><dl><dt><span class=
"sect2"><a href=
"#Configuring_Xft">Configuring Xft
</a></span></dt><dt><span class=
"sect2"><a href=
"#Configuring_the_core_X11_fonts_system">Configuring the core X11 fonts system
</a></span></dt></dl></dd><dt><span class=
"sect1"><a href=
"#Fonts_included_with_X11">Fonts included with X11R7.7
</a></span></dt><dd><dl><dt><span class=
"sect2"><a href=
"#Standard_bitmap_fonts">Standard bitmap fonts
</a></span></dt><dt><span class=
"sect2"><a href=
"#The_ClearlyU_Unicode_font_family">The ClearlyU Unicode font family
</a></span></dt><dt><span class=
"sect2"><a href=
"#Standard_scalable_fonts">Standard scalable fonts
</a></span></dt><dt><span class=
"sect2"><a href=
"#The_Bigelow_and__Holmes_Luxi_family">The Bigelow
& Holmes Luxi family
</a></span></dt></dl></dd><dt><span class=
"sect1"><a href=
"#More_about_core_fonts">More about core fonts
</a></span></dt><dd><dl><dt><span class=
"sect2"><a href=
"#Core_fonts_and_internationalisation">Core fonts and internationalisation
</a></span></dt><dt><span class=
"sect2"><a href=
"#Additional_notes_about_scalable_core_fonts">Additional notes about scalable core fonts
</a></span></dt></dl></dd><dt><span class=
"sect1"><a href=
"#Appendix_background_and_terminology">Appendix: background and terminology
</a></span></dt><dd><dl><dt><span class=
"sect2"><a href=
"#Characters_and_glyphs">Characters and glyphs
</a></span></dt><dt><span class=
"sect2"><a href=
"#Font_files_fonts_and_XLFD">Font files, fonts, and XLFD
</a></span></dt><dt><span class=
"sect2"><a href=
"#Unicode">Unicode
</a></span></dt></dl></dd><dt><span class=
"sect1"><a href=
"#References">References
</a></span></dt></dl></div><div class=
"sect1"><div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both"><a id=
"Introduction"></a>Introduction
</h2></div></div></div><p>
307 This document describes the support for fonts in X11R7.7.
308 <a class=
"xref" href=
"#Installing_fonts" title=
"Installing fonts">Installing fonts
</a> is aimed at the
309 casual user wishing to install fonts in X11R7.7 the rest of the
310 document describes the font support in more detail.
312 We assume some familiarity with digital fonts. If anything is not
313 clear to you, please consult
<a class=
"xref" href=
"#Appendix_background_and_terminology" title=
"Appendix: background and terminology">Appendix: background and terminology
</a> at the
314 end of this document for background information.
315 </p><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Two_font_systems"></a>Two font systems
</h3></div></div></div><p>
316 X11 includes two font systems: the original core X11 fonts
317 system, which is present in all implementations of X11, and the Xft
318 fonts system, which may not yet be distributed with implementations of
319 X11 that are not based on either XFree86 or X11R6.8 or later.
321 The core X11 fonts system is directly derived from the fonts system
322 included with X11R1 in
1987, which could only use monochrome bitmap
323 fonts. Over the years, it has been more or less happily coerced into
324 dealing with scalable fonts and rotated glyphs.
326 Xft was designed from the start to provide good support for scalable
327 fonts, and to do so efficiently. Unlike the core fonts system, it
328 supports features such as anti-aliasing and sub-pixel rasterisation.
329 Perhaps more importantly, it gives applications full control over the
330 way glyphs are rendered, making fine typesetting and WYSIWIG display
331 possible. Finally, it allows applications to use fonts that are not
332 installed system-wide for displaying documents with embedded fonts.
334 Xft is not compatible with the core fonts system: usage of Xft
335 requires fairly extensive changes to toolkits (user-interface
336 libraries). While X.Org will continue to maintain the core fonts
337 system, toolkit authors are encouraged to switch to Xft as soon as
339 </p></div></div><div class=
"sect1"><div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both"><a id=
"Installing_fonts"></a>Installing fonts
</h2></div></div></div><p>
340 This section explains how to configure both Xft and the core fonts
341 system to access newly-installed fonts.
342 </p><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Configuring_Xft"></a>Configuring Xft
</h3></div></div></div><p>
343 Xft has no configuration mechanism itself, it relies upon the
344 <a class=
"ulink" href=
"http://www.fontconfig.org/" target=
"_top">fontconfig
</a>
345 library to configure and customise fonts. That library is
346 not specific to the X Window system, and does not rely on any
347 particular font output mechanism.
348 </p><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Installing_fonts_in_Xft"></a>Installing fonts in Xft
</h4></div></div></div><p>
349 Fontconfig looks for fonts in a set of well-known directories that
350 include all of X11R7.7's standard font directories
351 (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">/usr/share/fonts/X11/*
</code></span>”
</span>) by default) as well as a
352 directory called
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">.fonts/
</code></span>”
</span> in the user's home directory.
353 Installing a font for use by Xft applications is as simple
354 as copying a font file into one of these directories.
356 </p><pre class=
"screen">
357 $ cp lucbr.ttf ~/.fonts/
360 Fontconfig will notice the new font at the next opportunity and rebuild its
361 list of fonts. If you want to trigger this update from the command
362 line, you may run the command
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>fc-cache
</strong></span></span>”
</span>.
364 </p><pre class=
"screen">
369 In order to globally update the system-wide Fontconfig information on
370 Unix systems, you will typically need to run this command as root:
372 </p><pre class=
"screen">
376 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Fine-tuning_Xft"></a>Fine-tuning Xft
</h4></div></div></div><p>
377 Fontconfig's behaviour is controlled by a set of configuration
378 files: a standard configuration file,
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">/etc/fonts/fonts.conf
</code></span>”
</span>,
379 a host-specific configuration file,
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">/etc/fonts/local.conf
</code></span>”
</span>,
380 and a user-specific file called
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">.fonts.conf
</code></span>”
</span> in the user's
381 home directory (this can be overridden with the
382 <span class=
"quote">“
<span class=
"quote"><code class=
"envar">FONTCONFIG_FILE
</code></span>”
</span> environment variable).
384 Every Fontconfig configuration file must start with the following
387 </p><pre class=
"screen">
388 <?xml
version=
"1.0"?
>
389 <!DOCTYPE fontconfig SYSTEM
"fonts.dtd">
393 In addition, every Fontconfig configuration file must end with the
396 </p><pre class=
"screen">
401 The default Fontconfig configuration file includes the directory
402 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">˜/.fonts/
</code></span>”
</span> in the list of directories searched for font
403 files, and this is where user-specific font files should be installed.
404 In the unlikely case that a new font directory needs to be added, this
405 can be done with the following syntax:
407 </p><pre class=
"screen">
408 <dir
>/usr/local/share/fonts/
</dir
>
412 Another useful option is the ability to disable anti-aliasing (font
413 smoothing) for selected fonts. This can be done with the following
416 </p><pre class=
"screen">
417 <match
target=
"font">
418 <test
qual=
"any" name=
"family">
419 <string
>Lucida Console
</string
>
421 <edit
name=
"antialias" mode=
"assign">
422 <bool
>false
</bool
>
427 Anti-aliasing can be disabled for all fonts by the following incantation:
429 </p><pre class=
"screen">
430 <match
target=
"font">
431 <edit
name=
"antialias" mode=
"assign">
432 <bool
>false
</bool
>
438 Xft supports sub-pixel rasterisation on LCD displays. X11R7.7 should
439 automatically enable this feature on laptops and when using an LCD
440 monitor connected with a DVI cable; you can check whether this was
443 </p><pre class=
"screen">
444 $ xdpyinfo -ext RENDER | grep sub-pixel
447 If this doesn't print anything, you will need to configure Render for
448 your particular LCD hardware manually; this is done with the following
451 </p><pre class=
"screen">
452 <match
target=
"font">
453 <edit
name=
"rgba" mode=
"assign">
454 <const
>rgb
</const
>
459 The string
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">rgb
</code></span>”
</span> within the
460 <span class=
"quote">“
<span class=
"quote"><code class=
"literal"><const
></code></span>”
</span>...
<span class=
"quote">“
<span class=
"quote"><code class=
"literal"></const
></code></span>”
</span>
461 specifies the order of pixel components on your display, and should be
462 changed to match your hardware; it can be one of
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">rgb
</code></span>”
</span> (normal
463 LCD screen),
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">bgr
</code></span>”
</span> (backwards LCD screen),
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">vrgb
</code></span>”
</span> (LCD
464 screen rotated clockwise) or
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">vbgr
</code></span>”
</span> (LCD screen rotated
466 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Configuring_applications"></a>Configuring applications
</h4></div></div></div><p>
467 A growing number of applications use Xft in preference to the core
468 fonts system. Some applications, however, need to be explicitly
469 configured to use Xft.
471 A case in point is XTerm, which can be set to use Xft by using the
472 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">-fa
</code></span>”
</span> command line option or by setting the
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">XTerm*faceName
</code></span>”
</span>
475 </p><pre class=
"screen">
476 XTerm*faceName: Courier
481 </p><pre class=
"screen">
482 $ xterm -fa
"Courier"
486 For KDE applications, you should select
<span class=
"quote">“
<span class=
"quote">Anti-alias fonts
</span>”
</span> in the
487 <span class=
"quote">“
<span class=
"quote">Fonts
</span>”
</span> panel of KDE's
<span class=
"quote">“
<span class=
"quote">Control Center
</span>”
</span>. Note that this option is
488 misnamed: it switches KDE to using Xft but doesn't enable
489 anti-aliasing in case it was disabled by your Xft configuration file.
491 Gnome applications and Mozilla Firefox will use Xft by default.
492 </p></div></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Configuring_the_core_X11_fonts_system"></a>Configuring the core X11 fonts system
</h3></div></div></div><p>
493 Installing fonts in the core system is a two step process. First,
494 you need to create a
<span class=
"emphasis"><em>font directory
</em></span> that contains all the
495 relevant font files as well as some index files. You then need to
496 inform the X server of the existence of this new directory by
497 including it in the
<span class=
"emphasis"><em>font path
</em></span>.
498 </p><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Installing_bitmap_fonts"></a>Installing bitmap fonts
</h4></div></div></div><p>
499 The X11R7.7 server can use bitmap fonts in both the cross-platform
500 BDF format and the somewhat more efficient binary PCF format.
501 (X11R7.7 also supports the obsolete SNF format.)
503 Bitmap fonts are normally distributed in the BDF format. Before
504 installing such fonts, it is desirable (but not absolutely necessary)
505 to convert the font files to the PCF format. This is done by using the
506 command
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>bdftopcf
</strong></span></span>”
</span>,
<span class=
"emphasis"><em>e.g.
</em></span>
508 </p><pre class=
"screen">
509 $ bdftopcf courier12.bdf
512 You may then want to compress the resulting PCF font files:
514 </p><pre class=
"screen">
519 After the fonts have been converted, you should copy all the font
520 files that you wish to make available into a arbitrary directory, say
521 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">/usr/local/share/fonts/bitmap/
</code></span>”
</span>. You should then create the
522 index file
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.dir
</code></span>”
</span> by running the command
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>mkfontdir
</strong></span></span>”
</span>
523 (please see the
<a class=
"ulink" href=
"mkfontdir.1.html" target=
"_top">mkfontdir(
1)
</a>
524 manual page for more information):
526 </p><pre class=
"screen">
527 $ mkdir /usr/local/share/fonts/bitmap/
528 $ cp *.pcf.gz /usr/local/share/fonts/bitmap/
529 $ mkfontdir /usr/local/share/fonts/bitmap/
533 All that remains is to tell the X server about the existence of the
534 new font directory; see
<a class=
"xref" href=
"#Setting_the_servers_font_path" title=
"Setting the server's font path">Setting the server's font path
</a> below.
535 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Installing_scalable_fonts"></a>Installing scalable fonts
</h4></div></div></div><p>
536 The X11R7.7 server supports scalable fonts in multiple
537 formats, including Type
1, TrueType, and OpenType/CFF.
538 (Earlier versions of X11 also included support for the Speedo and
539 CID scalable font formats, but that is not included in current releases.)
541 Installing scalable fonts is very similar to installing bitmap fonts:
542 you create a directory with the font files, and run
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>mkfontdir
</strong></span></span>”
</span>
543 to create an index file called
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.dir
</code></span>”
</span>.
545 There is, however, a big difference:
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>mkfontdir
</strong></span></span>”
</span> cannot
546 automatically recognise scalable font files. For that reason, you
547 must first index all the font files in a file called
548 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.scale
</code></span>”
</span>. While this can be done by hand, it is best done
549 by using the
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>mkfontscale
</strong></span></span>”
</span> utility.
551 </p><pre class=
"screen">
552 $ mkfontscale /usr/local/share/fonts/Type1/
553 $ mkfontdir /usr/local/share/fonts/Type1/
556 Under some circumstances, it may be necessary to modify the
557 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.scale
</code></span>”
</span> file generated by
<span class=
"command"><strong>mkfontscale
</strong></span>; for more
558 information, please see the
<a class=
"ulink" href=
"mkfontdir.1.html" target=
"_top">mkfontdir(
1)
</a> and
<a class=
"ulink" href=
"mkfontscale.1.html" target=
"_top">mkfontscale(
1)
</a> manual pages and
<a class=
"xref" href=
"#Core_fonts_and_internationalisation" title=
"Core fonts and internationalisation">Core fonts and internationalisation
</a>
559 later in this document.
560 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"CID_keyed_fonts"></a>CID-keyed fonts
</h4></div></div></div><p>
561 The CID-keyed font format was designed by Adobe Systems for fonts
562 with large character sets. The CID-keyed format is obsolete, as it
563 has been superseded by other formats such as OpenType/CFF and
564 support for CID-keyed fonts has been removed from X11.
565 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Setting_the_servers_font_path"></a>Setting the server's font path
</h4></div></div></div><p>
566 The list of directories where the server looks for fonts is known
567 as the
<span class=
"emphasis"><em>font path
</em></span>. Informing the server of the existence of a new
568 font directory consists of putting it on the font path.
570 The font path is an ordered list; if a client's request matches
571 multiple fonts, the first one in the font path is the one that gets
572 used. When matching fonts, the server makes two passes over the font
573 path: during the first pass, it searches for an exact match; during
574 the second, it searches for fonts suitable for scaling.
576 For best results, scalable fonts should appear in the font path before
577 the bitmap fonts; this way, the server will prefer bitmap fonts to
578 scalable fonts when an exact match is possible, but will avoid scaling
579 bitmap fonts when a scalable font can be used. (The
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">:unscaled
</code></span>”
</span>
580 hack, while still supported, should no longer be necessary in X11R7.7.)
582 You may check the font path of the running server by typing the command
584 </p><pre class=
"screen">
588 </p><div class=
"sect4"><div class=
"titlepage"><div><div><h5 class=
"title"><a id=
"Font_path_catalogue_directories"></a>Font path catalogue directories
</h5></div></div></div><p>
589 You can specify a special kind of font path directory in the form
590 <code class=
"filename">catalogue:
<dir
></code>.
591 The directory specified after the
<code class=
"filename">catalogue:
</code>
592 prefix will be scanned for symlinks and each symlink destination will be
593 added as a local font path entry.
595 The symlink can be suffixed by attributes such as
596 '
<code class=
"literal">unscaled
</code>', which will be passed through
597 to the underlying font path entry. The only exception is the newly
598 introduced '
<code class=
"literal">pri
</code>' attribute, which will be
599 used for ordering the font paths specified by the symlinks.
601 An example configuration:
602 </p><pre class=
"screen">
603 75dpi:unscaled:pri=
20 -
> /usr/share/X11/fonts/
75dpi
604 ghostscript:pri=
60 -
> /usr/share/fonts/default/ghostscript
605 misc:unscaled:pri=
10 -
> /usr/share/X11/fonts/misc
606 type1:pri=
40 -
> /usr/share/X11/fonts/Type1
607 type1:pri=
50 -
> /usr/share/fonts/default/Type1
610 This will add
<code class=
"filename">/usr/share/X11/fonts/misc
</code> as the
611 first font path entry with the attribute
612 <code class=
"literal">unscaled
</code>. This is functionally equivalent to
613 setting the following font path:
614 </p><pre class=
"screen">
615 /usr/share/X11/fonts/misc:unscaled,
616 /usr/share/X11/fonts/
75dpi:unscaled,
617 /usr/share/X11/fonts/Type1,
618 /usr/share/fonts/default/Type1,
619 /usr/share/fonts/default/ghostscript
621 </p></div><div class=
"sect4"><div class=
"titlepage"><div><div><h5 class=
"title"><a id=
"Temporary_modification_of_the_font_path"></a>Temporary modification of the font path
</h5></div></div></div><p>
622 The
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>xset
</strong></span></span>”
</span> utility may be used to modify the font path for the
623 current session. The font path is set with the command
<span class=
"command"><strong>xset fp
</strong></span>;
624 a new element is added to the front with
<span class=
"command"><strong>xset +fp
</strong></span>, and added to
625 the end with
<span class=
"command"><strong>xset fp+
</strong></span>. For example,
627 </p><pre class=
"screen">
628 $ xset +fp /usr/local/fonts/Type1
629 $ xset fp+ /usr/local/fonts/bitmap
633 Conversely, an element may be removed from the front of the font path
634 with
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>xset -fp
</strong></span></span>”
</span>, and removed from the end with
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>xset fp-
</strong></span></span>”
</span>.
635 You may reset the font path to its default value with
636 <span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>xset fp default
</strong></span></span>”
</span>.
638 For more information, please consult the
<a class=
"ulink" href=
"xset.1.html" target=
"_top">xset(
1)
</a> manual page.
639 </p></div><div class=
"sect4"><div class=
"titlepage"><div><div><h5 class=
"title"><a id=
"Permanent_modification_of_the_font_path"></a>Permanent modification of the font path
</h5></div></div></div><p>
640 The default font path (the one used just after server startup or
641 after
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>xset fp default
</strong></span></span>”
</span>) may be specified in the
643 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">xorg.conf
</code></span>”
</span> file. It is computed by appending all the
644 directories mentioned in the
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">FontPath
</code></span>”
</span> entries of the
645 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">Files
</code></span>”
</span> section in the order in which they appear. If no font path is specified in a config file, the server uses a default
646 value specified when it was built.
648 </p><pre class=
"screen">
649 FontPath
"/usr/local/fonts/Type1"
651 FontPath
"/usr/local/fonts/bitmap"
655 For more information, please consult the
<a class=
"ulink" href=
"xorg.conf.5.html" target=
"_top">xorg.conf(
5)
</a> manual page.
656 </p></div></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Troubleshooting"></a>Troubleshooting
</h4></div></div></div><p>
657 If you seem to be unable to use some of the fonts you have
658 installed, the first thing to check is that the
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.dir
</code></span>”
</span> files
659 are correct and that they are readable by the server (the X server
660 usually runs as root, beware of NFS-mounted font directories). If
661 this doesn't help, it is quite possible that you are trying to use a
662 font in a format that is not supported by your server.
664 X11R7.7 supports the BDF, PCF, SNF, Type
1, TrueType, and OpenType
665 font formats. However, not all X11R7.7 servers
666 come with all the font backends configured in.
668 On most platforms, the X11R7.7 servers no longer uses font
669 backends from modules that are loaded at runtime. The built in
670 font support corresponds to the functionality formerly provided by
673 </p><div class=
"itemizedlist"><ul class=
"itemizedlist" type=
"disc"><li class=
"listitem"><p>
674 <code class=
"literal">"bitmap"</code>:
675 bitmap fonts (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.bdf
</code></span>”
</span>,
676 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.pcf
</code></span>”
</span>
677 and
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.snf
</code></span>”
</span>);
678 </p></li><li class=
"listitem"><p>
679 <code class=
"literal">"freetype"</code>:
680 TrueType fonts (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.ttf
</code></span>”
</span> and
681 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.ttc
</code></span>”
</span>),
682 OpenType fonts (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.otf
</code></span>”
</span> and
683 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.otc
</code></span>”
</span>) and
684 Type
1 fonts (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.pfa
</code></span>”
</span>
685 and
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.pfb
</code></span>”
</span>).
686 </p></li></ul></div><p>
688 </p></div></div></div><div class=
"sect1"><div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both"><a id=
"Fonts_included_with_X11"></a>Fonts included with X11R7.7
</h2></div></div></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Standard_bitmap_fonts"></a>Standard bitmap fonts
</h3></div></div></div><p>
689 The Sample Implementation of X11 (SI) comes with a large number of
690 bitmap fonts, including the
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">fixed
</code></span>”
</span> family, and bitmap versions
691 of Courier, Times, Helvetica and some members of the Lucida family.
693 In X11R7.7, a number of these fonts are provided in Unicode-encoded
694 font files now. At build time, these fonts are split into font
695 files encoded according to legacy encodings, a process which allows
696 us to provide the standard fonts in a number of regional encodings
697 with no duplication of work.
699 For example, the font file
701 </p><pre class=
"screen">
702 /usr/share/fonts/X11/misc/
6x13.bdf
707 </p><pre class=
"screen">
708 -misc-fixed-medium-r-semicondensed--
13-
120-
75-
75-c-
60-iso10646-
1
711 is a Unicode-encoded version of the standard
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">fixed
</code></span>”
</span> font with
712 added support for the Latin, Greek, Cyrillic, Georgian, Armenian, IPA
713 and other scripts plus numerous technical symbols. It contains over
714 2800 glyphs, covering all characters of ISO
8859 parts
1-
5,
715 7-
10,
13-
15, as well as all European IBM and Microsoft code pages,
716 KOI8, WGL4, and the repertoires of many other character sets.
718 This font is used at build time for generating the font files
720 </p><pre class=
"screen">
728 with respective XLFDs
730 </p><pre class=
"screen">
731 -misc-fixed-medium-r-normal--
13-
120-
75-
75-c-
60-iso8859-
1
733 -misc-fixed-medium-r-normal--
13-
120-
75-
75-c-
60-iso8859-
15
734 -misc-fixed-medium-r-normal--
13-
120-
75-
75-c-
60-koi8-r
737 The standard short name
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">fixed
</code></span>”
</span> is normally an alias for
739 </p><pre class=
"screen">
740 -misc-fixed-medium-r-normal--
13-
120-
75-
75-c-
60-iso8859-
1
743 </p></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"The_ClearlyU_Unicode_font_family"></a>The ClearlyU Unicode font family
</h3></div></div></div><p>
744 The ClearlyU family of fonts provides a set of
12 pt,
745 100 dpi proportional fonts with many of the glyphs needed for
746 Unicode text. Together, the fonts contain approximately
7500 glyphs.
748 The main ClearlyU font has the XLFD
750 </p><pre class=
"screen">
751 -mutt-clearlyu-medium-r-normal--
17-
120-
100-
100-p-
101-iso10646-
1
754 and resides in the font file
756 </p><pre class=
"screen">
757 /usr/share/fonts/X11/misc/cu12.pcf.gz
760 Additional ClearlyU fonts include
762 </p><pre class=
"screen">
763 -mutt-clearlyu alternate glyphs-medium-r-normal--
17-
120-
100-
100-p-
91-iso10646-
1
764 -mutt-clearlyu pua-medium-r-normal--
17-
120-
100-
100-p-
111-iso10646-
1
765 -mutt-clearlyu arabic extra-medium-r-normal--
17-
120-
100-
100-p-
103-fontspecific-
0
766 -mutt-clearlyu ligature-medium-r-normal--
17-
120-
100-
100-p-
141-fontspecific-
0
770 The
<span class=
"emphasis"><em>Alternate Glyphs
</em></span> font contains additional glyph shapes that
771 are needed for certain languages. A second alternate glyph font will
772 be provided later for cases where a character has more than one
773 commonly used alternate shape (
<span class=
"emphasis"><em>e.g.
</em></span> the Urdu heh).
775 The
<span class=
"emphasis"><em>PUA
</em></span> font contains extra glyphs that are useful for certain
778 The
<span class=
"emphasis"><em>Arabic Extra
</em></span> font contains the glyphs necessary for
779 characters that don't have all of their possible shapes encoded in
780 ISO
10646. The glyphs are roughly ordered according to the order
781 of the characters in the ISO
10646 standard.
783 The
<span class=
"emphasis"><em>Ligature
</em></span> font contains ligatures for various scripts that
784 may be useful for improved presentation of text.
785 </p></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Standard_scalable_fonts"></a>Standard scalable fonts
</h3></div></div></div><p>
786 X11R7.7 includes all the scalable fonts distributed with X11R6.
787 </p><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Standard_Type1_fonts"></a>Standard Type
1 fonts
</h4></div></div></div><p>
788 The IBM Courier set of fonts cover ISO
8859-
1 and
789 ISO
8859-
2 as well as Adobe Standard Encoding. These fonts have
792 </p><pre class=
"screen">
793 -adobe-courier-medium-*-*--
0-
0-
0-
0-m-
0-*-*
796 and reside in the font files
798 </p><pre class=
"screen">
799 /usr/share/fonts/X11/Type1/cour*.pfa
803 The Adobe Utopia set of fonts only cover ISO
8859-
1 as well as
804 Adobe Standard Encoding. These fonts have XLFD
806 </p><pre class=
"screen">
807 -adobe-utopia-*-*-normal--
0-
0-
0-
0-p-
0-iso8859-
1
810 and reside in the font files
812 </p><pre class=
"screen">
813 /usr/share/fonts/X11/Type1/UT*.pfa
817 Finally, X11R7.7 also comes with Type
1 versions of Bitstream
818 Courier and Charter. These fonts have XLFD
820 </p><pre class=
"screen">
821 -bitstream-courier-*-*-normal--
0-
0-
0-
0-m-
0-iso8859-
1
822 -bitstream-charter-*-*-normal--
0-
0-
0-
0-p-
0-iso8859-
1
825 and reside in the font files
827 </p><pre class=
"screen">
828 /usr/share/fonts/X11/Type1/c*bt_.pfb
831 </p></div></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"The_Bigelow_and__Holmes_Luxi_family"></a>The Bigelow
& Holmes Luxi family
</h3></div></div></div><p>
832 X11R7.7 includes the
<span class=
"emphasis"><em>Luxi
</em></span> family of scalable fonts, in both
833 TrueType and Type
1 format. This family consists of the fonts
834 <span class=
"emphasis"><em>Luxi Serif
</em></span>, with XLFD
836 </p><pre class=
"screen">
837 -b
&h-luxi serif-medium-*-normal--*-*-*-*-p-*-*-*
840 <span class=
"emphasis"><em>Luxi Sans
</em></span>, with XLFD
842 </p><pre class=
"screen">
843 -b
&h-luxi sans-medium-*-normal--*-*-*-*-p-*-*-*
846 and
<span class=
"emphasis"><em>Luxi Mono
</em></span>, with XLFD
848 </p><pre class=
"screen">
849 -b
&h-luxi mono-medium-*-normal--*-*-*-*-m-*-*-*
852 Each of these fonts comes Roman, oblique, bold and bold oblique variants
853 The TrueType version have glyphs covering the basic ASCII Unicode
854 range, the Latin
1 range, as well as the
<span class=
"emphasis"><em>Extended Latin
</em></span>
855 range and some additional punctuation characters. In particular,
856 these fonts include all the glyphs needed for ISO
8859 parts
1,
857 2,
3,
4,
9,
13 and
15, as well as all the glyphs in the Adobe Standard
858 encoding and the Windows
3.1 character set.
860 The glyph coverage of the Type
1 versions is somewhat reduced,
861 and only covers ISO
8859 parts
1,
2 and
15 as well as the Adobe
864 The Luxi fonts are original designs by Kris Holmes and Charles
865 Bigelow. Luxi fonts include seriffed, sans serif, and monospaced
866 styles, in roman and oblique, and normal and bold weights. The fonts
867 share stem weight, x-height, capital height, ascent and descent, for
870 The character width metrics of Luxi roman and bold fonts match those
871 of core fonts bundled with popular operating and window systems.
873 The license terms for the Luxi fonts are included in the file
874 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">COPYRIGHT.BH
</code></span>”
</span>, as well as in the
<a href=
"../License.html#Bigelow_Holmes_Inc_and_URW_GmbH_Luxi_font_license" class=
"olink">License
877 Charles Bigelow and Kris Holmes from Bigelow and Holmes Inc.
878 developed the Luxi typeface designs in Ikarus digital format.
880 URW++ Design and Development GmbH converted the Ikarus format fonts
881 to TrueType and Type1 font programs and implemented the grid-fitting
882 "hints" and kerning tables in the Luxi fonts.
884 For more information, please contact
885 <code class=
"email"><<a class=
"email" href=
"mailto:design@bigelowandholmes.com">design@bigelowandholmes.com
</a>></code> or
886 <code class=
"email"><<a class=
"email" href=
"mailto:info@urwpp.de">info@urwpp.de
</a>></code>, or consult
887 <a class=
"ulink" href=
"http://www.urwpp.de" target=
"_top">the URW++ web site
</a>.
889 An earlier version of the Luxi fonts was made available under the
890 name
<span class=
"emphasis"><em>Lucidux
</em></span>. This name should no longer be used due to
891 trademark uncertainties, and all traces of the
<span class=
"emphasis"><em>Lucidux
</em></span>
892 name have been removed from X11R7.7.
893 </p></div></div><div class=
"sect1"><div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both"><a id=
"More_about_core_fonts"></a>More about core fonts
</h2></div></div></div><p>
894 This section describes XFree86-created enhancements to the core
895 X11 fonts system that were adopted by X.Org.
896 </p><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Core_fonts_and_internationalisation"></a>Core fonts and internationalisation
</h3></div></div></div><p>
897 The scalable font backends (Type
1 and TrueType) can
898 automatically re-encode fonts to the encoding specified in the
899 XLFD in
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.dir
</code></span>”
</span>. For example, a
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.dir
</code></span>”
</span> file can
900 contain entries for the Type
1 Courier font such as
902 </p><pre class=
"screen">
903 cour.pfa -adobe-courier-medium-r-normal--
0-
0-
0-
0-m-
0-iso8859-
1
904 cour.pfa -adobe-courier-medium-r-normal--
0-
0-
0-
0-m-
0-iso8859-
2
907 which will lead to the font being recoded to ISO
8859-
1 and
908 ISO
8859-
2 respectively.
909 </p><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"The_fontenc_layer"></a>The
<span class=
"emphasis"><em>fontenc
</em></span> layer
</h4></div></div></div><p>
910 Two of the scalable backends (Type
1 and the
911 <span class=
"emphasis"><em>FreeType
</em></span> TrueType backend) use a common
<span class=
"emphasis"><em>fontenc
</em></span> layer for
912 font re-encoding. This allows these backends to share their encoding
913 data, and allows simple configuration of new locales independently of
916 <span class=
"emphasis"><em>Please note:
</em></span> the X-TrueType (X-TT) backend is not included
917 in X11R7.7. That functionality has been merged into the FreeType
920 In the
<span class=
"emphasis"><em>fontenc
</em></span> layer, an encoding is defined by a name (such as
921 <code class=
"literal">iso8859-
1</code>), possibly a number of aliases (alternate names), and
922 an ordered collection of mappings. A mapping defines the way the
923 encoding can be mapped into one of the
<span class=
"emphasis"><em>target encodings
</em></span> known to
924 <span class=
"emphasis"><em>fontenc
</em></span>; currently, these consist of Unicode, Adobe glyph names,
925 and arbitrary TrueType
<span class=
"quote">“
<span class=
"quote">cmap
</span>”
</span>s.
927 A number of encodings are hardwired into
<span class=
"emphasis"><em>fontenc
</em></span>, and are
928 therefore always available; the hardcoded encodings cannot easily be
929 redefined. These include:
931 </p><div class=
"itemizedlist"><ul class=
"itemizedlist" type=
"disc"><li class=
"listitem"><p>
932 <code class=
"literal">iso10646-
1</code>: Unicode;
933 </p></li><li class=
"listitem"><p>
934 <code class=
"literal">iso8859-
1</code>: ISO Latin-
1 (Western Europe);
935 </p></li><li class=
"listitem"><p>
936 <code class=
"literal">iso8859-
2</code>: ISO Latin-
2 (Eastern Europe);
937 </p></li><li class=
"listitem"><p>
938 <code class=
"literal">iso8859-
3</code>: ISO Latin-
3 (Southern Europe);
939 </p></li><li class=
"listitem"><p>
940 <code class=
"literal">iso8859-
4</code>: ISO Latin-
4 (Northern Europe);
941 </p></li><li class=
"listitem"><p>
942 <code class=
"literal">iso8859-
5</code>: ISO Cyrillic;
943 </p></li><li class=
"listitem"><p>
944 <code class=
"literal">iso8859-
6</code>: ISO Arabic;
945 </p></li><li class=
"listitem"><p>
946 <code class=
"literal">iso8859-
7</code>: ISO Greek;
947 </p></li><li class=
"listitem"><p>
948 <code class=
"literal">iso8859-
8</code>: ISO Hebrew;
949 </p></li><li class=
"listitem"><p>
950 <code class=
"literal">iso8859-
9</code>: ISO Latin-
5 (Turkish);
951 </p></li><li class=
"listitem"><p>
952 <code class=
"literal">iso8859-
10</code>: ISO Latin-
6 (Nordic);
953 </p></li><li class=
"listitem"><p>
954 <code class=
"literal">iso8859-
15</code>: ISO Latin-
9, or Latin-
0 (Revised
956 </p></li><li class=
"listitem"><p>
957 <code class=
"literal">koi8-r
</code>: KOI8 Russian;
958 </p></li><li class=
"listitem"><p>
959 <code class=
"literal">koi8-u
</code>: KOI8 Ukrainian (see RFC
2319);
960 </p></li><li class=
"listitem"><p>
961 <code class=
"literal">koi8-ru
</code>: KOI8 Russian/Ukrainian;
962 </p></li><li class=
"listitem"><p>
963 <code class=
"literal">koi8-uni
</code>: KOI8
<span class=
"quote">“
<span class=
"quote">Unified
</span>”
</span> (Russian, Ukrainian, and
965 </p></li><li class=
"listitem"><p>
966 <code class=
"literal">koi8-e
</code>: KOI8
<span class=
"quote">“
<span class=
"quote">European,
</span>”
</span> ISO-IR-
111, or ECMA-Cyrillic;
967 </p></li><li class=
"listitem"><p>
968 <code class=
"literal">microsoft-symbol
</code> and
<code class=
"literal">apple-roman
</code>: these are only
969 likely to be useful with TrueType symbol fonts.
970 </p></li></ul></div><p>
973 Additional encodings can be added by defining
<span class=
"emphasis"><em>encoding files
</em></span>.
974 When a font encoding is requested that the
<span class=
"emphasis"><em>fontenc
</em></span> layer doesn't
975 know about, the backend checks the directory in which the font file
976 resides (not necessarily the directory with
<code class=
"filename">fonts.dir
</code>!) for a
977 file named
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">encodings.dir
</code></span>”
</span>. If found, this file is scanned for
978 the requested encoding, and the relevant encoding definition file is
979 read in. The
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>mkfontdir
</strong></span></span>”
</span> utility, when invoked with the
980 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">-e
</code></span>”
</span> option followed by the name of a directory containing
981 encoding files, can be used to automatically build
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">encodings.dir
</code></span>”
</span>
982 files. Please see the
<a class=
"ulink" href=
"mkfontdir.1.html" target=
"_top">mkfontdir(
1)
</a>
983 manual page for more details.
985 A number of encoding files for common encodings are included with
986 X11R7.7. Information on writing new encoding files can be found in
987 <a class=
"xref" href=
"#Format_of_encoding_directory_files" title=
"Format of encoding directory files">Format of encoding directory files
</a>
988 and
<a class=
"xref" href=
"#Format_of_encoding_files" title=
"Format of encoding files">Format of encoding files
</a> later in this document.
989 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Backend-specific_notes_about_fontenc"></a>Backend-specific notes about fontenc
</h4></div></div></div><div class=
"sect4"><div class=
"titlepage"><div><div><h5 class=
"title"><a id=
"The_FreeType_backend"></a>The
<span class=
"emphasis"><em>FreeType
</em></span> backend
</h5></div></div></div><p>
990 For TrueType and OpenType fonts, the FreeType backend scans the
991 mappings in order. Mappings with a target of PostScript are ignored;
992 mappings with a TrueType or Unicode target are checked against all the
993 cmaps in the file. The first applicable mapping is used.
995 For Type
1 fonts, the FreeType backend first searches for a
996 mapping with a target of PostScript. If one is found, it is used.
997 Otherwise, the backend searches for a mapping with target Unicode,
998 which is then composed with a built-in table mapping codes to glyph
999 names. Note that this table only covers part of the Unicode code
1000 points that have been assigned names by Adobe.
1002 Specifying an encoding value of
<code class=
"literal">adobe-fontspecific
</code> for a
1003 Type
1 font disables the encoding mechanism. This is useful with
1004 symbol and incorrectly encoded fonts (see
1005 <a class=
"xref" href=
"#Hints_about_using_badly_encoded_fonts" title=
"Hints about using badly encoded fonts">Hints about using badly encoded fonts
</a> below).
1007 If a suitable mapping is not found, the FreeType backend defaults to
1009 </p></div></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Format_of_encoding_directory_files"></a>Format of encoding directory files
</h4></div></div></div><p>
1010 In order to use a font in an encoding that the font backend does
1011 not know about, you need to have an
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">encodings.dir
</code></span>”
</span> file either
1012 in the same directory as the font file used or in a system-wide
1013 location (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">/usr/share/fonts/X11/encodings/
</code></span>”
</span> by default).
1015 The
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">encodings.dir
</code></span>”
</span> file has a similar format to
1016 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.dir
</code></span>”
</span>. Its first line specifies the number of encodings,
1017 while every successive line has two columns, the name of the encoding,
1018 and the name of the encoding file; this can be relative to the current
1019 directory, or absolute. Every encoding name should agree with the
1020 encoding name defined in the encoding file. For example,
1023 </p><pre class=
"screen">
1025 mulearabic-
0 /usr/share/fonts/X11/encodings/mulearabic-
0.enc
1026 mulearabic-
1 /usr/share/fonts/X11/encodings/mulearabic-
1.enc
1027 mulearabic-
2 /usr/share/fonts/X11/encodings/mulearabic-
2.enc
1031 The name of an encoding
<span class=
"emphasis"><em>must
</em></span> be specified in the encoding file's
1032 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">STARTENCODING
</code></span>”
</span> or
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">ALIAS
</code></span>”
</span> line. It is not enough to create
1033 an
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">encodings.dir
</code></span>”
</span> entry.
1035 If your platform supports it (it probably does), encoding files may be
1036 compressed or gzipped.
1038 The
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">encoding.dir
</code></span>”
</span> files are best maintained by the
1039 <span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>mkfontdir
</strong></span></span>”
</span> utility. Please see the
<a class=
"ulink" href=
"mkfontdir.1.html" target=
"_top">mkfontdir(
1)
</a> manual page for more information.
1040 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Format_of_encoding_files"></a>Format of encoding files
</h4></div></div></div><p>
1041 The encoding files are
<span class=
"quote">“
<span class=
"quote">free form,
</span>”
</span> <span class=
"emphasis"><em>i.e.
</em></span> any string of
1042 whitespace is equivalent to a single space. Keywords are parsed in a
1043 non-case-sensitive manner, meaning that
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">size
</code></span>”
</span>,
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">SIZE
</code></span>”
</span>, and
1044 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">SiZE
</code></span>”
</span> all parse as the same keyword; on the other hand, case is
1045 significant in glyph names.
1047 Numbers can be written in decimal, as in
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">256</code></span>”
</span>, in hexadecimal,
1048 as in
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">0x100</code></span>”
</span>, or in octal, as in
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">0400</code></span>”
</span>.
1050 Comments are introduced by a hash sign
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">#
</code></span>”
</span>. A
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">#
</code></span>”
</span> may
1051 appear at any point in a line, and all characters following the
1052 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">#
</code></span>”
</span> are ignored, up to the end of the line.
1054 The encoding file starts with the definition of the name of the
1055 encoding, and possibly its alternate names (aliases):
1057 </p><pre class=
"screen">
1058 STARTENCODING mulearabic-
0
1062 The name of the encoding and its aliases should be suitable for use in
1063 an XLFD font name, and therefore contain exactly one dash
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">-
</code></span>”
</span>.
1065 The encoding file may then optionally declare the size of the
1066 encoding. For a linear encoding (such as ISO
8859-
1), the SIZE
1067 line specifies the maximum code plus one:
1069 </p><pre class=
"screen">
1073 For a matrix encoding, it should specify two numbers. The first is
1074 the number of the last row plus one, the other, the highest column
1075 number plus one. In the case of
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">jisx0208.1990-
0</code></span>”
</span>
1076 (JIS X
0208(
1990), double-byte encoding, high bit clear), it
1079 </p><pre class=
"screen">
1083 In the case of a matrix encoding, a
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">FIRSTINDEX
</code></span>”
</span> line may be
1084 included to specify the minimum glyph index in an encoding. The
1085 keyword
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">FIRSTINDEX
</code></span>”
</span> is followed by two integers, the minimum row
1086 number followed by the minimum column number:
1088 </p><pre class=
"screen">
1089 FIRSTINDEX
0x20 0x20
1092 In the case of a linear encoding, a
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">FIRSTINDEX
</code></span>”
</span> line is not very
1093 useful. If for some reason however you chose to include on, it should
1094 be followed by a single integer.
1096 Note that in most font backends inclusion of a
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">FIRSTINDEX
</code></span>”
</span> line
1097 has the side effect of disabling default glyph generation, and this
1098 keyword should therefore be avoided unless absolutely necessary.
1100 Codes outside the region defined by the
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">SIZE
</code></span>”
</span> and
1101 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">FIRSTINDEX
</code></span>”
</span> lines are understood to be undefined. Encodings
1102 default to linear encoding with a size of
256 (
0x100). This means
1103 that you must declare the size of all
16 bit encodings.
1105 What follows is one or more mapping sections. A mapping section
1106 starts with a
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">STARTMAPPING
</code></span>”
</span> line stating the target of the mapping.
1107 The target may be one of:
1109 </p><div class=
"itemizedlist"><ul class=
"itemizedlist" type=
"disc"><li class=
"listitem"><p>
1110 Unicode (ISO
10646):
1112 </p><pre class=
"screen">
1113 STARTMAPPING unicode
1116 </p></li><li class=
"listitem"><p>
1117 a given TrueType
<span class=
"quote">“
<span class=
"quote">cmap
</span>”
</span>:
1119 </p><pre class=
"screen">
1120 STARTMAPPING cmap
3 1
1123 </p></li><li class=
"listitem"><p>
1124 PostScript glyph names:
1126 </p><pre class=
"screen">
1127 STARTMAPPING postscript
1130 </p></li></ul></div><p>
1132 Every line in a mapping section maps one from the encoding being
1133 defined to the target of the mapping. In mappings with a Unicode or
1134 TrueType mapping, codes are mapped to codes:
1136 </p><pre class=
"screen">
1142 As an abbreviation, it is possible to map a contiguous range of codes
1143 in a single line. A line consisting of three integers
1145 </p><pre class=
"screen">
1146 <it/start/
<it/end/
<it/target/
1149 is an abbreviation for the range of lines
1151 </p><pre class=
"screen">
1152 <span class=
"emphasis"><em>start
</em></span> <span class=
"emphasis"><em>target
</em></span>
1155 </p><pre class=
"screen">
1156 <span class=
"emphasis"><em>start
</em></span>+
1 <span class=
"emphasis"><em>target
</em></span>+
1
1159 </p><pre class=
"screen">
1163 </p><pre class=
"screen">
1164 <span class=
"emphasis"><em>end
</em></span> <span class=
"emphasis"><em>target
</em></span>+
<span class=
"emphasis"><em>end
</em></span>-
<span class=
"emphasis"><em>start
</em></span>
1167 For example, the line
1169 </p><pre class=
"screen">
1170 0x2121 0x215F 0x8140
1173 is an abbreviation for
1175 </p><pre class=
"screen">
1182 Codes not listed are assumed to map through the identity (
<span class=
"emphasis"><em>i.e.
</em></span> to
1183 the same numerical value). In order to override this default mapping,
1184 you may specify a range of codes to be undefined by using an
1185 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">UNDEFINE
</code></span>”
</span> line:
1187 </p><pre class=
"screen">
1191 or, for a single code,
1193 </p><pre class=
"screen">
1198 PostScript mappings are different. Every line in a PostScript mapping
1199 maps a code to a glyph name
1201 </p><pre class=
"screen">
1207 and codes not explicitly listed are undefined.
1209 A mapping section ends with an
<code class=
"literal">ENDMAPPING
</code> line
1211 </p><pre class=
"screen">
1215 After all the mappings have been defined, the file ends with an
1216 <code class=
"literal">ENDENCODING
</code> line
1218 </p><pre class=
"screen">
1223 In order to make future extensions to the format possible, lines
1224 starting with an unknown keyword are silently ignored, as are mapping
1225 sections with an unknown target.
1226 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Using_symbol_fonts"></a>Using symbol fonts
</h4></div></div></div><p>
1227 Type
1 symbol fonts should be installed using the
1228 <code class=
"literal">adobe-fontspecific
</code> encoding.
1230 In an ideal world, all TrueType symbol fonts would be installed using
1231 one of the
<code class=
"literal">microsoft-symbol
</code> and
<code class=
"literal">apple-roman
</code> encodings. A
1232 number of symbol fonts, however, are not marked as such; such fonts
1233 should be installed using
<code class=
"literal">microsoft-cp1252
</code>, or, for older fonts,
1234 <code class=
"literal">microsoft-win3.1
</code>.
1236 In order to guarantee consistent results (especially between
1237 Type
1 and TrueType versions of the same font), it is possible to
1238 define a special encoding for a given font. This has already been done
1239 for the
<code class=
"literal">ZapfDingbats
</code> font; see the file
1240 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">encodings/adobe-dingbats.enc
</code></span>”
</span>.
1241 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Hints_about_using_badly_encoded_fonts"></a>Hints about using badly encoded fonts
</h4></div></div></div><p>
1242 A number of text fonts are incorrectly encoded. Incorrect encoding
1243 is sometimes done by design, in order to make a font for an exotic
1244 script appear like an ordinary Western text font on systems which are
1245 not easily extended with new locale data. It is often the result of
1246 the font designer's laziness or incompetence; for some reason, most
1247 people seem to find it easier to invent idiosyncratic glyph names
1248 rather than follow the Adobe glyph list.
1250 There are two ways of dealing with such fonts: using them with the
1251 encoding they were designed for, and creating an
<span class=
"emphasis"><em>ad hoc
</em></span> encoding
1253 </p><div class=
"sect4"><div class=
"titlepage"><div><div><h5 class=
"title"><a id=
"Using_fonts_with_the_designers_encoding"></a>Using fonts with the designer's encoding
</h5></div></div></div><p>
1254 In the case of Type
1 fonts, the font designer can specify a
1255 default encoding; this encoding is requested by using the
1256 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">adobe-fontspecific
</code></span>”
</span> encoding in the XLFD name. Sometimes, the
1257 font designer omitted to specify a reasonable default encoding, in
1258 which case you should experiment with
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">adobe-standard
</code></span>”
</span>,
1259 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">iso8859-
1</code></span>”
</span>,
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">microsoft-cp1252
</code></span>”
</span>, and
1260 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">microsoft-win3.1
</code></span>”
</span>. (The encoding
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">microsoft-symbol
</code></span>”
</span> doesn't
1261 make sense for Type
1 fonts).
1263 TrueType fonts do not have a default encoding. However, most TrueType
1264 fonts are designed with either Microsoft or Apple platforms in mind,
1265 so one of
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">microsoft-symbol
</code></span>”
</span>,
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">microsoft-cp1252
</code></span>”
</span>,
1266 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">microsoft-win3.1
</code></span>”
</span>, or
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">apple-roman
</code></span>”
</span> should yield reasonable
1268 </p></div><div class=
"sect4"><div class=
"titlepage"><div><div><h5 class=
"title"><a id=
"Specifying_an_ad_hoc_encoding_file"></a>Specifying an
<span class=
"emphasis"><em>ad hoc
</em></span> encoding file
</h5></div></div></div><p>
1269 It is always possible to define an encoding file to put the glyphs
1270 in a font in any desired order. Again, see the
1271 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">encodings/adobe-dingbats.enc
</code></span>”
</span> file to see how this is done.
1272 </p></div><div class=
"sect4"><div class=
"titlepage"><div><div><h5 class=
"title"><a id=
"Specifying_font_aliases"></a>Specifying font aliases
</h5></div></div></div><p>
1273 By following the directions above, you will find yourself with a
1274 number of fonts with unusual names --- with encodings such as
1275 <span class=
"quote">“
<span class=
"quote"><code class=
"literal">adobe-fontspecific
</code></span>”
</span>,
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">microsoft-win3.1
</code></span>”
</span> <span class=
"emphasis"><em>etc
</em></span>. In order
1276 to use these fonts with standard applications, it may be useful to
1277 remap them to their proper names.
1279 This is done by writing a
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.alias
</code></span>”
</span> file. The format of this file
1280 is very simple: it consists of a series of lines each mapping an alias
1281 name to a font name. A
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.alias
</code></span>”
</span> file might look as follows:
1283 </p><pre class=
"screen">
1284 "-ogonki-alamakota-medium-r-normal--0-0-0-0-p-0-iso8859-2" \
1285 "-ogonki-alamakota-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific"
1288 (both XLFD names on a single line). The syntax of the
1289 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.alias
</code></span>”
</span> file is more precisely described in the
1290 <a class=
"ulink" href=
"mkfontdir.1.html" target=
"_top">mkfontdir(
1)
</a> manual page.
1291 </p></div></div></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Additional_notes_about_scalable_core_fonts"></a>Additional notes about scalable core fonts
</h3></div></div></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"About_the_FreeType_backend"></a>About the
<span class=
"emphasis"><em>FreeType
</em></span> backend
</h4></div></div></div><p>
1292 The
<span class=
"emphasis"><em>FreeType
</em></span> backend (formerly
<span class=
"emphasis"><em>xfsft
</em></span>)
1293 is a backend based on version
2 of the FreeType library (see
<a class=
"ulink" href=
"http://www.freetype.org/" target=
"_top">the FreeType web site
</a>) and has
1294 the X-TT functionalities for CJKV support provided by the After X-TT
1295 Project (see
<a class=
"ulink" href=
"http://x-tt.sourceforge.jp/" target=
"_top">the After X-TT Project web site
</a>). The
<span class=
"emphasis"><em>FreeType
</em></span> backend has support for the
1296 <span class=
"quote">“
<span class=
"quote">fontenc
</span>”
</span> style of internationalisation (see
1297 <a class=
"xref" href=
"#The_fontenc_layer" title=
"The fontenc layer">The
<span class=
"emphasis"><em>fontenc
</em></span> layer
</a>). This backend supports TrueType font files
1298 (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.ttf
</code></span>”
</span>), OpenType font files (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.otf
</code></span>”
</span>), TrueType Collections
1299 (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.ttc
</code></span>”
</span>), OpenType Collections (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.otc
</code></span>”
</span>) and Type
1 font
1300 files (
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.pfa
</code></span>”
</span> and
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">*.pfb
</code></span>”
</span>).
1302 In order to access the faces in a TrueType Collection file, the face
1303 number must be specified in the fonts.dir file before the filename,
1304 within a pair of colons, or by setting the 'fn' TTCap option. For example,
1307 </p><pre class=
"screen">
1308 :
1:mincho.ttc -misc-pmincho-medium-r-normal--
0-
0-
0-
0-p-
0-jisx0208.1990-
0
1312 refers to face
1 in the
<span class=
"quote">“
<span class=
"quote"><code class=
"filename">mincho.ttc
</code></span>”
</span> TrueType Collection file.
1314 The new
<span class=
"emphasis"><em>FreeType
</em></span> backend supports the extended
1315 <span class=
"quote">“
<span class=
"quote"><code class=
"filename">fonts.dir
</code></span>”
</span> syntax introduced by X-TrueType with a number
1316 of options, collectively known as
<span class=
"quote">“
<span class=
"quote">TTCap
</span>”
</span>. A
<span class=
"quote">“
<span class=
"quote">TTCap
</span>”
</span> entry follows the
1320 </p><pre class=
"screen">
1325 and should be specified before the filename. The new
<span class=
"emphasis"><em>FreeType
</em></span>
1326 almost perfectly supports TTCap options that are compatible with X-TT
1327 1.4. The Automatic Italic (
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">ai
</code></span>”
</span>), Double Strike (
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">ds
</code></span>”
</span>) and
1328 Bounding box Width (
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">bw
</code></span>”
</span>) options are indispensable in CJKV.
1332 </p><pre class=
"screen">
1333 mincho.ttc -misc-mincho-medium-r-normal--
0-
0-
0-
0-c-
0-jisx0208.1990-
0
1334 ds=y:mincho.ttc -misc-mincho-bold-r-normal--
0-
0-
0-
0-c-
0-jisx0208.1990-
0
1335 ai=
0.2:mincho.ttc -misc-mincho-medium-i-normal--
0-
0-
0-
0-c-
0-jisx0208.1990-
0
1336 ds=y:ai=
0.2:mincho.ttc -misc-mincho-bold-i-normal--
0-
0-
0-
0-c-
0-jisx0208.1990-
0
1337 bw=
0.5:mincho.ttc -misc-mincho-medium-r-normal--
0-
0-
0-
0-c-
0-jisx0201.1976-
0
1338 bw=
0.5:ds=y:mincho.ttc -misc-mincho-bold-r-normal--
0-
0-
0-
0-c-
0-jisx0201.1976-
0
1339 bw=
0.5:ai=
0.2:mincho.ttc -misc-mincho-medium-i-normal--
0-
0-
0-
0-c-
0-jisx0201.1976-
0
1340 bw=
0.5:ds=y:ai=
0.2:mincho.ttc -misc-mincho-bold-i-normal--
0-
0-
0-
0-c-
0-jisx0201.1976-
0
1344 setup the complete combination of jisx0208 and jisx0201 using mincho.ttc
1345 only. More information on the TTCap syntax is found on
<a class=
"ulink" href=
"http://x-tt.sourceforge.jp/" target=
"_top">the After X-TT Project page
</a>.
1347 The
<span class=
"emphasis"><em>FreeType
</em></span> backend uses the
<span class=
"emphasis"><em>fontenc
</em></span> layer in order to support
1348 recoding of fonts; this was described in
<a class=
"xref" href=
"#The_fontenc_layer" title=
"The fontenc layer">The
<span class=
"emphasis"><em>fontenc
</em></span> layer
</a>
1349 and especially
<a class=
"xref" href=
"#The_FreeType_backend" title=
"The FreeType backend">The
<span class=
"emphasis"><em>FreeType
</em></span> backend
</a> earlier in this document.
1350 </p></div><div class=
"sect3"><div class=
"titlepage"><div><div><h4 class=
"title"><a id=
"Delayed_glyph_rasterisation"></a>Delayed glyph rasterisation
</h4></div></div></div><p>
1351 When loading a proportional fonts which contain a huge number of glyphs,
1352 the old
<span class=
"emphasis"><em>FreeType
</em></span> delayed glyph rasterisation until the time at which
1353 the glyph was first used. The new FreeType (libfreetype-xtt2) has an
1354 improved
<span class=
"quote">“
<span class=
"quote">very lazy
</span>”
</span> metric calculation method to speed up the process when
1355 loading TrueType or OpenType fonts. Although the
<span class=
"emphasis"><em>X-TT
</em></span> module also
1356 has this method, the
"<code class="literal
">vl=y</code>" TTCap option must be set if you want to
1357 use it. This is the default method for
<span class=
"emphasis"><em>FreeType
</em></span> when it loads
1358 multi-byte fonts. Even if you use a unicode font which has tens of
1359 thousands of glyphs, this delay will not be worrisome as long as you use
1360 the new
<span class=
"emphasis"><em>FreeType
</em></span> backend -- its
<span class=
"quote">“
<span class=
"quote">very lazy
</span>”
</span> method is super-fast.
1362 The maximum error of bitmap position using
<span class=
"quote">“
<span class=
"quote">very lazy
</span>”
</span> method is
1 pixel,
1363 and is the same as that of a character-cell spacing. When the X-TT
1364 backend is used with the
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">vl=y
</code></span>”
</span> option, a chipped bitmap is displayed
1365 with certain fonts. However, the new FreeType backend has minimal problem
1366 with this, since it corrects left- and right-side bearings using
1367 <span class=
"quote">“
<span class=
"quote">italicAngle
</span>”
</span> in the TrueType/OpenType post table, and does automatic
1368 correction of bitmap positions when rasterisation so that chipped bitmaps
1369 are not displayed. Nevertheless if you don't want to use the
<span class=
"quote">“
<span class=
"quote">very lazy
</span>”
</span>
1370 method when using multi-bytes fonts, set
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">vl=n
</code></span>”
</span> in the TTCap option to
1374 </p><pre class=
"screen">
1375 vl=n:luxirr.ttf -b
&h-Luxi Serif-medium-r-normal--
0-
0-
0-
0-p-
0-iso10646-
1
1379 Of course, both backends also support an optimisation for character-cell
1380 fonts (fonts with all glyph metrics equal, or terminal fonts). A font
1381 with an XLFD specifying a character-cell spacing
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">c
</code></span>”
</span>, as in
1384 </p><pre class=
"screen">
1385 -misc-mincho-medium-r-normal--
0-
0-
0-
0-c-
0-jisx0208.1990-
0
1392 </p><pre class=
"screen">
1393 fs=c:mincho.ttc -misc-mincho-medium-r-normal--
0-
0-
0-
0-p-
0-jisx0208.1990-
0
1397 will not compute the metric for each glyph, but instead
1398 trust the font to be a character-cell font. You are
1399 encouraged to make use of this optimisation when useful, but be warned
1400 that not all monospaced fonts are character-cell fonts.
1401 </p></div></div></div><div class=
"sect1"><div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both"><a id=
"Appendix_background_and_terminology"></a>Appendix: background and terminology
</h2></div></div></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Characters_and_glyphs"></a>Characters and glyphs
</h3></div></div></div><p>
1402 A computer text-processing system inputs keystrokes and outputs
1403 <span class=
"emphasis"><em>glyphs
</em></span>, small pictures that are assembled on paper or on a
1404 computer screen. Keystrokes and glyphs do not, in general, coincide:
1405 for example, if the system does generate ligatures, then to the
1406 sequence of two keystrokes
<<code class=
"literal">f
</code>><<code class=
"literal">i
</code>> will typically
1407 correspond a single glyph. Similarly, if the system shapes Arabic
1408 glyphs in a vaguely reasonable manner, then multiple different glyphs
1409 may correspond to a single keystroke.
1411 The complex transformation rules from keystrokes to glyphs are usually
1412 factored into two simpler transformations, from keystrokes to
1413 <span class=
"emphasis"><em>characters
</em></span> and from characters to glyphs. You may want to think
1414 of characters as the basic unit of text that is stored
<span class=
"emphasis"><em>e.g.
</em></span> in
1415 the buffer of your text editor. While the definition of a character
1416 is intrinsically application-specific, a number of standardised
1417 collections of characters have been defined.
1419 A
<span class=
"emphasis"><em>coded character set
</em></span> is a set of characters together with a
1420 mapping from integer codes --- known as
<span class=
"emphasis"><em>codepoints
</em></span> --- to
1421 characters. Examples of coded character sets include US-ASCII,
1422 ISO
8859-
1, KOI8-R, and JIS X
0208(
1990).
1424 A coded character set need not use
8 bit integers to index characters.
1425 Many early systems used
6 bit character sets, while
16 bit (or more)
1426 character sets are necessary for ideographic writing systems.
1427 </p></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Font_files_fonts_and_XLFD"></a>Font files, fonts, and XLFD
</h3></div></div></div><p>
1428 Traditionally, typographers speak about
<span class=
"emphasis"><em>typefaces
</em></span> and
1429 <span class=
"emphasis"><em>founts
</em></span>. A typeface is a particular style or design, such as
1430 Times Italic, while a fount is a molten-lead incarnation of a given
1431 typeface at a given size.
1433 Digital fonts come in
<span class=
"emphasis"><em>font files
</em></span>. A font file contains the
1434 information necessary for generating glyphs of a given typeface, and
1435 applications using font files may access glyph information in an
1438 Digital fonts may consist of bitmap data, in which case they are said
1439 to be
<span class=
"emphasis"><em>bitmap fonts
</em></span>. They may also consist of a mathematical
1440 description of glyph shapes, in which case they are said to be
1441 <span class=
"emphasis"><em>scalable fonts
</em></span>. Common formats for scalable font files are
1442 <span class=
"emphasis"><em>Type
1</em></span> (sometimes incorrectly called
<span class=
"emphasis"><em>ATM fonts
</em></span> or
1443 <span class=
"emphasis"><em>PostScript fonts
</em></span>),
<span class=
"emphasis"><em>TrueType
</em></span> and
<span class=
"emphasis"><em>OpenType
</em></span>.
1445 The glyph data in a digital font needs to be indexed somehow. How
1446 this is done depends on the font file format. In the case of
1447 Type
1 fonts, glyphs are identified by
<span class=
"emphasis"><em>glyph names
</em></span>. In the
1448 case of TrueType fonts, glyphs are indexed by integers corresponding
1449 to one of a number of indexing schemes (usually Unicode --- see below).
1451 The X11 core fonts system uses the data in a font file to generate
1452 <span class=
"emphasis"><em>font instances
</em></span>, which are collections of glyphs at a given size
1453 indexed according to a given encoding.
1455 X11 core font instances are usually specified using a notation known
1456 as the
<span class=
"emphasis"><em>X Logical Font Description
</em></span> (XLFD). An XLFD starts with a
1457 dash
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">-
</code></span>”
</span>, and consists of fourteen fields separated by dashes,
1460 </p><pre class=
"screen">
1461 -adobe-courier-medium-r-normal--
12-
120-
75-
75-m-
70-iso8859-
1
1464 Or particular interest are the last two fields
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">iso8859-
1</code></span>”
</span>, which
1465 specify the font instance's encoding.
1467 A scalable font is specified by an XLFD which contains zeroes instead
1470 </p><pre class=
"screen">
1471 -adobe-courier-medium-r-normal--
0-
0-
0-
0-m-
0-iso8859-
1
1475 X11 font instances may also be specified by short name. Unlike an
1476 XLFD, a short name has no structure and is simply a conventional name
1477 for a font instance. Two short names are of particular interest, as
1478 the server will not start if font instances with these names cannot be
1479 opened. These are
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">fixed
</code></span>”
</span>, which specifies the fallback font to
1480 use when the requested font cannot be opened, and
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">cursor
</code></span>”
</span>, which
1481 specifies the set of glyphs to be used by the mouse pointer.
1483 Short names are usually implemented as aliases to XLFDs; the
1484 standard
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">fixed
</code></span>”
</span> and
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">cursor
</code></span>”
</span> aliases are defined in
1486 </p><pre class=
"screen">
1487 /usr/share/font/X11/misc/fonts.alias
1490 </p></div><div class=
"sect2"><div class=
"titlepage"><div><div><h3 class=
"title"><a id=
"Unicode"></a>Unicode
</h3></div></div></div><p>
1491 Unicode (
<a class=
"ulink" href=
"http://www.unicode.org" target=
"_top">http://www.unicode.org
</a>) is a coded character
1492 set with the goal of uniquely identifying all characters for all
1493 scripts, current and historical. While Unicode was explicitly not
1494 designed as a glyph encoding scheme, it is often possible to use it as
1497 Unicode is an
<span class=
"emphasis"><em>open
</em></span> character set, meaning that codepoint
1498 assignments may be added to Unicode at any time (once specified,
1499 though, an assignment can never be changed). For this reason, a
1500 Unicode font will be
<span class=
"emphasis"><em>sparse
</em></span>, meaning that it only defines glyphs
1501 for a subset of the character registry of Unicode.
1503 The Unicode standard is defined in parallel with the international
1504 standard ISO
10646. Assignments in the two standards are always
1505 equivalent, and we often use the terms
<span class=
"emphasis"><em>Unicode
</em></span> and
1506 <span class=
"emphasis"><em>ISO
10646</em></span> interchangeably.
1508 When used in the X11 core fonts system, Unicode-encoded fonts should
1509 have the last two fields of their XLFD set to
<span class=
"quote">“
<span class=
"quote"><code class=
"literal">iso10646-
1</code></span>”
</span>.
1510 </p></div></div><div class=
"sect1"><div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both"><a id=
"References"></a>References
</h2></div></div></div><p>
1511 X11R7.7 comes with extensive documentation in the form of manual
1512 pages and typeset documents. Before installing fonts, you really should
1513 read the
<a class=
"ulink" href=
"fontconfig.3.html" target=
"_top">fontconfig(
3)
</a> and
1514 <a class=
"ulink" href=
"mkfontdir.1.html" target=
"_top">mkfontdir(
1)
</a> manual pages; other
1515 manual pages of interest include
<a class=
"ulink" href=
"X.7.html" target=
"_top">X(
7)
</a>,
1516 <a class=
"ulink" href=
"Xserver.1.html" target=
"_top">Xserver(
1)
</a>,
<a class=
"ulink" href=
"xset.1.html" target=
"_top">xset(
1)
</a>,
<a class=
"ulink" href=
"Xft.3.html" target=
"_top">Xft(
3)
</a>,
<a class=
"ulink" href=
"xlsfonts.1.html" target=
"_top">xlsfonts(
1)
</a> and
<a class=
"ulink" href=
"showfont.1.html" target=
"_top">showfont(
1)
</a>. In addition, you may want to read the
<a href=
"../xlfd/xlfd.html#xlfd" class=
"olink">X Logical Font Description document
</a> by Jim Flowers.
1518 The
<a class=
"ulink" href=
"http://www.faqs.org/faqs/by-newsgroup/comp/comp.fonts.html" target=
"_top">comp.fonts FAQ
</a>,
1519 which is unfortunately no longer being maintained, contains a wealth
1520 of information about digital fonts.
1522 Xft and Fontconfig are described on
1523 <a class=
"ulink" href=
"http://www.fontconfig.org" target=
"_top">the Fontconfig site
</a>.
1526 <a class=
"ulink" href=
"http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/" target=
"_top">xfsft home page
</a>
1527 has been superseded by this document, and is now obsolete; you may
1528 however still find some of the information that it contains useful.
1529 <a class=
"ulink" href=
"http://www.joerg-pommnitz.de/TrueType/xfsft.html" target=
"_top">Joerg Pommnitz' xfsft page
</a>
1530 is the canonical source for the
<span class=
"quote">“
<span class=
"quote"><span class=
"command"><strong>ttmkfdir
</strong></span></span>”
</span> utility, which is the
1531 ancestor of
<span class=
"command"><strong>mkfontscale
</strong></span>.
1533 <a class=
"ulink" href=
"http://www.pps.jussieu.fr/~jch/software/" target=
"_top">The author's software pages
</a>
1534 might or might not contain related scribbles and development versions
1537 The documentation of
<span class=
"emphasis"><em>X-TrueType
</em></span> is available from
<a class=
"ulink" href=
"http://x-tt.sourceforge.jp/" target=
"_top">the After X-TT Project page
</a>.
1539 While the
<a class=
"ulink" href=
"http://www.unicode.org" target=
"_top">Unicode consortium site
</a>
1540 may be of interest, you are more likely to find what you need in
1541 Markus Kuhn's
<a class=
"ulink" href=
"http://www.cl.cam.ac.uk/~mgk25/unicode.html" target=
"_top">UTF-
8 and Unicode FAQ
</a>.
1543 The IETF RFC documents, available from a number of sites throughout
1544 the world, often provide interesting information about character set
1545 issues; see for example
<a class=
"ulink" href=
"https://datatracker.ietf.org/doc/rfc373/" target=
"_top">RFC
373</a>.
1546 </p></div></div></body></html>