aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user/bas_font
blob: dd8442d6f6f2adab2ca671acb20c4913fe31b83c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
@Section
   @Title { Fonts and font sizes }
   @Tag { fonts }
@Begin
@PP
A @I font is a collection of characters that may be printed.  For
example, here is the Times Roman font:
@ID @OneRow { Times Base } @Font 0.05c @Space {
{ @Char space }
{ @Char exclam }
{ @Char quotedbl }
{ @Char numbersign }
{ @Char dollar }
{ @Char percent }
{ @Char ampersand }
{ @Char quoteright }
{ @Char parenleft }
{ @Char parenright }
{ @Char asterisk }
{ @Char plus }
{ @Char comma }
{ @Char hyphen }
{ @Char period }
{ @Char slash }
{ @Char zero }
{ @Char one }
{ @Char two }
{ @Char three }
{ @Char four }
{ @Char five }
{ @Char six }
{ @Char seven }
{ @Char eight }
{ @Char nine }
{ @Char colon }
{ @Char semicolon }
{ @Char less }
{ @Char equal }
{ @Char greater }
{ @Char question }
{ @Char at }
{ @Char bracketleft }
{ @Char backslash }
{ @Char bracketright }
{ @Char asciicircum }
{ @Char underscore }
{ @Char quoteleft }
//1vx
{ @Char A }
{ @Char B }
{ @Char C }
{ @Char D }
{ @Char E }
{ @Char F }
{ @Char G }
{ @Char H }
{ @Char I }
{ @Char J }
{ @Char K }
{ @Char L }
{ @Char M }
{ @Char N }
{ @Char O }
{ @Char P }
{ @Char Q }
{ @Char R }
{ @Char S }
{ @Char T }
{ @Char U }
{ @Char V }
{ @Char W }
{ @Char X }
{ @Char Y }
{ @Char Z }
//1vx
{ @Char a }
{ @Char b }
{ @Char c }
{ @Char d }
{ @Char e }
{ @Char f }
{ @Char g }
{ @Char h }
{ @Char i }
{ @Char j }
{ @Char k }
{ @Char l }
{ @Char m }
{ @Char n }
{ @Char o }
{ @Char p }
{ @Char q }
{ @Char r }
{ @Char s }
{ @Char t }
{ @Char u }
{ @Char v }
{ @Char w }
{ @Char x }
{ @Char y }
{ @Char z }
//1vx
{ @Char braceleft }
{ @Char bar }
{ @Char braceright }
{ @Char asciitilde }
{ @Char dotlessi }
{ @Char grave }
{ @Char acute }
{ @Char circumflex }
{ @Char tilde }
{ @Char macron }
{ @Char breve }
{ @Char dotaccent }
{ @Char dieresis }
{ @Char ring }
{ @Char cedilla }
{ @Char hungarumlaut }
{ @Char ogonek }
{ @Char caron }
{ @Char space }
{ @Char exclamdown }
{ @Char cent }
{ @Char sterling }
{ @Char currency }
{ @Char yen }
{ @Char brokenbar }
{ @Char section }
{ @Char dieresis }
{ @Char copyright }
{ @Char ordfeminine }
{ @Char guillemotleft }
{ @Char logicalnot }
{ @Char hyphen }
{ @Char registered }
{ @Char macron }
{ @Char degree }
{ @Char plusminus }
{ @Char twosuperior }
{ @Char threesuperior }
{ @Char acute }
{ @Char mu }
{ @Char paragraph }
{ @Char periodcentered }
{ @Char cedilla }
{ @Char onesuperior }
{ @Char ordmasculine }
{ @Char guillemotright }
{ @Char onequarter }
{ @Char onehalf }
{ @Char threequarters }
{ @Char questiondown }
//1vx
{ @Char Agrave }
{ @Char Aacute }
{ @Char Acircumflex }
{ @Char Atilde }
{ @Char Adieresis }
{ @Char Aring }
{ @Char AE }
{ @Char Ccedilla }
{ @Char Egrave }
{ @Char Eacute }
{ @Char Ecircumflex }
{ @Char Edieresis }
{ @Char Igrave }
{ @Char Iacute }
{ @Char Icircumflex }
{ @Char Idieresis }
{ @Char Eth }
{ @Char Ntilde }
{ @Char Ograve }
{ @Char Oacute }
{ @Char Ocircumflex }
{ @Char Otilde }
{ @Char Odieresis }
{ @Char multiply }
{ @Char Oslash }
{ @Char Ugrave }
{ @Char Uacute }
{ @Char Ucircumflex }
{ @Char Udieresis }
{ @Char Yacute }
{ @Char Thorn }
//1vx
{ @Char germandbls }
{ @Char agrave }
{ @Char aacute }
{ @Char acircumflex }
{ @Char atilde }
{ @Char adieresis }
{ @Char aring }
{ @Char ae }
{ @Char ccedilla }
{ @Char egrave }
{ @Char eacute }
{ @Char ecircumflex }
{ @Char edieresis }
{ @Char igrave }
{ @Char iacute }
{ @Char icircumflex }
{ @Char idieresis }
{ @Char eth }
{ @Char ntilde }
{ @Char ograve }
{ @Char oacute }
{ @Char ocircumflex }
{ @Char otilde }
{ @Char odieresis }
{ @Char divide }
{ @Char oslash }
{ @Char ugrave }
{ @Char uacute }
{ @Char ucircumflex }
{ @Char udieresis }
{ @Char yacute }
{ @Char thorn }
{ @Char ydieresis }
}
and here is the Times Italic font:
@ID @OneRow { Times Slope } @Font 0.05c @Space {
{ @Char space }
{ @Char exclam }
{ @Char quotedbl }
{ @Char numbersign }
{ @Char dollar }
{ @Char percent }
{ @Char ampersand }
{ @Char quoteright }
{ @Char parenleft }
{ @Char parenright }
{ @Char asterisk }
{ @Char plus }
{ @Char comma }
{ @Char hyphen }
{ @Char period }
{ @Char slash }
{ @Char zero }
{ @Char one }
{ @Char two }
{ @Char three }
{ @Char four }
{ @Char five }
{ @Char six }
{ @Char seven }
{ @Char eight }
{ @Char nine }
{ @Char colon }
{ @Char semicolon }
{ @Char less }
{ @Char equal }
{ @Char greater }
{ @Char question }
{ @Char at }
{ @Char bracketleft }
{ @Char backslash }
{ @Char bracketright }
{ @Char asciicircum }
{ @Char underscore }
{ @Char quoteleft }
//1vx
{ @Char A }
{ @Char B }
{ @Char C }
{ @Char D }
{ @Char E }
{ @Char F }
{ @Char G }
{ @Char H }
{ @Char I }
{ @Char J }
{ @Char K }
{ @Char L }
{ @Char M }
{ @Char N }
{ @Char O }
{ @Char P }
{ @Char Q }
{ @Char R }
{ @Char S }
{ @Char T }
{ @Char U }
{ @Char V }
{ @Char W }
{ @Char X }
{ @Char Y }
{ @Char Z }
//1vx
{ @Char a }
{ @Char b }
{ @Char c }
{ @Char d }
{ @Char e }
{ @Char f }
{ @Char g }
{ @Char h }
{ @Char i }
{ @Char j }
{ @Char k }
{ @Char l }
{ @Char m }
{ @Char n }
{ @Char o }
{ @Char p }
{ @Char q }
{ @Char r }
{ @Char s }
{ @Char t }
{ @Char u }
{ @Char v }
{ @Char w }
{ @Char x }
{ @Char y }
{ @Char z }
//1vx
{ @Char braceleft }
{ @Char bar }
{ @Char braceright }
{ @Char asciitilde }
{ @Char dotlessi }
{ @Char grave }
{ @Char acute }
{ @Char circumflex }
{ @Char tilde }
{ @Char macron }
{ @Char breve }
{ @Char dotaccent }
{ @Char dieresis }
{ @Char ring }
{ @Char cedilla }
{ @Char hungarumlaut }
{ @Char ogonek }
{ @Char caron }
{ @Char space }
{ @Char exclamdown }
{ @Char cent }
{ @Char sterling }
{ @Char currency }
{ @Char yen }
{ @Char brokenbar }
{ @Char section }
{ @Char dieresis }
{ @Char copyright }
{ @Char ordfeminine }
{ @Char guillemotleft }
{ @Char logicalnot }
{ @Char hyphen }
{ @Char registered }
{ @Char macron }
{ @Char degree }
{ @Char plusminus }
{ @Char twosuperior }
{ @Char threesuperior }
{ @Char acute }
{ @Char mu }
{ @Char paragraph }
{ @Char periodcentered }
{ @Char cedilla }
{ @Char onesuperior }
{ @Char ordmasculine }
{ @Char guillemotright }
{ @Char onequarter }
{ @Char onehalf }
{ @Char threequarters }
{ @Char questiondown }
//1vx
{ @Char Agrave }
{ @Char Aacute }
{ @Char Acircumflex }
{ @Char Atilde }
{ @Char Adieresis }
{ @Char Aring }
{ @Char AE }
{ @Char Ccedilla }
{ @Char Egrave }
{ @Char Eacute }
{ @Char Ecircumflex }
{ @Char Edieresis }
{ @Char Igrave }
{ @Char Iacute }
{ @Char Icircumflex }
{ @Char Idieresis }
{ @Char Eth }
{ @Char Ntilde }
{ @Char Ograve }
{ @Char Oacute }
{ @Char Ocircumflex }
{ @Char Otilde }
{ @Char Odieresis }
{ @Char multiply }
{ @Char Oslash }
{ @Char Ugrave }
{ @Char Uacute }
{ @Char Ucircumflex }
{ @Char Udieresis }
{ @Char Yacute }
{ @Char Thorn }
//1vx
{ @Char germandbls }
{ @Char agrave }
{ @Char aacute }
{ @Char acircumflex }
{ @Char atilde }
{ @Char adieresis }
{ @Char aring }
{ @Char ae }
{ @Char ccedilla }
{ @Char egrave }
{ @Char eacute }
{ @Char ecircumflex }
{ @Char edieresis }
{ @Char igrave }
{ @Char iacute }
{ @Char icircumflex }
{ @Char idieresis }
{ @Char eth }
{ @Char ntilde }
{ @Char ograve }
{ @Char oacute }
{ @Char ocircumflex }
{ @Char otilde }
{ @Char odieresis }
{ @Char divide }
{ @Char oslash }
{ @Char ugrave }
{ @Char uacute }
{ @Char ucircumflex }
{ @Char udieresis }
{ @Char yacute }
{ @Char thorn }
{ @Char ydieresis }
}
As their names imply, these two fonts belong to the @I { Times family },
a collection of fonts designed to go well together.  Every font has a
@I { family name }, such as Times, Helvetica, or Courier, and a
family.name @Index { family name of font }
face.name @Index { face name of font }
@I { face name }, such as Roman or Italic.  To find out how to
get the unusual characters, see Section {@NumberOf characters}.
@PP
Documents look best when they use just one font family, so the most
common need is to change to a different face within the current
family.  We have already seen {@Code "@I"}, which changes to the Italic
face of the current family; there are six such symbols:
b. @Index @Code "@B"
i. @Index @Code "@I"
bi. @Index @Code "@BI"
ii. @Index @Code "@II"
s. @Index @Code "@S"
r. @Index @Code "@R"
@ID @OneRow @Tab
    @Fmta { @Col @Code A ! @Col B }
{
@Rowa
    A { "@B { Hello World }" }
    B {  @B { Hello World }  }
@Rowa
    A { "@I { Hello World }" }
    B {  @I { Hello World }  }
@Rowa
    A { "@BI { Hello World }" }
    B {  @BI { Hello World }  }
@Rowa
    A { "@II { Hello World }" }
    B {  @II { Hello World }  }
@Rowa
    A { "@S { Hello World }" }
    B {  @S { Hello World }  }
@Rowa
    A { "@R { Hello World }" }
    B {  @R { Hello World }  }
}
The symbols' names stand for Bold, Italic, Bold-Italic, Italic-Italic
(see below), Small capitals, and Roman.  It is conventional to use Bold
for headings; Italic for emphasis, terms being defined, and subsidiary
headings; and Roman for the rest.  Small capitals are not really a
different font; they are
small.caps @Index { small capitals }
made on demand from the current font.  So you can write, for example,
@ID @Code "@I @S { Hello World }"
and get @I @S { Hello World }.  You can change the size of small
capitals using the @Code "@Font" or @Code "@InitialFont" symbols,
as described below.
@PP
The @Code "@R" symbol is almost unnecessary, since the document as a
whole is set in a Roman face; but it is occasionally useful:
@ID @Code "@I { An Italic sentence with one @R Roman word }"
produces
@ID @I { An Italic sentence with one @R Roman word }
This illustrates the general principle that the effect of a font symbol
on the following object is subject to font symbols within that object.
@PP
When part of a title is to be set in italic font, neither @Code "@I"
nor @Code "@BI" is suitable because the part should appear in bold
italics in the title itself, but in ordinary italics in running headers
and the table of contents.  The @Code "@II" symbol is the one for this
situation:  it produces bold italics when the current font is bold,
and ordinary italics otherwise.
@PP
Changing families is a little more complicated.  Here is the complete
list of font families and their faces available with Basser Lout Version 3:
@ID @OneRow @Tab
    @Fmta { @Col @Code A ! @Col { ragged nohyphen } @Break @Code B }
{
@Rowa
    A { AvantGarde }
    B { Base Slope Bold BoldSlope BoldObl Book BookOblique
CondBold CondBook CondDemi CondMedium Demi DemiOblique
ExtraLight ExtraLightObl Medium MediumObl }
@Rowa
    A { Bookman }
    B { Base Slope Bold BoldSlope BoldItalic Demi DemiItalic
Light LightItalic Medium MediumItalic }
@Rowa
    A { Chancery }
    B { Base Slope Bold BoldSlope
Roman Bold Italic Light Demi LightItalic MediumItalic
}
@Rowa
    A { Courier }
    B { Base Slope Bold BoldSlope BoldOblique Oblique }
@Rowa
    A { Helvetica }
    B { Base Slope Bold BoldSlope Black BlackOblique
BoldOblique Compressed Cond CondBlack CondBlackObl
CondBold CondBoldObl CondLight CondLightObl
CondOblique ExtraCompressed
Light LightOblique Narrow NarrowBold NarrowBoldObl
NarrowObl Oblique UltraCompressed }
@Rowa
    A { Schoolbook }
    B { Base Slope Bold BoldSlope BoldItalic Italic Roman }
@Rowa
    A { Palatino }
    B { Base Slope Bold BoldSlope BoldItalic
BoldItalicOsF BoldOsF Italic ItalicOsF Roman SC }
@Rowa
    A { Symbol }
    B { Base Slope Bold BoldSlope }
@Rowa
    A { Times }
    B { Base Slope Bold BoldSlope BoldItalic
BoldItalicOsF BoldSC ExtraBold Italic ItalicOsF
Roman RomanSC Semibold SemiboldItalic }
@Rowa
    A { Dingbats }
    B { Base Slope Bold BoldSlope }
}
Lout understands all these fonts, but your printing device may not.  Times,
Helvetica, Courier, and Symbol at least seem to be ubiquitous, although
not in every face.  These fonts work only with languages that use the
Latin1 character set; consult Section {@NumberOf languages} for more
information about this.  It is not difficult for a Lout expert to extend this
list @Cite { $kingston1995lout.expert }.
@PP
It is a convention in Lout that every font family should at least
base. @Index { @Code Base font }
slope. @Index { @Code Slope font }
bold. @Index { @Code Bold font }
boldslope. @Index { @Code BoldSlope font }
contain faces called @Code { Base }, @Code { Slope }, @Code { Bold },
and @Code { BoldSlope }, and these faces are what the @Code { "@R" },
@Code { "@I" }, @Code { "@B" }, and @Code { "@BI" } symbols give you.  But
this convention is something of a fiction for two reasons.  First,
some font families don't have faces that could reasonably be described as
bold or whatever.  In particular, the @Code Symbol family contains just
one face, and all four conventional face names produce that face.  Second,
the four conventional face names are not names that typographers actually
use, @Code { Bold } excepted.  @Code { Slope } produces an italic face
in some families and an oblique one in others.  As the table shows, the
true names are available if you want to use them, but it is very convenient
to have a @Code { Slope } face that is guaranteed to exist no matter which
family is used.
@PP
The @Code "@Font" symbol changes the font of the following object.  For
font.sym @Index { @Code "@Font" symbol }
example,
@ID @Code "{ Helvetica Slope } @Font { Hello World }"
produces
@ID { Helvetica Slope } @Font { Hello World }
When changing to a different family, a face name must follow the family
name; but when changing face within a family, just the face name is
sufficient.
@PP
To make the characters larger or smaller, you need to change the
font.size @Index { font size }
@I { font size }, which can also be done with the @Code "@Font"
symbol.  Font sizes are traditionally measured in {@I points}:  there
are 72 points to one inch, and the most common font sizes are 12 point
and 10 point.  However, as Section {@NumberOf objects} explains in
detail, any length including fractional lengths is acceptable:
@ID @Code "24p @Font { Hello World }"
changes to 24 point size, producing
@ID 24p @Font { Hello World }
It is also possible to specify a font size relative to the current
size:  @Code "+2p" means two points larger, @Code "-2p" means two
points smaller, and @Code "1.5f" means 1.5 times the current font
size.
@PP
If you switch font sizes in the middle of a line, as in
@ID @Code "Here's a 20p @Font big word"
you will discover one of Lout's obscure secrets:
@ID { Here's a 20p @Font big word }
Adjacent letters are aligned vertically through their middles, not
through the baseline, causing this awkward alignment.  This was done
because it makes equation formatting easy, and examples like the above
look poor anyway.  However, if you want to do this and so require
alignment through the baseline, you can get it, with the @Code baselinemark
option to the @Code "@Font" symbol:
@ID @Code "baselinemark @Font { Here's a 20p @Font big word }"
which produces
@ID @Code { baselinemark @Font { Here's a 20p @Font big word } }
If you want it this way throughout your document, you can put
@Code { baselinemark } in your initial font (see below).  Lout's
equation formatter contains the opposite option, which is
@Code "xheight2mark @Font { ... }"
(which aligns through a point half the height of
an x character) so you won't disrupt equation formatting if you do
this, although if you put an equation inside a paragraph, its
axis will be aligned with the baseline of the adjacent words.
@PP
There is an @Code "@F" symbol which switches to a fixed width font
family:
@ID @Code "@F { Hello world }"
produces the equivalent of @Code "{ Courier Base -1p } @Font ...",
like this:
@ID @F { Hello world }
The @Code "-1p" is included to compensate for the relatively
large appearance of the Courier font.
@PP
The document as a whole will be set in @Code { Times Base 12p }.  To
change this you need to change the @Code "@InitialFont" option, for
initialfont. @Index @Code "@InitialFont"
example to
@ID @Code "@InitialFont { Helvetica Base 10p }"
to get Helvetica 10 point.  You must give all three parts in
{@Code "@InitialFont"}:  family, face, size.  If you are using your own
setup file, as explained in Section {@NumberOf setup}, you can find the
@Code "@InitialFont" option there.  If not, you can set it at the
beginning of your document as explained in Section {@NumberOf ordinary}.
@PP
The @Code "@InitialFont" option is also a good place to set the size
of small capitals if you don't like the default size that Lout gives
you:
@ID @Code "@InitialFont { Helvetica Base 10p setsmallcaps 0.9 }"
In this example we're asking for small capitals to have size 0.9
times the height of ordinary capitals.  The number following
@Code "setsmallcaps" is a ratio, not a length, so it carries no
unit of measurement.  You can put @Code "setsmallcaps" in an ordinary
@Code "@Font" symbol too, if you like.  For example,
@ID @Code "{ setsmallcaps 0.9 } @Font @S { Hello, world }"
has result
@ID { { setsmallcaps 0.9 } @Font @S { Hello, world } }
However for consistency most people would use @Code "setsmallcaps" only in
{@Code "@InitialFont"}, if at all.
@PP
There are two features that make fonts look better on the
page.  @I Ligatures are pairs of letters run together; the most
ligatures. @Index { ligatures }
common ligatures are `fi' and `fl.'  @I Kerning is moving adjacent
kerning. @Index { kerning }
letters closer together, for example in `VA.'  Lout considers
ligatures and kerning to be integral parts of each font; you can prevent
them from happening only by enclosing one of the letters in a
@Code "@OneCol" symbol, as in {@Code "@OneCol { V }A" }.  Alternatively,
to turn off ligatures you can write
@ID @Code "nolig @Font { ... }"
and then ligatures will not be used within the object following
{@Code "@Font"}.  Should you ever need to turn ligatures on
within a region where they are turned off, use {@Code "lig @Font"}.
@End @Section