Debian Codegraph @

texmf-dist/doc/xetex/xetexref/tryxefonts.tex

raw
1 % Copyright 2011 Karl Berry.
2 % You may freely use, modify, and/or distribute this file, without limitation.
3 % Experimentally determine what XeTeX finds with different syntaxes.
4
5 % fc-list : family style file spacing
6 % reports files et al.
7
8 \XeTeXtracingfonts = \maxdimen
9
10 % with quotes and no brackets, first looked up as otf/ttf, then as tfm.
11
12 % fc-list reports /usr/share/X11/fonts,
13 % XeTeX finds /usr/share/fonts/default/ghostscript/putr.pfa. Why?
14 \font\1 = "Utopia" \1 utopia
15
16 % fc-list reports /usr/share/X11/fonts/Type1/cursor.pfa,
17 % XeTeX finds it there. But it doesn't work, xdvipdfmx reports:
18 % ** ERROR ** Invalid font: -1 (0). Why?
19 \font\1 = "Cursor" \1 cursor
20
21 % this fails, presumably because it is only available as pcf:
22 %\font\1 = "Console" \1 console
23
24 % tfm ok:
25 \font\1 = "cmr10" \1 hello.
26
27
28 % with quotes and square brackets, looked up as otf/ttf/pfb. This works:
29 \font\1 = "[lmroman10-regular.otf]" at 16pt \1 lmotf
30
31 % This works, finds cmr10.pfb in tree (for output):
32 \font\1 = "[cmr10]" at 16pt \1 lmtfm
33
34
35 % without quotes, always looked up as tfm. Thus, this fails:
36 %\font\1 = lmroman10-regular.otf at 16pt \1 lm
37 \end
38
39 % From XeTeXFontMgr.h:
40 PlatformFontRef findFont(const char* name, char* variant, double ptSize);
41 // 1st arg is name as specified by user (C string, UTF-8)
42 // 2nd is /B/I/AAT/ICU[/USP]/S=## qualifiers
43 // 1. try name given as "full name"
44 // 2. if there's a hyphen, split and try "family-style"
45 // 3. try as PostScript name
46 // 4. try name as family with "Regular/Plain/Normal" style
47 // apply style qualifiers and optical sizing if present