2002-05-15 05:59:59 +08:00
|
|
|
#!/usr/bin/perl
|
|
|
|
#
|
|
|
|
# Font metrics for the PS code generator
|
|
|
|
#
|
|
|
|
|
|
|
|
# These files are generated from AFM files
|
|
|
|
require 'metrics/ptmr8a.ph'; # Times-Roman
|
2002-05-16 10:11:21 +08:00
|
|
|
require 'metrics/ptmb8a.ph'; # Times-Bold
|
2002-05-15 05:59:59 +08:00
|
|
|
require 'metrics/ptmri8a.ph'; # Times-Italic
|
2002-05-16 10:11:21 +08:00
|
|
|
require 'metrics/ptmbi8a.ph'; # Times-BoldItalic
|
2002-05-15 05:59:59 +08:00
|
|
|
require 'metrics/pcrr8a.ph'; # Courier
|
|
|
|
require 'metrics/pcrb8a.ph'; # Courier-Bold
|
2008-06-15 03:09:25 +08:00
|
|
|
require 'metrics/phvr8a.ph'; # Helvetica
|
|
|
|
require 'metrics/phvro8a.ph'; # Helvetica-Oblique
|
2002-05-15 05:59:59 +08:00
|
|
|
require 'metrics/phvb8a.ph'; # Helvetica-Bold
|
|
|
|
require 'metrics/phvbo8a.ph'; # Helvetica-BoldOblique
|
|
|
|
|
|
|
|
# The fonts we want to use for various things
|
|
|
|
# The order is: <normal> <emphatic> <code>
|
|
|
|
|
2008-06-15 03:09:25 +08:00
|
|
|
if ( 1 ) {
|
|
|
|
# Times family fonts
|
|
|
|
|
|
|
|
%TitlFont = (name => 'tfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 24,
|
2002-05-16 10:11:21 +08:00
|
|
|
fonts => [[20,\%PS_Times_Bold],
|
|
|
|
[20,\%PS_Times_BoldItalic],
|
|
|
|
[20,\%PS_Courier_Bold]]);
|
2008-06-15 03:09:25 +08:00
|
|
|
%ChapFont = (name => 'cfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 21.6,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[18,\%PS_Times_Bold],
|
|
|
|
[18,\%PS_Times_BoldItalic],
|
|
|
|
[18,\%PS_Courier_Bold]]);
|
|
|
|
%HeadFont = (name => 'hfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 16.8,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[14,\%PS_Times_Bold],
|
|
|
|
[14,\%PS_Times_BoldItalic],
|
|
|
|
[14,\%PS_Courier_Bold]]);
|
|
|
|
%SubhFont = (name => 'sfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 14.4,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[12,\%PS_Times_Bold],
|
|
|
|
[12,\%PS_Times_BoldItalic],
|
|
|
|
[12,\%PS_Courier_Bold]]);
|
|
|
|
%BodyFont = (name => 'bfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 12,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[10,\%PS_Times_Roman],
|
|
|
|
[10,\%PS_Times_Italic],
|
|
|
|
[10,\%PS_Courier]]);
|
|
|
|
} elsif ( 0 ) {
|
|
|
|
# Helvetica family fonts
|
|
|
|
|
|
|
|
%TitlFont = (name => 'tfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 24,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[20,\%PS_Helvetica_Bold],
|
|
|
|
[20,\%PS_Helvetica_BoldOblique],
|
|
|
|
[20,\%PS_Courier_Bold]]);
|
|
|
|
%ChapFont = (name => 'cfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 21.6,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[18,\%PS_Helvetica_Bold],
|
|
|
|
[18,\%PS_Helvetica_BoldOblique],
|
|
|
|
[18,\%PS_Courier_Bold]]);
|
|
|
|
%HeadFont = (name => 'hfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 16.8,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[14,\%PS_Helvetica_Bold],
|
|
|
|
[14,\%PS_Helvetica_BoldOblique],
|
|
|
|
[14,\%PS_Courier_Bold]]);
|
|
|
|
%SubhFont = (name => 'sfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 14.4,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[12,\%PS_Helvetica_Bold],
|
|
|
|
[12,\%PS_Helvetica_BoldOblique],
|
|
|
|
[12,\%PS_Courier_Bold]]);
|
|
|
|
%BodyFont = (name => 'bfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 12,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[10,\%PS_Helvetica],
|
|
|
|
[10,\%PS_Helvetica_Oblique],
|
|
|
|
[10,\%PS_Courier]]);
|
|
|
|
} else {
|
|
|
|
# Body text Times; headings Helvetica
|
|
|
|
%TitlFont = (name => 'tfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 24,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[20,\%PS_Helvetica_Bold],
|
|
|
|
[20,\%PS_Helvetica_BoldOblique],
|
|
|
|
[20,\%PS_Courier_Bold]]);
|
|
|
|
%ChapFont = (name => 'cfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 21.6,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[18,\%PS_Helvetica_Bold],
|
|
|
|
[18,\%PS_Helvetica_BoldOblique],
|
|
|
|
[18,\%PS_Courier_Bold]]);
|
|
|
|
%HeadFont = (name => 'hfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 16.8,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[14,\%PS_Helvetica_Bold],
|
|
|
|
[14,\%PS_Helvetica_BoldOblique],
|
|
|
|
[14,\%PS_Courier_Bold]]);
|
|
|
|
%SubhFont = (name => 'sfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 14.4,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[12,\%PS_Helvetica_Bold],
|
|
|
|
[12,\%PS_Helvetica_BoldOblique],
|
|
|
|
[12,\%PS_Courier_Bold]]);
|
|
|
|
%BodyFont = (name => 'bfont',
|
2012-02-26 07:46:38 +08:00
|
|
|
leading => 12,
|
2008-06-15 03:09:25 +08:00
|
|
|
fonts => [[10,\%PS_Times_Roman],
|
|
|
|
[10,\%PS_Times_Italic],
|
|
|
|
[10,\%PS_Courier]]);
|
|
|
|
}
|
2002-05-15 05:59:59 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# List of all fontsets; used to compute the list of fonts needed
|
|
|
|
#
|
2002-05-16 10:11:21 +08:00
|
|
|
@AllFonts = ( \%TitlFont, \%ChapFont, \%HeadFont, \%SubhFont, \%BodyFont );
|
2002-05-15 05:59:59 +08:00
|
|
|
|
|
|
|
# OK
|
|
|
|
1;
|