source: x/installing/tuning-fontconfig.xml@ 1307636

12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since 1307636 was 1307636, checked in by Ken Moffat <ken@…>, 7 months ago

tuningfonts -

We use <application> in the markup for all package names. Do that
consistently for rendered text on these pages, except when referring
to a version of a package.

  • Property mode set to 100644
File size: 50.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="tuning-fontconfig">
9 <?dbhtml filename="tuning-fontconfig.html"?>
10
11
12 <title>Tuning Fontconfig</title>
13
14 <indexterm zone="tuning-fontconfig">
15 <primary sortas="g-tuning-fontconfig">Tuning Fontconfig</primary>
16 </indexterm>
17
18 <sect2 id='fontconfig-overview' xreflabel="Overview of Fontconfig">
19 <title>Overview of Fontconfig</title>
20
21<!-- do not add individual indexterm entries for items within this page, they
22 all belong in section G (others) and not only do they add noise in longindex,
23 the links all point to the top of the page. -->
24
25 <para>
26 If you only read text in English, and are happy with the common libre
27 fonts listed on the next page, you may never need to worry about the
28 details of how <application>Fontconfig</application> works. But there are
29 many things which can be altered if they do not suit your needs.
30 </para>
31
32 <para>
33 Although this page is long, it barely scratches the surface and you will
34 be able to find many alternative views on the web (but please remember
35 that some things have changed over the years, for example the autohinter
36 is no longer the default). The aim here is to give you enough information
37 to understand the changes you are making, why they may not always work,
38 and to identify online information which is no-longer appropriate.
39 </para>
40
41 <para>
42 Unfortunately, some of the terminology is ambiguous (e.g. 'font face' can
43 mean a name known to Fontconfig, <emphasis>or</emphasis> the ordinary,
44 condensed, etc variations of a font) and 'style' can be used to
45 differentiate 'ordinary' from 'italic', or in describing some classes of
46 Serif fonts.
47 </para>
48
49 <para>The following links are to assist navigation in this page.</para>
50 <itemizedlist>
51 <listitem>
52 <para><xref linkend="xft-font-protocol"/></para>
53 </listitem>
54 <listitem>
55 <para><xref linkend="useful-commands"/></para>
56 </listitem>
57 <listitem>
58 <para><xref linkend="the-various-files"/></para>
59 </listitem>
60 <listitem>
61 <para><xref linkend="rules-to-choose-a-font"/></para>
62 </listitem>
63 <listitem>
64 <para><xref linkend="hinting-and-antialiasing"/></para>
65 </listitem>
66 <listitem>
67 <para><xref linkend="disabling-bitmap-fonts"/></para>
68 </listitem>
69 <listitem>
70 <para><xref linkend="synthetic-changes"/></para>
71 </listitem>
72 <listitem>
73 <para><xref linkend="adding-extra-directories"/></para>
74 </listitem>
75 <listitem>
76 <para><xref linkend="preferring-certain-fonts"/></para>
77 </listitem>
78 <listitem>
79 <para><xref linkend="fontconfig-user-docs"/></para>
80 </listitem>
81 <listitem>
82 <para><xref linkend="prefer-a-specific-font"/></para>
83 </listitem>
84 <listitem>
85 <para><xref linkend="prefer-chosen-CJK-fonts"/></para>
86 </listitem>
87 <listitem>
88 <para><xref linkend="editing-old-style-conf-files"/></para>
89 </listitem>
90 <listitem>
91 <para><xref linkend="font-weights"/></para>
92 </listitem>
93 <listitem>
94 <para><xref linkend="items-which-can-override-fontconfig"/></para>
95 </listitem>
96 <listitem>
97 <para><xref linkend="external-links"/></para>
98 </listitem>
99 </itemizedlist>
100
101 </sect2>
102
103 <sect2 role="configuration" id="xft-font-protocol" xreflabel="The Xft Font Protocol">
104 <title>The Xft Font Protocol</title>
105
106 <para>
107 The Xft font protocol provides antialiased font rendering through
108 <application>freetype</application>, and fonts are controlled from the
109 client side using <application>Fontconfig</application> (except for
110 <xref linkend="rxvt-unicode"/> which can use fonts listed in
111 <filename>~/.Xresources</filename>, and <xref linkend="abiword"/> which
112 only uses the specified font). The default search path is <filename
113 class="directory">/usr/share/fonts</filename> and <filename
114 class="directory">~/.local/share/fonts</filename>, although for the moment
115 the old and deprecated location <filename
116 class="directory">~/.fonts</filename> still works.
117 <application>Fontconfig</application> searches directories in its path
118 recursively and maintains a cache of the font characteristics in each
119 directory. If the cache appears to be out of date, it is ignored, and
120 information is fetched from the fonts themselves (that can take a few
121 seconds if you have a lot of fonts installed).
122 </para>
123
124 <para>
125 If you've installed <application>Xorg</application> in any prefix
126 other than <filename class="directory">/usr</filename>, any
127 <application>X</application> fonts were not installed in a
128 location known to <application>Fontconfig</application>. Symlinks were
129 <!-- fonts-misc-ethiopic installs an OTF directory ! -->
130 created from the <filename class="directory">OTF</filename> and <filename
131 class="directory">TTF</filename> <application>X</application> font
132 directories to <filename
133 class="directory">/usr/share/fonts/X11-{OTF,TTF}</filename>. This allows
134 <application>Fontconfig</application> to use the OpenType and TrueType
135 fonts provided by <application>X</application>, although many people will
136 prefer to use more modern fonts.
137 </para>
138
139 <para>
140 <application>Fontconfig</application> uses names to define fonts.
141 Applications generally use generic font names such as "Monospace", "Sans"
142 and "Serif". <application>Fontconfig</application> resolves these names
143 to a font that has all characters that cover the orthography of the
144 language indicated by the locale settings.
145 </para>
146
147 </sect2>
148
149 <sect2 role="configuration" id="useful-commands" xreflabel="Useful Commands">
150 <title>Useful Commands</title>
151
152 <para>
153 The following commands may be helpful when working with
154 <application>Fontconfig</application>,
155 particularly if you are interested in overriding which font will be
156 chosen. 'TYPE' should be one of serif, sans-serif or monospace.
157 </para>
158
159 <para>
160 <command>fc-list | less</command> : shows a list of all available fonts
161 (/path/to/filename: Font Name:style). If you installed a font more than
162 30 seconds ago but it does not show, then it or one of its directories is
163 not readable by your user.
164 </para>
165
166 <para>
167 <command>fc-match 'Font Name'</command> : tells you which font will
168 be used if the named font is requested. Typically you would use this to
169 see what happens if a font you have not installed is requested, but you
170 can also use it if the system is giving you a different font from
171 what you expected (perhaps because <application>Fontconfig</application>
172 does not think that the font supports your language).
173 </para>
174
175 <para>
176 <command>fc-match -a <replaceable>Type</replaceable> | less</command> :
177 provides a list of all fonts which can be used for that type (Monospace,
178 Sans Sans-serif, Serif <emphasis>(capital letters optional)</emphasis>).
179 Note that in-extremis <application>Fontconfig</application> will take a
180 glyph from any available font, even if it is not of the specified type,
181 and unless it knows about the font's type it will assume it is Sans.
182 </para>
183
184 <para>
185 <command>fc-match 'Serif :lang=ja:weight=bold'</command> will tell you
186 which font and weight will be chosen for Japanese text in bold weight.
187 It does not mean that the reported font will necessarily be able to show
188 Japanese ideograms, so a fallback might be used, or some glyphs may be
189 missing. For language codes use ISO-639 value such as 'fr', 'ja', 'zh-cn'.
190 Note that an unrecognized value such as just 'zh' will not return any
191 match. To illustrate the fallback, on a system wherei both Noto Sans Mono
192 and DejaVu Sans Mono are installed, <command>fc-match 'monospace
193 :lang=en</command> shows Noto Sans Mono will be used, but if the lang is
194 changed to 'ar' (arabic) DejaVu Sans will be used.
195 </para>
196
197 <para>
198 If you want to determine if a font file has hinting (many older fonts do not,
199 because it was patented) use <command>fc-query
200 <replaceable>/path/to/fontfile</replaceable> | grep 'fonthashint:'</command>:
201 which will report 'True(s)' or 'False(s)'.
202 </para>
203
204 <para>
205 If you wish to know which font will be used for a string of text
206 (i.e. one or more glyphs, preceded by a space), paste the following
207 command and replace the <literal>xyz</literal> by the text you care
208 about:
209 </para>
210
211 <para>
212 <command>FC_DEBUG=4 pango-view --font=monospace -t xyz | grep
213 family</command> : this requires <xref linkend="pango"/> and <xref
214 linkend="imagemagick"/> - it will invoke <xref linkend="display"/>
215 to show the text in a tiny window, and after closing that the last
216 line of the output will show which font was chosen. This is
217 particularly useful for CJK languages, and you can also pass a
218 language, e.g. PANGO_LANGUAGE=en;ja (English, then assume Japanese)
219 or just zh-cn (or other variants such as zh-sg or zh-tw).
220 </para>
221
222 </sect2>
223
224 <sect2 role="configuration" id="the-various-files" xreflabel="The configuration files">
225 <title>The configuration files</title>
226
227 <para>
228 The main files are in <filename class="directory">/etc/fonts/conf.d/</filename>,
229 which was intended to be a directory populated by symlinks to some of the files
230 in <filename class="directory">/usr/share/fontconfig/conf.avail/</filename>.
231 But many people, and some packages, create the files directly. Each file name
232 must be in the form of two digits, a dash, somename.conf and they are read in
233 sequence.
234 </para>
235
236 <para>
237 By convention, the numbers are assigned as follows:
238 </para>
239
240 <itemizedlist>
241 <listitem>
242 <para>
243 00-09 extra font directories
244 </para>
245 </listitem>
246 <listitem>
247 <para>
248 10-19 system rendering defaults (such as antialiasing)
249 </para>
250 </listitem>
251 <listitem>
252 <para>
253 20-29 font rendering options
254 </para>
255 </listitem>
256 <listitem>
257 <para>
258 30-39 family substitution
259 </para>
260 </listitem>
261 <listitem>
262 <para>
263 40-49 map family to generic type
264 </para>
265 </listitem>
266 <listitem>
267 <para>
268 50-59 load alternate config files
269 </para>
270 </listitem>
271 <listitem>
272 <para>
273 60-69 generic aliases, map generic to family
274 </para>
275 </listitem>
276 <listitem>
277 <para>
278 70-79 adjust which fonts are available
279 </para>
280 </listitem>
281 <listitem>
282 <para>
283 80-89 match target scan (modify scanned patterns)
284 </para>
285 </listitem>
286 <listitem>
287 <para>
288 90-99 font synthesis
289 </para>
290 </listitem>
291 </itemizedlist>
292
293 <para>
294 You can also have a personal <filename>fonts.conf</filename> in
295 $XDG_CONFIG_HOME (which is <filename
296 class="directory">~/.config/fontconfig/</filename>).
297 </para>
298
299 </sect2>
300
301 <sect2 role="configuration" id="rules-to-choose-a-font" xreflabel="The rules to choose a font">
302 <title>The rules to choose a font</title>
303
304 <para>
305 If the requested font is installed, and provided it contains the
306 codepoints <emphasis>required</emphasis> for the current language (in the
307 source, see the .orth files in the <filename
308 class="directory">fc-lang/</filename> directory), it will be used.
309 </para>
310
311 <para>
312 However, if the document or page requested a font which is not installed
313 (or, occasionally, does not contain all the required codepoints) the
314 following rules come into play: First,
315 <filename>30-metric-aliases.conf</filename> is used to map aliases for
316 some fonts with the same metrics (same size, etc). Note that there are
317 both weak and strong aliases so that aliases for one form such as
318 Helvetica or Times New Roman can be satisfied by the other style, i.e.
319 anything which is an alias of Arial or Times in those examples. some
320 examples of Latin fonts with the same metrics can be found in the
321 'Substitutes' PDFs at <ulink
322 url="http://zarniwhoop.uk/files/PDF-substitutes/">zarniwhoop.uk.)</ulink>
323 </para>
324
325 <para>
326 After that, an unknown font will be searched for in
327 <filename>45-latin.conf</filename>:
328 'Latin' covers Cyrillic and Greek, and now also maps system-ui fonts which
329 are used for User Interface messages in other alphabets. If the font
330 is found it will be mapped as serif, sans-serif, monospace, fantasy,
331 cursive, or system-ui. Otherwise, 49-sansserif.conf will assume it is
332 Sans.
333 </para>
334 <para>
335 Then <filename>60-latin.conf</filename>
336 provides ordered lists of the fallbacks - <xref linkend="noto-fonts"/>
337 will be used if you installed them. Cyrillic and Greek appear to be
338 treated in the same way.All of these files prefer
339 commercial fonts if they are present, although modern libre fonts are
340 often at least equal. Finally, if a codepoint is still not found it can
341 be taken from any available system font. The following details only
342 mention freely available fonts.
343 </para>
344
345 <para>
346 Default Persion fonts are dealt with in
347 <filename>65-fonts-persian.conf</filename>. It looks as if all the listed
348 fonts are commercial. Using fonts that support Persian (which has its own
349 variant of the arabic alphabet, and its own font styles) is outside the
350 skills of the BLFS editors.
351 </para>
352
353 <para>
354 All remaining scripts for which <application>Fontconfig</application> has
355 preferences (CJK scripts,
356 Indic scripts) are dealt with in <filename>65-nonlatin.conf</filename>.
357 These are again nominally grouped as Serif, Sans-Serif, Monospace. Of the
358 free fonts, WenQuanYi Zen Hei (Pan-CJK Sans) comes first for both Serif
359 and for Sans. Therefore, if you install this as a fallback but want to
360 use different fonts for Japanese or Korean you will need to set up a
361 preference. Similarly, the old fireflysung Serif font is also listed for
362 Sans.
363 </para>
364
365 <para>
366 After Pan-CJK and Chinese fonts come several Japanese fonts and then
367 several Korean fonts (both split appropriately between Sans and Serif).
368 Finally come the various Lohit Indic families (one font file per script),
369 labelled as both Sans and Serif.
370 </para>
371
372 <para>
373 The Monospace fonts listed in <filename>65-nonlatin.conf</filename> do
374 not include WenQuanYi Zen Hei although that will be available as a
375 fallback if installed. Several Japanese Gothic fonts are listed, followed
376 by AR PL KaitiM GB (a zh-sc 'Brush' font), AR PL Serif fonts for zh-sc
377 (SungtiL) and zh-tw (Mingti2L), some Korean Sans fonts and the various
378 Lohit Indic families.
379 </para>
380
381 <para>
382 For UI fonts, various Noto Sans UI fonts are the only listed free fonts.
383 </para>
384
385 <para>
386 The various Noto CJK fonts are <emphasis>not</emphasis> among the listed
387 fonts, possibly the RedHat developers preferred other fonts. These now
388 come in many variations, probably anyone who uses these will not install
389 any other CJK fonts.
390 </para>
391
392 <para>
393 Before Fontconfig-2.14, the first preferred Latin font family was Bitstream
394 Vera. In practice that was rarely used because it covered so little. After
395 that, DejaVu was the next preferred family, so people were recommended to
396 install that. That has now changed, Bitstream Vera has been replaced by the
397 relevant Noto fonts (Serif, Sans, Sans Mono), so these will be preferred if
398 they have been installed, followed by DejaVu.
399 </para>
400
401 <para>
402 For serif, Times New Roman could have been aliased from Liberation Serif or
403 Tinos, and Times from TeX Gyre Termes, so although the named fonts are not
404 free, the metric-compatilbe fonts can be used. Ignoring other non-free fonts,
405 the remaining order for serif is: Times New Roman, Luxi Serif, Nimbus Roman
406 No9 L, Times. In practice, that means those fonts at the end of the list
407 are unlikely to be used unless a web page asks for them.
408 </para>
409
410 <para>
411 For sans-serif, the remaining order is anything mapped to Arial, Luxi Sans,
412 Nimbus Sans L, anything mapped to Helvetica.
413 </para>
414
415 <para>
416 The remaining alternatives for monospace are Inconsolata, anything mapped
417 to Courier New, Luxi Mono, Nimbus Mono, anything mapped to Courier.
418 </para>
419
420 <para>
421 For 'fantasy' there are no free fonts, so
422 <application>Fontconfig</application> will fall back to sans-serif.
423 </para>
424
425 <para>
426 For 'cursive', the only free font is TeX Gyre Chorus as an alias for
427 ITC Zapf chancery, otherwise <application>Fontconfig</application> will
428 again fall back to sans-serif.
429 </para>
430
431 <para>
432 The system-ui category is unusual. It is for interface messages, so some
433 scripts need special versions to fit in the available space. For Latin,
434 Greek and Cyrillic an ordinary sans font should fit without problems. However,
435 the first preferred font is Cantarell, followed by Noto Sans UI. Cantarell
436 started as a Latin sans-serif font, that has been forked in Gnome under
437 the same name but they only provide the source. The Noto Sans UI fonts are
438 for other languages.
439 </para>
440
441 <para>
442 Since Fontconfig-2.12.5, there is also generic family matching for some
443 emoji and math fonts, please see {45,60}-generic.conf.
444 </para>
445
446 <para>
447 In the rare cases where a font does not contain all the expected
448 codepoints, see 'Trial the First:' at <xref
449 linkend="I-stared-into-the-fontconfig"/> for the long details.
450 </para>
451
452 </sect2>
453
454 <sect2 role="configuration" id="hinting-and-antialiasing" xreflabel="Hinting and Anti-aliasing">
455 <title>Hinting and Anti-aliasing</title>
456
457 <para>
458 It is possible to change how, or if, fonts are hinted. The following
459 example file contains the default settings, but with comments. The
460 settings are very much down to the user's preferences and to the choice
461 of fonts, so a change which improves some pages may worsen others. The
462 preferred location for this file is:
463 <filename>~/.config/fontconfig/fonts.conf</filename>
464 </para>
465
466 <para>
467 To try out different settings, you may need to exit from Xorg and then
468 run <command>startx</command> again so that all applications use the new
469 settings. Several things can override the fontconfig settings, see
470 <xref linkend="items-which-can-override-fontconfig"/> below. To explore
471 the possibilities, create a file for your user:
472 </para>
473
474<screen><userinput>mkdir -pv ~/.config/fontconfig &amp;&amp;
475cat > ~/.config/fontconfig/fonts.conf &lt;&lt; "EOF"
476<literal>&lt;?xml version='1.0'?&gt;
477&lt;!DOCTYPE fontconfig SYSTEM 'fonts.dtd'&gt;
478&lt;fontconfig&gt;
479
480 &lt;match target="font" &gt;
481 &lt;!-- autohint was the old automatic hinter when hinting was patent
482 protected, so turn it off to ensure any hinting information in the font
483 itself is used, this is the default --&gt;
484 &lt;edit mode="assign" name="autohint"&gt; &lt;bool&gt;false&lt;/bool&gt;&lt;/edit&gt;
485
486 &lt;!-- hinting is enabled by default --&gt;
487 &lt;edit mode="assign" name="hinting"&gt; &lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;
488
489 &lt;!-- for the lcdfilter see https://www.spasche.net/files/lcdfiltering/ --&gt;
490 &lt;edit mode="assign" name="lcdfilter"&gt; &lt;const&gt;lcddefault&lt;/const&gt;&lt;/edit&gt;
491
492 &lt;!-- options for hintstyle:
493 hintfull: is supposed to give a crisp font that aligns well to the
494 character-cell grid but at the cost of its proper shape. However, anything
495 using Pango >= 1.44 will not support full hinting, Pango now uses harfbuzz
496 for hinting. Apps which use Skia (e.g. Chromium, Firefox) should not be
497 affected by this. <!-- https://github.com/harfbuzz/harfbuzz/issues/2394 -->
498
499 hintmedium: is reported to be broken.
500 hintslight is the default: - supposed to be more fuzzy but retains shape.
501
502 hintnone: seems to turn hinting off.
503 The variations are marginal and results vary with different fonts --&gt;
504 &lt;edit mode="assign" name="hintstyle"&gt; &lt;const&gt;hintslight&lt;/const&gt;&lt;/edit&gt;
505
506 &lt;!-- antialiasing is on by default and really helps for faint characters
507 and also for 'xft:' fonts used in rxvt-unicode --&gt;
508 &lt;edit mode="assign" name="antialias"&gt; &lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;
509
510 &lt;!-- subpixels are usually rgb, see
511 http://www.lagom.nl/lcd-test/subpixel.php --&gt;
512 &lt;edit mode="assign" name="rgba"&gt; &lt;const&gt;rgb&lt;/const&gt;&lt;/edit&gt;
513
514 &lt;!-- thanks to the Arch wiki for the lcd and subpixel links --&gt;
515 &lt;/match&gt;
516
517&lt;/fontconfig&gt;</literal>
518EOF</userinput></screen>
519
520 <para>
521 You will now need to edit the file in your preferred editor. Many of the
522 different settings give very subtle differences and the results may differ
523 for some of the fonts you use.
524 </para>
525
526 <note>
527 <para>
528 Hinting, if enabled, is done in <application>FreeType</application>.
529 Since FreeType-2.7 the default TrueType interpreter is v40. The
530 original v35 hinter could be enabled by an environment variable, but
531 is only really appropriate to original Microsoft TTF fonts (Arial, etc).
532 The v38 hinter (Infinality) is not built by default and all the options
533 to tune it have been removed. For full details see <xref
534 linkend="subpixel-hinting"/> (Spoiler: there is NO sub-pixel hinting,
535 the code simply ignores <emphasis>all</emphasis> horizontal hinting
536 instructions.
537 </para>
538
539 <para>
540 Xorg assumes screens have 96 dots per inch (DPI). Most LCD screens are
541 close to this, but some people detect colour fringing if their screen
542 diverges from that size. See <xref linkend="calc-dpi"/>.
543 </para>
544
545 <para>
546 If you have a High DPI screen (often described as '4K' or larger) you
547 will probably use larger font sizes and benefit from disabling hinting.
548 </para>
549 </note>
550
551 <para>
552 For more examples see the blfs-support thread which started at <ulink
553 url="https://lists.linuxfromscratch.org/sympa/arc/blfs-support/2016-09/msg00128.html">2016-09/00128</ulink>,
554 particularly <ulink
555 url="https://lists.linuxfromscratch.org/sympa/arc/blfs-support/2016-09/msg00137.html">2016-09/00137</ulink>,
556 and the original poster's preferred solution at <ulink
557 url="https://lists.linuxfromscratch.org/sympa/arc/blfs-support/2016-09/msg00147.html">2016-09/00147</ulink>.
558 There are other examples in <xref linkend="arch-fontconfig"/> and <xref
559 linkend="gentoo-fontconfig"/>.
560 </para>
561
562 </sect2>
563
564 <sect2 role="configuration" id="disabling-bitmap-fonts" xreflabel="Disabling Bitmap fonts">
565 <title>Disabling Bitmap Fonts</title>
566
567 <para>
568 In previous versions of BLFS, the ugly old Xorg bitmap fonts were
569 installed. Now, many people will not need to install any of them. But if
570 for some reason you have installed one or more bitmap fonts, you can
571 prevent them from being used by <application>Fontconfig</application> by
572 creating the following file as the &root; user :
573 </para>
574
575<screen role="root"><userinput>cat > /etc/fonts/conf.d/70-no-bitmaps.conf &lt;&lt; "EOF"
576<literal>&lt;?xml version='1.0'?&gt;
577&lt;!DOCTYPE fontconfig SYSTEM 'fonts.dtd'&gt;
578&lt;fontconfig&gt;
579&lt;!-- Reject bitmap fonts --&gt;
580 &lt;selectfont&gt;
581 &lt;rejectfont&gt;
582 &lt;pattern&gt;
583 &lt;patelt name="scalable"&gt;&lt;bool&gt;false&lt;/bool&gt;&lt;/patelt&gt;
584 &lt;/pattern&gt;
585 &lt;/rejectfont&gt;
586 &lt;/selectfont&gt;
587&lt;/fontconfig&gt;</literal>
588EOF</userinput></screen>
589
590 </sect2>
591
592 <sect2 role="configuration" id="synthetic-changes" xreflabel="Synthetic changes">
593 <title>Synthetic changes</title>
594
595 <para>
596 In <filename>90-synthetic.conf</filename> there are examples of applying
597 synthetic slanting and emboldening to a font. The synthetic emboldening can
598 be applied to a visibly faint font, but the results are not always as
599 expected: With just the embolden, <application>epiphany</application> showed
600 darker font, <application>firefox</application> did not - so although
601 <application>cairo</application> is now used by
602 <application>firefox</application> the comment about setting Weight is still
603 valid. But setting both, <application>epiphany</application> will show bold text
604 by default, but heavy text if markup for bold is used. In both cases, neither
605 <application>libreOffice</application> nor <application>falkon</application>
606 showed bolder text.
607 </para>
608
609 </sect2>
610
611 <sect2 role="configuration" id="adding-extra-directories" xreflabel="Adding extra font directories">
612 <title>Adding extra font directories</title>
613
614 <para>
615 Normally, system fonts and user fonts are installed in directories beneath
616 the locations specified in <xref linkend="xft-font-protocol"/> and there
617 is no obvious reason to put them elsewhere. However, a full BLFS install
618 of <xref linkend="texlive"/> puts many fonts in <filename
619 class="directory">/opt/texlive/&texlive-year;/texmf-dist/fonts/</filename>
620 in the <filename class="directory">opentype/</filename> and <filename
621 class="directory">truetype/</filename> subdirectories. Although pulling in
622 all of these files may appear useful (it allows you to use them in non
623 <application>TeX</application> programs), there are several problems with
624 such an approach:
625 </para>
626
627 <orderedlist>
628 <listitem>
629 <para>
630 There are hundreds of files, which makes selecting fonts difficult.
631 </para>
632 </listitem>
633 <listitem>
634 <para>
635 Some of the files do odd things, such as displaying semaphore flags
636 instead of ASCII letters, or mapping cyrillic codepoints to character
637 forms appropriate to Old Church Slavonic instead of the expected
638 current shapes: fine if that is what you need, but painful for normal
639 use.
640 </para>
641 </listitem>
642 <listitem>
643 <para>
644 Several fonts have multiple sizes and impenetrable short names, which
645 both make selecting the correct font even more difficult.
646 </para>
647 </listitem>
648 <listitem>
649 <para>
650 When a font is added to CTAN, it is accompanied by TeX packages to use
651 it in the old engines (<application>xelatex</application> does not
652 normally need this), and then the version is often frozen whilst the
653 font is separately maintained. Some of these fonts such as <xref
654 linkend="dejavu-fonts"/> are probably already installed on your BLFS
655 system in a newer version, and if you have multiple versions of a font
656 it is unclear which one will be used by
657 <application>Fontconfig</application>.
658 </para>
659 </listitem>
660 </orderedlist>
661
662 <para>
663 However, it is sometimes useful to look at these fonts in non-TeX
664 applications, if only to see whether you wish to install a current
665 version. If you have installed all of <application>texlive</application>,
666 the following example will make one of the Arkandis Open Type fonts
667 available to other applications, and all three of the ParaType TrueType
668 fonts. Adjust or repeat the lines as desired, to either make all the
669 <filename class="directory">opentype/</filename> or <filename
670 class="directory">truetype</filename>fonts available, or to select
671 different font directories. As the <systemitem
672 class="username">root</systemitem> user:
673 </para>
674
675<screen role="root"><userinput>cat > /etc/fonts/conf.d/09-texlive.conf &lt;&lt; "EOF"
676<literal>&lt;?xml version='1.0'?&gt;
677&lt;!DOCTYPE fontconfig SYSTEM 'fonts.dtd'&gt;
678&lt;fontconfig&gt;
679 &lt;dir&gt;/opt/texlive/&texlive-year;/texmf-dist/fonts/opentype/arkandis/berenisadf&lt;/dir&gt;
680 &lt;dir&gt;/opt/texlive/&texlive-year;/texmf-dist/fonts/truetype/paratype&lt;/dir&gt;
681&lt;/fontconfig&gt;</literal>
682EOF</userinput></screen>
683
684 <para>
685 If you do this, remember to change all instances of the year in that file
686 when you upgrade <application>texlive</application> to a later release.
687 </para>
688
689 </sect2>
690
691 <sect2 role="configuration" id="preferring-certain-fonts" xreflabel="Preferring certain fonts">
692 <title>Preferring certain fonts</title>
693
694 <para>
695 With the exception of web pages which use WOFF fonts and either supply
696 them or link to google to download them, web pages have traditionally
697 suggested a list of preferred font family names if they cared (e.g.
698 Times New Roman, Serif). There are many reasons why people may wish to
699 have pages which specify a preferred font use a different font, or
700 prefer specific fonts in Monospace or Sans or Serif. As you will expect,
701 there a number of different ways of achieving this.
702 </para>
703
704 <bridgehead renderas="sect3" id="fontconfig-user-docs"
705 xreflabel="Fontconfig user documentation">Fontconfig user documentation</bridgehead>
706
707 <para>
708 <application>Fontconfig</application> installs user documentation that
709 includes an example 'User configuration file' which among other things
710 prefers <xref linkend="wenquanyi-zenhei"/> (a Sans font) if a
711 <emphasis>Serif</emphasis> font is requested for Chinese (this part
712 might be anachronistic unless you have non-free Chinese fonts, because
713 in <filename>65-nonlatin.conf</filename> this font is already among the
714 preferred fonts when Serif is specified for Chinese) and to prefer the
715 modern <xref linkend="VLGothic"/> font if a Sans font is specified on a
716 Japanese page (otherwise a couple of other fonts would be preferred if
717 they have been installed).
718 </para>
719
720 <para>
721 If you have installed the current version, the user documentation is
722 available in HTML, PDF, and text versions at <filename
723 class="directory">/usr/share/doc/fontconfig-&fontconfig-version;/</filename>
724 : change the version if you installed a different one.
725 </para>
726
727 <bridgehead renderas="sect3" id="prefer-a-specific-font"
728 xreflabel="Prefer a specific font">Prefer a specific font</bridgehead>
729
730 <para>
731 As an example, if for some reason you wished to use the <ulink
732 url="https://www.fontsquirrel.com/fonts/nimbus-roman-no9-l">Nimbus Roman
733 No9 L</ulink> font wherever Times New Roman is referenced (it is
734 metrically similar, and preferred for Times Roman, but the Serif font
735 from <xref linkend="liberation-fonts"/> will be preferred for the Times
736 <emphasis>New</emphasis> Roman font if installed), as an individual user
737 you could install the font and then create the following file:
738 </para>
739
740<screen><userinput>mkdir -pv ~/.config/fontconfig/conf.d &amp;&amp;
741cat > ~/.config/fontconfig/conf.d/35-prefer-nimbus-for-timesnew.conf &lt;&lt; "EOF"
742<literal>&lt;?xml version='1.0'?&gt;
743&lt;!DOCTYPE fontconfig SYSTEM 'fonts.dtd'&gt;
744&lt;fontconfig&gt;
745&lt;!-- prefer Nimbus Roman No9 L for Times New Roman as well as for Times,
746 without this Tinos and Liberation Serif take precedence for Times New Roman
747 before Fontconfig falls back to whatever matches Times --&gt;
748 &lt;alias binding="same"&gt;
749 &lt;family&gt;Times New Roman&lt;/family&gt;
750 &lt;accept&gt;
751 &lt;family&gt;Nimbus Roman No9 L&lt;/family&gt;
752 &lt;/accept&gt;
753 &lt;/alias&gt;
754&lt;/fontconfig&gt;</literal>
755EOF</userinput></screen>
756
757 <para>
758 This is something you would normally do in an individual user's
759 settings, but the file in this case has been prefixed '35-' so that it
760 could, if desired, be used system-wide in <filename
761 class="directory">/etc/fonts/conf.d/</filename>.
762 </para>
763
764 <bridgehead renderas="sect3" id="prefer-chosen-CJK-fonts"
765 xreflabel="Prefer chosen CJK fonts">Prefer chosen CJK fonts</bridgehead>
766
767 <para>
768 The following example of a local configuration (i.e. one that applies
769 for all users of the machine) does several things. It is particularly
770 appropriate where no language is specified, or for reading CJK text
771 in a non-CJK locale, and where the Japanese forms of the codepoints
772 shared with Chinese are preferred. In particular, alternative
773 approaches would be to specify a Chinese font ahead of the Japanese
774 font, meaning that only Kana symbols will be used from the Japanese
775 font, or to not specify DejaVu so that the first font in each set
776 of preferences is preferred for text using Latin alphabets.
777 </para>
778
779 <orderedlist>
780 <listitem>
781 <para>
782 If a Serif font is specified, it prefers <xref linkend="dejavu-fonts"/>.
783 If Han codepoints are found, or the Japanese language is specified,
784 the Mincho font from <xref linkend="IPAex"/> will be used. If Hangul
785 codepoints are found or the Korean language is specified, UnBatang
786 (see <xref linkend="Korean-fonts"/>) will be used: Change that line
787 If you installed a different Korean serif font. After that,
788 <xref linkend="wenquanyi-zenhei"/> (Sans, but a default for Serif
789 and monospace) is used. A previous version of this page mentioned
790 using UMing which is a Traditional Chinese font that ships
791 with an old conf file preferring it for zh-tw and zh-hk language
792 codes (and for sans-serif and monospace). But without the conf file,
793 <application>Fontconfig</application> will only treat it as suitable
794 for zh-hk.
795 The conf file needs to be edited to current style and will then be
796 prepended, so specifying UMing does not belong in this
797 <filename>local.conf</filename> file.
798 </para>
799 </listitem>
800 <listitem>
801 <para>
802 For Sans Serif preferences again start with <xref linkend="dejavu-fonts"/>,
803 then <xref linkend="VLGothic"/> for Japanese before falling back to
804 WenQuanYi Zen Hei which is Sans and covers both Chinese and Korean
805 Hangul.
806 </para>
807 </listitem>
808 <listitem>
809 <para>
810 The Monospace fonts are forced to the preferred Sans fonts. If the
811 text is in Chinese or Korean then <xref
812 linkend="wenquanyi-zenhei"/> will be used.
813 </para>
814 </listitem>
815 </orderedlist>
816
817 <para>
818 In a non-CJK locale, the result is that suitable fonts will be used for
819 all variants of Chinese, Japanese and Hangul Korean (but Japanese variants
820 of the glyphs shared with Chinese Han will be used). All other languages
821 should already work if a font is present. As the <systemitem
822 class="username">root</systemitem> user:
823 </para>
824
825<screen role="root"><userinput>cat > /etc/fonts/local.conf &lt;&lt; "EOF"
826<literal>&lt;?xml version='1.0'?&gt;
827&lt;!DOCTYPE fontconfig SYSTEM 'fonts.dtd'&gt;
828&lt;fontconfig&gt;
829 &lt;alias&gt;
830 &lt;family&gt;serif&lt;/family&gt;
831 &lt;prefer&gt;
832 &lt;family&gt;DejaVu Serif&lt;/family&gt;
833 &lt;family&gt;IPAexMincho&lt;/family&gt;
834 &lt;!-- WenQuanYi is preferred as Serif in 65-nonlatin.conf,
835 override that so a real Korean font can be used for Serif --&gt;
836 &lt;family&gt;UnBatang&lt;/family&gt;
837 &lt;/prefer&gt;
838 &lt;/alias&gt;
839 &lt;alias&gt;
840 &lt;family&gt;sans-serif&lt;/family&gt;
841 &lt;prefer&gt;
842 &lt;family&gt;DejaVu Sans&lt;/family&gt;
843 &lt;family&gt;VL Gothic&lt;/family&gt;
844 &lt;!-- This assumes WenQuanYi is good enough for Korean Sans --&gt;
845 &lt;/prefer&gt;
846 &lt;/alias&gt;
847 &lt;alias&gt;
848 &lt;family&gt;monospace&lt;/family&gt;
849 &lt;prefer&gt;
850 &lt;family&gt;DejaVu Sans Mono&lt;/family&gt;
851 &lt;family&gt;VL Gothic&lt;/family&gt;
852 &lt;!-- This assumes WenQuanYi is good enough for Korean Monospace --&gt;
853 &lt;/prefer&gt;
854 &lt;/alias&gt;
855&lt;/fontconfig&gt;</literal>
856EOF</userinput></screen>
857
858 </sect2>
859
860
861 <sect2 role="configuration" id="editing-old-style-conf-files"
862 xreflabel="Editing Old-Style conf files">
863 <title>Editing Old-Style conf files</title>
864
865 <para>
866 Some fonts, particularly Chinese fonts, ship with conf files which can be
867 installed in <filename class="directory">/etc/fonts/conf.d</filename>.
868 However, if you do that and then use a terminal to run any command which
869 uses <application>Fontconfig</application> you may see error messages such
870 as :
871 </para>
872
873 <para>
874 <literal>Fontconfig warning: "/etc/fonts/conf.d/69-odofonts.conf", line
875 14: Having multiple &lt;family&gt; in &lt;alias&gt; isn't supported and
876 may not work as expected</literal>.
877 </para>
878
879 <para>
880 In practice, these old rules do not work. For non-CJK users,
881 <application>Fontconfig</application> will usually do a good job
882 <emphasis>without</emphasis> these rules. Their origin dates back to when
883 CJK users needed handcrafted bitmaps to be legible at small sizes, and
884 those looked ugly next to antialiased Latin glyphs - they preferred to
885 use the same CJK font for the Latin glyphs. There is a side-effect of
886 doing this : the (Serif) font is often also used for Sans, and in such a
887 situation the (English) text in <application>Gtk</application> menus will
888 use this font - compared to system fonts, as well as being serif it is
889 both faint and rather small. That can make it uncomfortable to read.
890 </para>
891
892 <para>
893 Nevertheless, these old conf files can be fixed if you wish to use them.
894 The following example is the first part of
895 <filename>64-arphic-uming.conf</filename> from <xref linkend="UMing"/> -
896 there are many more similar items which also need changing :
897 </para>
898
899 <para>
900 <literallayout>
901 &lt;match target="pattern"&gt;
902 &lt;test qual="any" name="lang" compare="contains"&gt;
903 &lt;string&gt;zh-cn&lt;/string&gt;
904 &lt;string&gt;zh-sg&lt;/string&gt;
905 &lt;/test&gt;
906 &lt;test qual="any" name="family"&gt;
907 &lt;string&gt;serif&lt;/string&gt;
908 &lt;/test&gt;
909 &lt;edit name="family" mode="prepend" binding="strong"&gt;
910 &lt;string&gt;AR PL UMing CN&lt;/string&gt;
911 &lt;/edit&gt;
912 &lt;/match&gt;</literallayout>
913 </para>
914
915 <para>
916 The process to correct this is straightforward but tedious - for every
917 item which produces an error message, using your editor (as the &root;
918 user), edit the installed
919 file to repeat the whole block as many times as there are multiple
920 variables, then reduce each example to have only one of them. You may
921 wish to work on one error at a time, save the file after each fix, and
922 from a separate term run a command such as <command>fc-list 2>&amp;1 |
923 less</command> to see that the fix worked. For the block above, the fixed
924 version will be :
925 </para>
926
927 <para>
928 <literallayout>
929 &lt;match target="pattern"&gt;
930 &lt;test qual="any" name="lang" compare="contains"&gt;
931 &lt;string&gt;zh-cn&lt;/string&gt;
932 &lt;/test&gt;
933 &lt;test qual="any" name="family"&gt;
934 &lt;string&gt;serif&lt;/string&gt;
935 &lt;/test&gt;
936 &lt;edit name="family" mode="prepend" binding="strong"&gt;
937 &lt;string&gt;AR PL UMing CN&lt;/string&gt;
938 &lt;/edit&gt;
939 &lt;/match&gt;
940 &lt;match target="pattern"&gt;
941 &lt;test qual="any" name="lang" compare="contains"&gt;
942 &lt;string&gt;zh-sg&lt;/string&gt;
943 &lt;/test&gt;
944 &lt;test qual="any" name="family"&gt;
945 &lt;string&gt;serif&lt;/string&gt;
946 &lt;/test&gt;
947 &lt;edit name="family" mode="prepend" binding="strong"&gt;
948 &lt;string&gt;AR PL UMing CN&lt;/string&gt;
949 &lt;/edit&gt;
950 &lt;/match&gt;</literallayout>
951 </para>
952
953 <bridgehead renderas="sect3" id="font-weights"
954 xreflabel="About font weights">About font weights</bridgehead>
955
956 <para>
957 When this page and the next page were first created, Latin fonts came
958 with a maximum of two weights - either Regular or Book (Book typically
959 has a larger X-height to make it easier to read in large blocks of text),
960 and Bold - and perhaps an Italic (or Slant) style. A few fonts also had
961 Condensed faces (to fit more text into a line and usually only used when
962 specified). Without CSS (Cascading Style Sheets) markup, text used the
963 Regular or Book weight except when &lt;b&gt; ... &lt;/b&gt; markup was
964 used for bold text. Italic styles would be invoked by &lt;i&gt; ... &lt;/i&gt;
965 markup, along with the bold markup for Bold Italic.
966 </para>
967
968 <para>
969 Some faces now contain up to 9 weights, possibly also with a variable font
970 (to save space by including all the alternatives in one file and possibly
971 allowing intermediate weights). For most desktop users who do not need this
972 wide range of weights for creating content, it is simpler to only install
973 one or two weights. If a face has individual weights plus a variable font,
974 the variable font is usually in the top level of the supplied directory,
975 with individual weights in a <filename class="directory">static/</filename>
976 subdirectory. Except when initially reviewing a font, it makes no sense to
977 install both static and variable, nor all the possible weights.
978 </para>
979
980 <para>
981 The weights are labelled from 100 (Thin) to 900 (Black or Heavy) in CSS
982 terminology, with 400 being normal and 700 bold. The full set of weights
983 is described at <xref linkend="css-weights"/>.
984 </para>
985
986 <para>
987 If you have installed a font with a range of weights, you can copy <ulink
988 url="https://&lfs-domainname;/~ken/font-weights.html">font-weights.html</ulink>
989 to your local machine. As shiped it will use your default Serif font assuming
990 you have one. Edit it to point to a specific installed font using the name
991 known to <application>Fontconfig</application> (also in the *EDITME FONTNAME*
992 text items) and open it
993 from your desktop browser. You can also use it to look at a font with only
994 two installed weights, e.g. for testing to see if you prefer other weights.
995 </para>
996
997 <para>
998 Despite the details in that Mozilla link, it appears that if only normal and
999 bold weights are installed, SemiBold (600) will be shown using bold.
1000 </para>
1001
1002 <para>
1003 There seems to be a little scope for changing which weights are used for
1004 normal and bold <emphasis>if only two weights have been installed</emphasis>.
1005 Firefox, and probably other browsers, will look for the next weight heavier
1006 than normal. If that is less than bold (Medium, maybe SemiBold - uncertain)
1007 it will be used for normal and then the next higher weight, if any will be
1008 used for bold, allowing you to make the fonts slightly darker. Conversely,
1009 if only a weight less than normal has been installed, such as Light, that
1010 will be used for both normal and bold weights (the upward search happens
1011 first).
1012 </para>
1013
1014 <para>
1015 If you remove some weights of a system font, you may need to run
1016 <command>fc-cache</command> as the &root; user and then log out completely
1017 to clear caches associated with your user.
1018 <!-- I don't know for sure that there are user caches retained until you
1019 log out, but certainly leaving X and restarting the browser is not always
1020 adequate : ken -->
1021 </para>
1022
1023 <bridgehead renderas="sect3" id="items-which-can-override-fontconfig"
1024 xreflabel="Items which can override fontconfig">Items which can override Fontconfig</bridgehead>
1025
1026 <para>
1027 Several desktop environments, as well as some programs, will use
1028 <application>Fontconfig</application>
1029 to find fonts but may override certain things.
1030 </para>
1031
1032 <para>
1033 <application>GNOME</application>: The settings in
1034 org.gnome.desktop.interface can be updated with
1035 <application>dconf-editor</application>. You can set the fonts to your
1036 preference and desired point size. To use the fonts chosen by
1037 <application>Fontconfig</application> specify e.g. 'Sans 12', Serif 11',
1038 'Mono 10' as desired. Also review the antialiasing, hinting and rgba
1039 settings.
1040 </para>
1041
1042 <para>
1043 <application>LXQt</application>: Change font settings as necessary to
1044 match <application>Fontconfig</application> in
1045 <application>lxqt-config-appearance</application>.
1046 </para>
1047
1048 <para>
1049 <application>KDE Plasma</application>: The settings can be adjusted in
1050 <application>System Settings</application> under Appearance -> Fonts. This
1051 will create or modify <filename>~/.config/fontconfig/fonts.conf</filename>
1052 although <filename>~/.config/fontconfig/fonts.conf</filename>, if
1053 installed, can override that.
1054 </para>
1055
1056 <para>
1057 i<application>Xfce desktop</application>: The settings can be adjusted in
1058 <application>Settings</application> Appearance -> Fonts. Specify your
1059 preferred fonts, e.g. 'Sans Regular' (to use the normal face and weight
1060 rather than Bold and/or Italic) and adjust the point size in the option.
1061 Review the Rendering and DPI options.
1062 </para>
1063
1064 <para>
1065 <application>Firefox</application>: This browser allows you to specify its
1066 default fonts. For the 115esr series use the 'Hamburger' menu to go to
1067 Preferences, General, and under Fonts -> Advanced select Sans Serif, Serif
1068 or Monospace as appropriate if you wish to use the fonts which match
1069 <application>Fontconfig</application>. Set the point sizes as desired. In
1070 later versions, the settings are at Preferences -> Fonts.
1071 <!-- FIXME : Ken - when merging, add note in packages to update this when next ESR
1072 series is used -->
1073 </para>
1074
1075 <para>
1076 <application>Libreoffice</application>: Tests using English text with an
1077 old Japanese font (HanaMinA) which supports several European languages but
1078 had only one weight and no italics or slant showed that although
1079 <application>Libreoffice</application> uses
1080 <application>Fontconfig</application> to find the font, it created its own
1081 bold or slanted text. It is not clear if it will do the same where a font
1082 actually has bold weight or an italic style. Also, documentation shows
1083 that <application>Libreoffice</application> has its own substitution rules
1084 for when a codepoint is not found in the selected font, but is unclear if
1085 those rules apply on Linux using Fontconfig.
1086 </para>
1087
1088 <para>
1089 <application>Pango</application>: as noted in the example
1090 <filename>~/.config/fontconfig</filename> above, anything using Pango-1.44
1091 (from 2019) or later now uses <application>Harfbuzz</application> for
1092 hinting, not <application>FreeType</application>, and
1093 <literal>hintfull</literal> is not supported.
1094 </para>
1095
1096 </sect2>
1097
1098 <sect2 role="configuration" id="external-links" xreflabel="External Links">
1099 <title>External Links</title>
1100
1101 <bridgehead renderas="sect3" id="I-stared-into-the-fontconfig"
1102 xreflabel="I stared into the fontconfig">I stared into the fontconfig ...</bridgehead>
1103
1104 <para>
1105 The blog entries by <ulink
1106 url="https://eev.ee/blog/2015/05/20/i-stared-into-the-fontconfig-and-the-fontconfig-stared-back-at-me/">Eevee</ulink>
1107 are particularly useful if <application>Fontconfig</application> does not
1108 think your chosen font supports your language, and for preferring some
1109 non-MS Japanese fonts when an ugly MS font is already installed.
1110 </para>
1111
1112 <bridgehead renderas="sect3" id="subpixel-hinting"
1113 xreflabel="subpixel-hinting">subpixel-hinting</bridgehead>
1114
1115 <para>The documentation of the FreeType v40 interpreter at <ulink
1116 url="https://freetype.org/freetype2/docs/hinting/subpixel-hinting.html">freetype
1117 docs</ulink>
1118 explains how the current hinter works, and why the previous (slow) Infinality
1119 interpreter was replaced.
1120 </para>
1121
1122 <bridgehead renderas="sect3" id="calc-dpi"
1123 xreflabel="calc-dpi">Calculating DPI</bridgehead>
1124
1125 <para>An old answer at <ulink
1126 url="https://askubuntu.com/questions/197828/how-to-find-and-change-the-screen-dpi/">askubuntu</ulink>
1127 gives some detail on calculating a screen's dots per inch, but essentailly
1128 you just measure the width and height of the visible panel, convert to
1129 inches if using metric measurements, and divide by the number of pixels.
1130 You can then pass <option>-dpi <replaceable>90</replaceable></option> when
1131 you start Xorg, using your own value.
1132 </para>
1133
1134 <bridgehead renderas="sect3" id="css-weights"
1135 xreflabel="Table of CSS font weights">Table of CSS font weights</bridgehead>
1136
1137 <para>Perhaps more than you ever wished to know is at <ulink
1138 url="https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight">Mozilla
1139 CSS docs</ulink>.
1140 </para>
1141
1142 <bridgehead renderas="sect3" id="ttfautohint"
1143 xreflabel="Applying autohinting to a font">Applying autohinting to a font</bridgehead>
1144
1145 <para>
1146 If you are using hinting and have a TTF (not OTF) font which lacks hints
1147 but permits you to fork it, you might be able to apply hints using <ulink
1148 url="https://freetype.org/ttfautohint/">ttfautohint</ulink> which is based
1149 on the old autohinter. As of version 1.8.4 it fails to build without Qt5.
1150 <!-- switch exists, configure passes but build fails -->
1151 </para>
1152
1153 <bridgehead renderas="sect3" id="arch-fontconfig"
1154 xreflabel="Fontconfig in the Arch wiki">Fontconfig in the Arch wiki</bridgehead>
1155
1156 <para>
1157 Arch has a lot of information in its wiki at <ulink
1158 url="https://wiki.archlinux.org/index.php/font_configuration">font_configuration</ulink>.
1159 </para>
1160
1161 <bridgehead renderas="sect3" id="gentoo-fontconfig"
1162 xreflabel="Fontconfig in the Gentoo wiki">Fontconfig in the Gentoo wiki</bridgehead>
1163
1164 <para>
1165 Gentoo has some information in its wiki at <ulink
1166 url="https://wiki.gentoo.org/wiki/Fontconfig">Fontconfig</ulink> although
1167 a lot of the details (what to enable, and Infinality) are specific to
1168 Gentoo.
1169 </para>
1170
1171 </sect2>
1172
1173</sect1>
Note: See TracBrowser for help on using the repository browser.