Debian Codegraph @

texmf-dist/doc/luatex/blopentype/blopentype.md

raw
1 # Basic LuaTeX OpenType Manager Minimal User Guide
2
3 As of version 0.0.1 May 2023
4
5 Loading the macros
6 ==================
7
8 This is a Plain TeX macro package, so simply type
9
10 ```
11 \input blot
12 ```
13
14 and you are halfway through: there are font parameter defaults, but no font is loaded
15 automatically, since it must depend on your system; so you have to load fonts
16 on your own.
17
18 Fonts
19 =====
20
21 The fontloader uses gates, but only superficially. They won't be
22 documented here.
23
24 To load a given font, you define it in YaX syntax with the `\setfont` command.
25 Thus, the instruction:
26
27 ```\setfont <fontcommand>:<attributes>```
28
29 sets <fontcommand> to call the font described in <attributes>; all new fonts default
30 to the values of the `metafont` parameter described elsewhere.
31 If `<fontcommand>` is `\mainfont`, the font is called at once;
32 any other `\fontcommand` requires an explicit call.
33
34 You may thing of `\setfont <fontcommand>` as similar to DEKTeX's `\font<fontcommand> <parameters>`,
35 but now the call is to an array of font attributes, enumerated below.
36
37 `name`
38 The family name of the font; e.g. Palatino Linotype for the main text of
39 this document.
40
41 `size (dimension)`
42 The size of the font.
43
44 `small (dimension)`
45 The size of the font when \small is called. Can be a relative value by
46 prefixing it with "-" or "+", in which case it is set relative to ?size.
47
48 `verysmall (dimension)`
49 The size (possibly relative) for \verysmall.
50
51 `big (dimension)`
52 The size (possibly relative) for \big.
53
54 `verybig (dimension)`
55 The size (possibly relative) for \verybig.
56
57 `bold (font modifier)`
58 The modifier used for the bold version of the font, without the leading slash;
59 !metafont sets it to "Bold".
60
61 `italic (font modifier)`
62 Same as !bold for the italic version; set to "Italic" by !metafont.
63
64 `math (true or false)`
65 If true, math fonts will be created.
66
67 `features`
68 Well, err, font features...
69
70 `slant (angle)`
71 The slant applied to the font to create a fake italic.
72
73 `slantsc (angle)`
74 The slant applied to the font to create fake italic smallcaps; if not
75 given, defaults to ?slant.
76
77 There's actually much more going under the hood, but "font.ptxlua" (the
78 font loader itself) is a work in progress, and undocumented.
79
80 # Font change commands
81
82 The same macros as in plain TeX can be used, except they're cumulative,
83 i.e. "\it\bf" switches to a bold italic.
84 `<text>` in the specification should be group delimited with braces.
85
86 `\it`
87 Switches to italics.
88
89 `\rm`
90 Switches to roman.
91
92 `\bf`
93 Switches to bold.
94
95 `\rg`
96 Switches to regular weight.
97
98 `\sc`
99 Switches to small capitals.
100
101 `\lc`
102 Switches to lower case (i.e. not small caps).
103
104 `\ital <text>`
105 Typesets <text> in italics.
106
107 `\bold <text>`
108 Typesets <text> in bold.
109
110 `\scap <text>`
111 Typesets <text> in small caps.
112
113 `\rom <text>`
114 Typesets <text> in roman.
115
116 `\emph <text>`
117 Typesets <text> in italics or roman, depending on whether the current
118 font is roman or italics, respectively.
119
120 `\underline <text>`
121 Underlines <text>. Wow.
122
123 `\small`
124 Switches to small font.
125
126 `\verysmall`
127 Switches to very small font.
128
129 `\big`
130 Switches to big font.
131
132 `\verybig`
133 Got it?
134
135 `\normalsize`
136 Switches to default size.
137
138 `\smaller`
139 Switches to the font smaller than the current one (e.g. \normalsize if
140 you're currently using \big).
141
142 `\bigger`
143 Same as \smaller, the other way around.
144
145 `\color <color><text>`
146 Typesets <text> with <color>, which should be a triplet "R G B" with
147 each value between 0 and 1.
148
149 # See also
150
151 Documentation for [YaX](https://ctan.org/pkg/yax) for the YaX syntax to set up the fonts.
152
153 Good luck and happy LuaTeXing,
154
155 Luis Rivera
156