Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to make sure that I can load the same fonts for each input file either for diagrams and text contents. It is related to my statement below,

Even though PSTricks cannot work with pdflatex directly, it really does not bother us because the agile users (who adopt the best practice paradigm, "separation of concern") know that diagrams should be separated from the text contents. It means that each diagram should be put in a separate, standalone, yet compilable input file. For PSTricks, this diagram's input file must be compiled by latex-dvips-ps2pdf sequence. The product of it is a diagram in PDF format which is consumable to pdflatex used to compile the main input file (i.e., the input file containing the text document). Does it make sense?

and

We can create our own package common.sty just to load the common settings (fonts, etc). This package then can be loaded from within each input file, either for diagrams or text document. So font (as well as other common settings) used in the diagram is exactly identical to one used in text document.

So is there any font that can only be loaded for pdflatex but not for latex-dvips-ps2pdf? If there is no such a font, I am in a safe position.

share|improve this question
1  
pdflatex can use .ttf fonts directly. dvips can't. So e.g. the winfonts package could be problematic. –  Ulrike Fischer Dec 31 '13 at 13:54
    
Also, I don't know if this is still available but gtamacfonts would also be problematic. I'm not aware of any other generally available packages which use truetype fonts directly, but those are the problematic ones. –  cfr Dec 31 '13 at 14:16
    
@UlrikeFischer: So is there the reverse case in which the fonts is available in dvips but not for pdflatex? –  In PSTricks we trust Dec 31 '13 at 14:51
    
As far as I know, pdflatex can use anything latex-dvips-etc. can use where fonts are concerned. However, metafont tends to render horribly with pdflatex. I do not know if this affects pdfs generated from the latex-dvips-ps2pdf workflow or not. –  cfr Jan 4 at 4:11
    
Actually, a web search suggests it is a rendering issue so it would be no different regardless of route to the pdf. So you probably don't need to worry about that as far as differences is concerned but just to avoid truetype. –  cfr Jan 4 at 4:18

1 Answer 1

up vote 3 down vote accepted

Most 'standard' TeX fonts can be loaded by both pdflatex and latex so are suitable for either route.

However, pdfTeX, unlike TeX, can use truetype (.ttf) fonts directly. So you need to avoid using such fonts. There are not many packages which use these. Two are winfonts and gtamacfonts.

You can check whether your package uses such fonts fairly easily. Create a sample document with a variety of types of text and mathematics, making sure to include a little bit of whatever users might need. Compile with pdflatex and then examine the fonts it has used in either a PDF viewer or using pdffonts.

Here is the output of pdffonts for a document I produced recently:

name                                 type              encoding         emb sub uni object ID                                               
------------------------------------ ----------------- ---------------- --- --- --- ---------                                               
CCNYNY+LMRomanCaps10-Regular         Type 1            Custom           yes yes no     105  0                                               
FDLWIA+LMRoman8-Regular              Type 1            Custom           yes yes no     106  0                                               
CCNYNY+LMRomanCaps10-Regular         Type 1            Custom           yes yes no     107  0                                               
FDLWIA+LMRoman8-Regular              Type 1            Custom           yes yes no     108  0
GVOTOJ+LMRoman10-Bold                Type 1            Custom           yes yes no     109  0
PUROLC+Webdings                      TrueType          WinAnsi          yes yes no     110  0
DictSym                              Type 1            Builtin          yes no  no     111  0
ZWSJHO+AppleSymbols                  TrueType          WinAnsi          yes yes no     112  0
UIRPQW+wasy10                        Type 1            Builtin          yes yes no     113  0
CPKUDH+LMMathSymbols7-Regular        Type 1            Custom           yes yes no     114  0
ZISKEU+LMRoman7-Regular              Type 1            Custom           yes yes no     115  0
ZISKEU+LMRoman7-Regular              Type 1            Custom           yes yes no     116  0
ZNZYUX+MarVoSym                      Type 1            Builtin          yes yes no     117  0
XTZZTM+Archaic-Linear-B              Type 1            Builtin          yes yes no     118  0
ZISKEU+LMRoman7-Regular              Type 1            Custom           yes yes no     119  0
EEVCBJ+LMRoman10-Regular             Type 1            Custom           yes yes no     120  0
KUEEZQ+Dingbats                      Type 1            Builtin          yes yes no     121  0
INSJOE+Wingdings2                    TrueType          WinAnsi          yes yes no     122  0
QIJIVE+Wingdings                     TrueType          WinAnsi          yes yes no     123  0
NBXRIW+LMRoman5-Bold                 Type 1            Custom           yes yes no     124  0
CSLKTL+SkakNew-Figurine              Type 1            Builtin          yes yes no     125  0
KSIRXI+LMRoman5-Regular              Type 1            Custom           yes yes no     126  0
BTAZIL+Archaic-Poor-Mans-Hieroglyphs Type 1            Builtin          yes yes no     127  0
VERRCN+phaistos                      Type 1            Builtin          yes yes no     128  0
ZFJTFV+LMMathExtension10-Regular     Type 1            Custom           yes yes no     129  0
EEVCBJ+LMRoman10-Regular             Type 1            Custom           yes yes no     130  0
IFGYIN+HoeflerText-Ornaments         TrueType          WinAnsi          yes yes no     131  0
BHBUPA+LMRoman7-Bold                 Type 1            Custom           yes yes no     132  0
ZISKEU+LMRoman7-Regular              Type 1            Custom           yes yes no     133  0
QMGXWG+LMRoman8-Italic               Type 1            Custom           yes yes no     134  0
GBNVNG+LMRoman10-BoldItalic          Type 1            Custom           yes yes no     135  0
GBNVNG+LMRoman10-BoldItalic          Type 1            Custom           yes yes no     136  0
NCZUCO+LMRoman12-Bold                Type 1            Custom           yes yes no     137  0
GENWMA+LMRoman8-Bold                 Type 1            Custom           yes yes no     138  0
GENWMA+LMRoman8-Bold                 Type 1            Custom           yes yes no     139  0
GENWMA+LMRoman8-Bold                 Type 1            Custom           yes yes no     140  0
GVOTOJ+LMRoman10-Bold                Type 1            Custom           yes yes no     141  0
QGFRJE+MSAM7                         Type 1            Builtin          yes yes no     142  0

Looking down the list, all the lines which have TrueType in the second column would be problematic. All the lines which have Type 1 would be fine. [Note that I've deliberately chosen a document which uses a lot of truetype fonts for demonstration purposes. The vast majority of documents I produce are much more typical and don't include any truetype fonts at all.]

The other thing to watch out for are metafonts. These will work with both TeX and pdfTeX but render very poorly in many PDF viewers (notably acroread i.e. Adobe Reader). If you use the 'standard' TeX fonts, ensuring that cm-super is installed and \usepackage[T1]{fontenc} is included or using Latin Modern are good ways to avoid this pitfall.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.