Difference between revisions of "TeXfont - Old Content"

From Wiki
Jump to navigation Jump to search
(Small note that the afm file is *not* broken)
Line 1: Line 1:
== Century Gothic fails in texfont ==
+
== texfont fails with syntax error ==
  
(Fix tested on: TeXFont version 2.2.1; afm2tfm version 8.1 (dvips(k) 5.94b); Windows XP)
+
(Tested on: TeXFont version 2.2.1; afm2tfm version 8.1 (dvips(k) 5.94b); Windows XP)
  
If you are trying to get Monotype's '''Century Gothic''' font family to install using texfont, you may run into an error at the <tt>afm2tfm</tt> stage of the process, where a syntax error is shown with reference to the Composite Characters section of the AFM file. The error may look something like this:
+
If you are installing a Type 1 font (.pfb and .afm files) using <tt>texfont</tt>, and you come up against an error message like this:
  
 
<pre>
 
<pre>
Line 12: Line 12:
 
</pre>
 
</pre>
  
This will cause the font installation to fail.
+
then you have probably run into a bug in your version of <tt>afm2tfm</tt>, which is a program called by the <tt>texfont</tt> script. This happened to me with Monotype's ''Century Gothic'' font family. You have 2 options:
  
To fix the broken AFM files, open them in a text editor and find the section headed <tt>StartComposites</tt>. In each line in this section, up to the line <tt>EndComposites</tt>, make sure that there is a space ''before and after'' every semicolon (there are 3 semicolons per line). For example, the line referenced above will now look like this:
+
# get a fixed version of afm2tfm ('''NB''' I don't know if this exists yet);
 +
# edit the AFM files to work around the problem.
 +
 
 +
To take the second option, open each <tt>.afm</tt> file in a text editor and find the section headed <tt>StartComposites</tt>. In each line in this section, up to the line <tt>EndComposites</tt>, make sure that there is a space ''before'' every semicolon as well as after (there are 3 semicolons per line). For example, the line referenced above would now look like this:
  
 
<pre>
 
<pre>
Line 20: Line 23:
 
</pre>
 
</pre>
  
After you have done this to all the CC lines, <tt>afm2tfm</tt> should work and texfont should complete successfully.
+
After you have done this to all the <tt>CC</tt> lines, <tt>afm2tfm</tt> should work and texfont should complete successfully.
 
 
: The afm file is correct. See the afm specification. <tt>afm2tfm</tt> is broken and a bug should be reported. --[[User:Patrick Gundlach|pg]]
 

Revision as of 17:13, 28 February 2005

texfont fails with syntax error

(Tested on: TeXFont version 2.2.1; afm2tfm version 8.1 (dvips(k) 5.94b); Windows XP)

If you are installing a Type 1 font (.pfb and .afm files) using texfont, and you come up against an error message like this:

; expected: ! syntax error
CC Aacute 2; PCC A 0 0; PCC acute 182 150;

                 ^

then you have probably run into a bug in your version of afm2tfm, which is a program called by the texfont script. This happened to me with Monotype's Century Gothic font family. You have 2 options:

  1. get a fixed version of afm2tfm (NB I don't know if this exists yet);
  2. edit the AFM files to work around the problem.

To take the second option, open each .afm file in a text editor and find the section headed StartComposites. In each line in this section, up to the line EndComposites, make sure that there is a space before every semicolon as well as after (there are 3 semicolons per line). For example, the line referenced above would now look like this:

CC Aacute 2 ; PCC A 0 0 ; PCC acute 182 150 ;

After you have done this to all the CC lines, afm2tfm should work and texfont should complete successfully.