psfonts.ph 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/usr/bin/perl
  2. #
  3. # Font metrics for the PS code generator
  4. #
  5. # Font substitution lists, in order of preference
  6. my @TText = ('SourceSansPro-Bold', 'ClearSans-Bold', 'LiberationSans-Bold',
  7. 'Arial-Bold', 'Helvetica-Bold');
  8. my @TItal = ('SourceSansPro-BoldIt', 'ClearSans-BoldItalic', 'LiberationSans-BoldItalic',
  9. 'Arial-BoldItalic', 'Helvetica-BoldItalic');
  10. my @TCode = ('SourceCodePro-Bold', 'LiberationMono-Bold', 'Courier-Bold');
  11. my @HText = ('SourceSansPro-Semibold', 'ClearSans-Bold', 'Arial-Bold', 'Helvetica-Bold');
  12. my @HItal = ('SourceSansPro-SemiboldIt', 'ClearSans-BoldItalic',
  13. 'Arial-BoldItalic', 'Helvetica-BoldItalic');
  14. my @HCode = ('SourceCodePro-Semibold', 'LiberationMono-Bold', 'Courier-Bold');
  15. my @BText = ('SourceSansPro-Regular', 'ClearSans', 'LiberationSans', 'Arial', 'Helvetica');
  16. my @BItal = ('SourceSansPro-It', 'ClearSans-Italic', 'LiberationSans-Italic',
  17. 'Arial-Italic', 'Helvetica-Italic');
  18. my @BCode = ('SourceCodePro-Regular', 'LiberationMono', 'Courier');
  19. my @QText = ('SourceSansPro-It', 'ClearSans-Italic', 'LiberationSans-Italic',
  20. 'Arial-Italic', 'Helvetica-Italic');
  21. my @QBold = ('SourceSansPro-BoldIt', 'ClearSans-BoldItalic', 'LiberationSans-BoldItalic', 'Arial-Bold', 'Helvetica-BoldItalic');
  22. my @QCode = ('SourceCodePro-Regular', 'LiberationMono', 'Courier');
  23. # The fonts we want to use for various things
  24. # The order is: <normal> <emphatic> <code>
  25. %TitlFont = (name => 'tfont',
  26. leading => 24,
  27. fonts => [[20, \@TText], [20, \@TItal], [20, \@TCode]]);
  28. %ChapFont = (name => 'cfont',
  29. leading => 21.6,
  30. fonts => [[18, \@HText], [18, \@HItal], [18, \@HCode]]);
  31. %HeadFont = (name => 'hfont',
  32. leading => 16.8,
  33. fonts => [[14, \@HText], [14, \@HItal], [14, \@HCode]]);
  34. %SubhFont = (name => 'sfont',
  35. leading => 14.4,
  36. fonts => [[12, \@HText], [12, \@HItal], [12, \@HCode]]);
  37. %BodyFont = (name => 'bfont',
  38. leading => 12,
  39. fonts => [[10, \@BText], [10, \@BItal], [10, \@BCode]]);
  40. %BquoFont = (name => 'qfont',
  41. leading => 10.8,
  42. fonts => [[9, \@QText], [9, \@QBold], [9, \@QCode]]);
  43. #
  44. # List of all fontsets; used to compute the list of fonts needed
  45. #
  46. @AllFonts = ( \%TitlFont, \%ChapFont, \%HeadFont, \%SubhFont, \%BodyFont,
  47. \%BquoFont);
  48. # OK
  49. 1;