|
From: Andre W. <wo...@us...> - 2004-07-23 12:09:41
|
Hi, On 23.07.04, Arnd Baecker wrote: > what follows is a problem description and > solution (which I found while setting up this mail ;-) > Maybe this is useful for the archive... I've investigated this a little and add a note for the archive as well. (I don't think the suggested patches to the fonts should be applied right away since another, less invasive workaround was suggested already.) > Some time ago I asked about changing the fonts to, > for example, Helvetica > or any other sans serif font, having > figures for presentations in mind. At some point you might do your whole presentation in PyX as I'm used to do it ... ;-) > While setting up this mail as a question to the list > I found in the FAQ of cm-super that the option -j0 > to dvips can be used > """ > as a workaround, to suppress > partial font downloading. The problem in dvips which occurs when the > same Type 1 font is re-encoded several times in one document (which > could occur if you are using the CM-Super fonts) has also been solved, > and the fixed version will appear in the future versions of TeX > distributions. > """ The hfbright fonts perform some advanced "already defined"-lookup. I'm not sure whether the quote you cited is really correct for that case (i.e. I'm not sure whether the problem will be addressed in the future). In our case it has nothing to do with re-encoding. The fonts are not reencoded at all. The basic problem seems to be, that while stripping the font (reduce it to just the glyphs needed), the fonts UniqueID is not changed (which might be wrong). We do it the same like other programs. Still this might be a bad idea from the very beginning (I have to read the specs about this issue at some later point -- in the far future I would like to do the whole font handling myself). Now, what happens is, that the pfb-font checks if a font with the same UniqueID is already available and takes this instead of redefining the font. While the included EPS-file will usually be well separated from the outside PostScript, the fonts defined outside are still visible inside (when including an EPS). A possibility to solve the problem is to disable the checks in the fonts. This can be done by modifying a single byte with a regular editor (see the encloded diffs -- it modifies the font type to check equality with so the check will always fail): andre@pb:~/python/pyx/tst$ diff -au hfbr10.pfb.org hfbr10.pfb --- hfbr10.pfb.org Fri Jul 23 13:30:12 2004 +++ hfbr10.pfb Fri Jul 23 13:38:41 2004 @@ -7,7 +7,7 @@ % Generated by PfaEdit 1.0 (http://pfaedit.sf.net/) %%EndComments FontDirectory/HFBR10 known{/HFBR10 findfont dup/UniqueID known{dup -/UniqueID get 4214378 eq exch/FontType get 1 eq and}{pop false}ifelse +/UniqueID get 4214378 eq exch/FontType get 2 eq and}{pop false}ifelse {save true}{false}ifelse}{false}ifelse 11 dict begin /FontType 1 def andre@pb:~/python/pyx/tst$ diff -au hfbrmi10.pfb.org hfbrmi10.pfb --- hfbrmi10.pfb.org Fri Jul 23 13:30:17 2004 +++ hfbrmi10.pfb Fri Jul 23 13:38:41 2004 @@ -7,7 +7,7 @@ % Generated by PfaEdit 1.0 (http://pfaedit.sf.net/) %%EndComments FontDirectory/HFBRMI10 known{/HFBRMI10 findfont dup/UniqueID known{dup -/UniqueID get 4214389 eq exch/FontType get 1 eq and}{pop false}ifelse +/UniqueID get 4214389 eq exch/FontType get 2 eq and}{pop false}ifelse {save true}{false}ifelse}{false}ifelse 11 dict begin /FontType 1 def André -- by _ _ _ Dr. André Wobst / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ |