travis: weirdpaste.i now has better line directives
[nasm.git] / doc / psfonts.ph
blob9ebbe09d65f109a4bb7b2c6d2119cff561e22ef9
1 #!/usr/bin/perl
3 # Font metrics for the PS code generator
6 # Font substitution lists, in order of preference
7 my @TText = ('SourceSansPro-Bold', 'ClearSans-Bold', 'LiberationSans-Bold',
8 'Arial-Bold', 'Helvetica-Bold');
9 my @TItal = ('SourceSansPro-BoldIt', 'ClearSans-BoldItalic', 'LiberationSans-BoldItalic',
10 'Arial-BoldItalic', 'Helvetica-BoldItalic');
11 my @TCode = ('SourceCodePro-Bold', 'LiberationMono-Bold', 'Courier-Bold');
12 my @HText = ('SourceSansPro-Semibold', 'ClearSans-Bold', 'Arial-Bold', 'Helvetica-Bold');
13 my @HItal = ('SourceSansPro-SemiboldIt', 'ClearSans-BoldItalic',
14 'Arial-BoldItalic', 'Helvetica-BoldItalic');
15 my @HCode = ('SourceCodePro-Semibold', 'LiberationMono-Bold', 'Courier-Bold');
16 my @BText = ('SourceSansPro-Regular', 'ClearSans', 'LiberationSans', 'Arial', 'Helvetica');
17 my @BItal = ('SourceSansPro-It', 'ClearSans-Italic', 'LiberationSans-Italic',
18 'Arial-Italic', 'Helvetica-Italic');
19 my @BCode = ('SourceCodePro-Regular', 'LiberationMono', 'Courier');
20 my @QText = ('SourceSansPro-It', 'ClearSans-Italic', 'LiberationSans-Italic',
21 'Arial-Italic', 'Helvetica-Italic');
22 my @QBold = ('SourceSansPro-BoldIt', 'ClearSans-BoldItalic', 'LiberationSans-BoldItalic', 'Arial-Bold', 'Helvetica-BoldItalic');
23 my @QCode = ('SourceCodePro-Regular', 'LiberationMono', 'Courier');
24 my @XCode = ('SourceCodePro-Regular', 'LiberationMono', 'Courier');
26 # The fonts we want to use for various things
27 # The order is: <normal> <emphatic> <code>
29 my $lf = 1.2; # Leading scale factor
30 my $cf = 0.8; # Code size scale factor
32 my $st = 20;
33 %TitlFont = (name => 'tfont',
34 leading => $st*$lf,
35 fonts => [[$st, \@TText], [$st, \@TItal], [$st*$cf, \@TCode]]);
37 my $sc = 18;
38 %ChapFont = (name => 'cfont',
39 leading => $sc*$lf,
40 fonts => [[$sc, \@HText], [$sc, \@HItal], [$sc*$cf, \@HCode]]);
42 my $sh = 14;
43 %HeadFont = (name => 'hfont',
44 leading => $sh*$lf,
45 fonts => [[$sh, \@HText], [$sh, \@HItal], [$sh*$cf, \@HCode]]);
47 my $ss = 12;
48 %SubhFont = (name => 'sfont',
49 leading => $ss*$lf,
50 fonts => [[$ss, \@HText], [$ss, \@HItal], [$ss*$cf, \@HCode]]);
52 my $sb = 10;
53 %BodyFont = (name => 'bfont',
54 leading => $sb*$lf,
55 fonts => [[$sb, \@BText], [$sb, \@BItal], [$sb*$cf, \@BCode]]);
57 my $sq = 9;
58 %BquoFont = (name => 'qfont',
59 leading => $sq*$lf,
60 fonts => [[$sq, \@QText], [$sq, \@QBold], [$sq*$cf, \@QCode]]);
62 my $sx = $sb*$cf;
63 %CodeFont = (name => 'xfont',
64 leading => $sx*$lf,
65 fonts => [[$sx, \@XCode], [$sx, \@XCode], [$sx, \@XCode]]);
68 # List of all fontsets; used to compute the list of fonts needed
70 @AllFonts = ( \%TitlFont, \%ChapFont, \%HeadFont, \%SubhFont, \%BodyFont,
71 \%BquoFont, \%CodeFont );
73 # OK