diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-06-27 23:03:09 -0700 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-06-27 23:03:09 -0700 |
commit | 18c0112c5b01df38dd93e18558beff5ec2b3f825 (patch) | |
tree | 5995eae3445608ec30e40d375e4ae5c317dee763 | |
parent | de8817ddbcb3e3ecc0e81c1d5fdd973064d41563 (diff) | |
download | nasm-18c0112c5b01df38dd93e18558beff5ec2b3f825.tar.gz |
doc: for ps/pdf, use a smaller font for code
The text looks better using a smaller font for both inline code and
code paragraphs.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r-- | doc/psfonts.ph | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/doc/psfonts.ph b/doc/psfonts.ph index 093d9dc4..9ebbe09d 100644 --- a/doc/psfonts.ph +++ b/doc/psfonts.ph @@ -21,33 +21,54 @@ my @QText = ('SourceSansPro-It', 'ClearSans-Italic', 'LiberationSans-Italic', 'Arial-Italic', 'Helvetica-Italic'); my @QBold = ('SourceSansPro-BoldIt', 'ClearSans-BoldItalic', 'LiberationSans-BoldItalic', 'Arial-Bold', 'Helvetica-BoldItalic'); my @QCode = ('SourceCodePro-Regular', 'LiberationMono', 'Courier'); +my @XCode = ('SourceCodePro-Regular', 'LiberationMono', 'Courier'); # The fonts we want to use for various things # The order is: <normal> <emphatic> <code> +my $lf = 1.2; # Leading scale factor +my $cf = 0.8; # Code size scale factor + +my $st = 20; %TitlFont = (name => 'tfont', - leading => 24, - fonts => [[20, \@TText], [20, \@TItal], [20, \@TCode]]); + leading => $st*$lf, + fonts => [[$st, \@TText], [$st, \@TItal], [$st*$cf, \@TCode]]); + +my $sc = 18; %ChapFont = (name => 'cfont', - leading => 21.6, - fonts => [[18, \@HText], [18, \@HItal], [18, \@HCode]]); + leading => $sc*$lf, + fonts => [[$sc, \@HText], [$sc, \@HItal], [$sc*$cf, \@HCode]]); + +my $sh = 14; %HeadFont = (name => 'hfont', - leading => 16.8, - fonts => [[14, \@HText], [14, \@HItal], [14, \@HCode]]); + leading => $sh*$lf, + fonts => [[$sh, \@HText], [$sh, \@HItal], [$sh*$cf, \@HCode]]); + +my $ss = 12; %SubhFont = (name => 'sfont', - leading => 14.4, - fonts => [[12, \@HText], [12, \@HItal], [12, \@HCode]]); + leading => $ss*$lf, + fonts => [[$ss, \@HText], [$ss, \@HItal], [$ss*$cf, \@HCode]]); + +my $sb = 10; %BodyFont = (name => 'bfont', - leading => 12, - fonts => [[10, \@BText], [10, \@BItal], [10, \@BCode]]); + leading => $sb*$lf, + fonts => [[$sb, \@BText], [$sb, \@BItal], [$sb*$cf, \@BCode]]); + +my $sq = 9; %BquoFont = (name => 'qfont', - leading => 10.8, - fonts => [[9, \@QText], [9, \@QBold], [9, \@QCode]]); + leading => $sq*$lf, + fonts => [[$sq, \@QText], [$sq, \@QBold], [$sq*$cf, \@QCode]]); + +my $sx = $sb*$cf; +%CodeFont = (name => 'xfont', + leading => $sx*$lf, + fonts => [[$sx, \@XCode], [$sx, \@XCode], [$sx, \@XCode]]); + # # List of all fontsets; used to compute the list of fonts needed # @AllFonts = ( \%TitlFont, \%ChapFont, \%HeadFont, \%SubhFont, \%BodyFont, - \%BquoFont); + \%BquoFont, \%CodeFont ); # OK 1; |