Get fonts right in pdf formated papers
I was struggling with font problem in my paper these days, and finally got done with it. I use winedt/MikTex companions under windows XP since 3-4 years ago. And PowerPoint for the figures, since I can directly print to pdf-printer (feature of acrobat) to get pdf figures nowadays. All these tools works efficiently. However, they didn't comply with ACM's strict requirement of fonts in publications, which restricts to the use of "type 1" and "embedded" fonts ONLY. Now, I have two problems. First one, I always have "truetype" font in my figures, since I don't have any "type 1" font installed on my windows. Second one, there are several "type 1" fonts cannot be embedded, such as "times", "courier" and etc.
================================================================
For the first problem, I need to install and use the "type 1" font corresponding to the "truetype" font I used in PowerPoint, so that the pdf figures generated contain "type 1". The free way of getting "type 1" font is to convert from existing truetype font (under \WINDOWS\Fonts). There are two ways of doing this:
First, use fft2pt1 (truetype to type 1 converter) to convert the truetype font (from a .fft file to a .pfb file and a .afm file), then use afm2pfm to convert the .afm to a .pfm file that windows recognizes, and finally drag the .pfm file to \WINDOWS\Fonts folder to get it installed. Note that if you're NOT using windows XP or 2000, you need to install Adobe Type Manager (ATM) to install the type 1 font. For now, if you're lucky, you can see and use the type 1 font in the PowerPoint font box (I cannot for some reason I don't know).
The second way to do this is to use FontLab (a commercial software) to generate the type 1 font. Just open the .ttf font, go to File->Font Info to give it a different font name (first page), go to File->Generate font, and choose to generate the "type 1 binary file (*.pfb)". Then install the font by dragging the .pfm file to \WINDOWS\Fonts folder. I managed to see the font in PowerPoint using this second method.
In PowerPoint, substitute all the fonts with the type 1 fonts you generated. When printing to the pdf printer, make sure to set the options of pdf printer to embed all the fonts (for my case, under "conversion settings->fonts->embedding" and add all the fonts to the "always embed" list). When the pdf file is produced, open it with acrobat, press CTRL+D to see the fonts. Most likely, you'll have all the fonts embedded.
An exception may occur if you use a non-English version of PowerPoint. For me, Chinese version. The default font is Sim-Sun. Some times, even all the places you can touch is set to non Sim-Sun font, it will still be included in the pdf file. In this case, open a new PowerPoint file, copy and paste you figure part by part to the new file. Produce a pdf file and check the font to see where Sim-Sun is introduced, and then try to modify or remove them. For me, I found starting spaces (by accident) introduces Sim-Sun, so I removed them.
==================================================================
For the second problem, the cannot-be-embedded fonts are from the text compiled with pdflatex, which are assumed (by whom?) to be available on all systems (but not true), and referred as Base14 fonts.
To embed them, the simplest way is to install the latest version of MikTex (2.5) and ensure the pdfeTex version is above 1.20. By default, Base14 fonts are embedded. If you're using Tex system under Linux, similarly you need to ensure the pdfeTex (or pdfTex, or pdflatex) is above version 1.20. And then edit "/web2c/updmap.cfg" to ensure the following options is set to true: pdftexDownloadBase14, dvipdfmDownloadBase14. Finally, run updmap as root to update the configuration.
Another way of doing this is save your pdf document with the not-yet-embedded fonts as a PS file, using "save as..." in acrobat. Then use the command "ps2pdf14 -dPDFSETTINGS=/prepress -dEmbedAllFonts=true mydoc.ps" to generate the pdf file with fonts embedded.
I compared the results of the above two approaches, i.e., the direct pdflatex generating approach and the pdf->ps->pdf approach. It seems to me that the former approach is better in the following aspects. It includes less redundant fonts, so the file size is smaller. The graphs looks more original, and scrolls faster especially when complex patterns are used (pdf->ps->pdf approach converts 2 times, and may introduce some distortions and more fragments to the vector graph, thus show up slowly).
We're done.
================================================================
For the first problem, I need to install and use the "type 1" font corresponding to the "truetype" font I used in PowerPoint, so that the pdf figures generated contain "type 1". The free way of getting "type 1" font is to convert from existing truetype font (under \WINDOWS\Fonts). There are two ways of doing this:
First, use fft2pt1 (truetype to type 1 converter) to convert the truetype font (from a .fft file to a .pfb file and a .afm file), then use afm2pfm to convert the .afm to a .pfm file that windows recognizes, and finally drag the .pfm file to \WINDOWS\Fonts folder to get it installed. Note that if you're NOT using windows XP or 2000, you need to install Adobe Type Manager (ATM) to install the type 1 font. For now, if you're lucky, you can see and use the type 1 font in the PowerPoint font box (I cannot for some reason I don't know).
The second way to do this is to use FontLab (a commercial software) to generate the type 1 font. Just open the .ttf font, go to File->Font Info to give it a different font name (first page), go to File->Generate font, and choose to generate the "type 1 binary file (*.pfb)". Then install the font by dragging the .pfm file to \WINDOWS\Fonts folder. I managed to see the font in PowerPoint using this second method.
In PowerPoint, substitute all the fonts with the type 1 fonts you generated. When printing to the pdf printer, make sure to set the options of pdf printer to embed all the fonts (for my case, under "conversion settings->fonts->embedding" and add all the fonts to the "always embed" list). When the pdf file is produced, open it with acrobat, press CTRL+D to see the fonts. Most likely, you'll have all the fonts embedded.
An exception may occur if you use a non-English version of PowerPoint. For me, Chinese version. The default font is Sim-Sun. Some times, even all the places you can touch is set to non Sim-Sun font, it will still be included in the pdf file. In this case, open a new PowerPoint file, copy and paste you figure part by part to the new file. Produce a pdf file and check the font to see where Sim-Sun is introduced, and then try to modify or remove them. For me, I found starting spaces (by accident) introduces Sim-Sun, so I removed them.
==================================================================
For the second problem, the cannot-be-embedded fonts are from the text compiled with pdflatex, which are assumed (by whom?) to be available on all systems (but not true), and referred as Base14 fonts.
To embed them, the simplest way is to install the latest version of MikTex (2.5) and ensure the pdfeTex version is above 1.20. By default, Base14 fonts are embedded. If you're using Tex system under Linux, similarly you need to ensure the pdfeTex (or pdfTex, or pdflatex) is above version 1.20. And then edit "
No comments:
Post a Comment