texfont produces faked ligatures with ec encoding
Hi, with the ec encoding, texfont produces faked ligatures, although the font has real fi and fl ligatures. With the texnansi encoding and the same commands, the ligatures are ok. (I checked this by compiling a simple sample file, just changing \setupencoding[default=ec] to \setupencoding[default=texnansi].) The font I'm trying to install is Bitstream Elegant Garamond (bgj) which I have got from a CorelDraw CD. I used the following commands to install the font (note that the fontroot is set because I create a Debian package): mkdir -p debian/font-elegantgaramond/usr/share/texmf texfont --fontroot=debian/font-elegantgaramond/usr/share/texmf --vendor=bitstrea --collection=eleggar --encoding=texnansi --makepath --install TeXFont 2.2.1 - ConTeXt / PRAGMA ADE 2000-2004 encoding vector : texnansi vendor name : bitstrea source path : . font collection : eleggar texmf font root : debian/font-elegantgaramond/usr/share/texmf pdftex map file : texnansi-bitstrea-eleggar.map source path : . processing files : all on afm path locating afm files : using pattern * copying files : afm copying : bgjb.afm copying : bgjr.afm copying : bgjri.afm copying files : pfb copying : bgjb.pfb copying : bgjr.pfb copying : bgjri.pfb no map file at : debian/font-elegantgaramond/usr/share/texmf/fonts/map/pdftex/context/texnansi-bitstrea-eleggar.map font identifier : ElegantGaramondBT-Bold -> text -> tfm + vf generating raw tfm/vpl : texnansi-raw-bgjb (from bgjb) generating new vf : texnansi-bgjb (from texnansi-raw-bgjb) font identifier : ElegantGaramondBT-Roman -> text -> tfm + vf generating raw tfm/vpl : texnansi-raw-bgjr (from bgjr) generating new vf : texnansi-bgjr (from texnansi-raw-bgjr) font identifier : ElegantGaramondBT-Italic -> text -> tfm + vf generating raw tfm/vpl : texnansi-raw-bgjri (from bgjri) generating new vf : texnansi-bgjri (from texnansi-raw-bgjri) updating map file : texnansi-bitstrea-eleggar.map generating : ls-r databases texfont --fontroot=debian/font-elegantgaramond/usr/share/texmf --vendor=bitstrea --collection=eleggar --encoding=ec --makepath --install TeXFont 2.2.1 - ConTeXt / PRAGMA ADE 2000-2004 encoding vector : ec vendor name : bitstrea source path : . font collection : eleggar texmf font root : debian/font-elegantgaramond/usr/share/texmf pdftex map file : ec-bitstrea-eleggar.map source path : . processing files : all on afm path locating afm files : using pattern * copying files : afm copying : bgjb.afm copying : bgjr.afm copying : bgjri.afm copying files : pfb copying : bgjb.pfb copying : bgjr.pfb copying : bgjri.pfb no map file at : debian/font-elegantgaramond/usr/share/texmf/fonts/map/pdftex/context/ec-bitstrea-eleggar.map font identifier : ElegantGaramondBT-Bold -> text -> tfm + vf generating raw tfm/vpl : ec-raw-bgjb (from bgjb) generating new vf : ec-bgjb (from ec-raw-bgjb) font identifier : ElegantGaramondBT-Roman -> text -> tfm + vf generating raw tfm/vpl : ec-raw-bgjr (from bgjr) generating new vf : ec-bgjr (from ec-raw-bgjr) font identifier : ElegantGaramondBT-Italic -> text -> tfm + vf generating raw tfm/vpl : ec-raw-bgjri (from bgjri) generating new vf : ec-bgjri (from ec-raw-bgjri) updating map file : ec-bitstrea-eleggar.map generating : ls-r databases rm -vf debian/font-elegantgaramond/usr/share/texmf/ls-R ,,debian/font-elegantgaramond/usr/share/texmf/ls-R" entfernt mkdir -p debian/font-elegantgaramond/usr/share/texmf/tex/context/typescript cp -v type-eleggar.tex debian/font-elegantgaramond/usr/share/texmf/tex/context/typescript/ ,,type-eleggar.tex" -> ,,debian/font-elegantgaramond/usr/share/texmf/tex/context/typescript/type-eleggar.tex" mkdir -p debian/font-elegantgaramond/etc/texmf/updmap.d cp -v debian/10bgj.cfg debian/font-elegantgaramond/etc/texmf/updmap.d ,,debian/10bgj.cfg" -> ,,debian/font-elegantgaramond/etc/texmf/updmap.d/10bgj.cfg" mkdir -p debian/font-elegantgaramond/usr/share/texmf/fonts/map/dvips/bgj cp -v *.map debian/font-elegantgaramond/usr/share/texmf/fonts/map/dvips/bgj ,,bgj.map" -> ,,debian/font-elegantgaramond/usr/share/texmf/fonts/map/dvips/bgj/bgj.map" mkdir -p debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj cp -v *.fd debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj ,,t1bgj.fd" -> ,,debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj/t1bgj.fd" mkdir -p debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj cp -v eleggar.sty debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj ,,eleggar.sty" -> ,,debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj/eleggar.sty" The typescript I'm using is the following: % Typescript for serif family Bitstream ElegantGaramond \usetypescriptfile[type-buy] % load map file \starttypescript[map][eleggar][\defaultencoding] \loadmapfile[\defaultencoding-bitstrea-eleggar.map] \stoptypescript % mapping from PostScript name to TFM file name \starttypescript[serif][eleggar][\defaultencoding] \definefontsynonym[ElegantGaramondBT-Bold][\defaultencoding-bgjb][encoding=\defaultencoding] \definefontsynonym[ElegantGaramondBT-Roman][\defaultencoding-bgjr][encoding=\defaultencoding] \definefontsynonym[ElegantGaramondBT-Italic][\defaultencoding-bgjri][encoding=\defaultencoding] \stoptypescript % mapping from generic family name to PostScript name \starttypescript[serif][eleggar][name] \usetypescript[serif][fallback] \definefontsynonym[Serif] [ElegantGaramondBT-Roman] \definefontsynonym[SerifItalic][ElegantGaramondBT-Italic] \definefontsynonym[SerifBold] [ElegantGaramondBT-Bold] \stoptypescript % family definition \starttypescript [eleggar] \definetypeface [eleggar] [rm] [serif] [eleggar] [default] [encoding=\defaultencoding] \stoptypescript What do I do wrong? Thank you for your help Andreas
On Sun, 6 Aug 2006, Taco Hoekwater wrote:
As far as I know, that should have worked. Did you run
texexec ec-bitstrea-eleggar
? The first page should show a font table, and that may help debugging (perhaps your local ec.enc is wrong)
Yes, I did. In the table you can find the real fi and fl ligatures at the places 28 and 29 (1c and 1d), respectively. Under the table, under the names ff, fi, fl, ffi and ffl, there are faked ligatures (particulary, fi and fl are faked). For comparison: In texnansi-bitstrea-eleggar.pdf, the table contains the real fl and fi ligatures at the places 8 (08) and 12 (0c), respectively. Below the table, in texnansi-bitstrea-eleggar.pdf there are the real fi and fl ligatures under the names fi and fl, and ffi, ffl are faked of f+fi, f+fl, respectively; ff is of course faked, since the font does not contain an ff ligature. I'm using a Debian 3.1 (sarge) system with tetex 3.0 from backports.org. Andreas
Sorry, I haven't followed this thread closely (so I have no idea if this has already been solved), but I had a similar symptom a while ago. It turned out that it was something with the default EC.enc that ships with tetex. Can you try to do the conversion again, this time using lm-ec.enc instead of EC.enc? I can send a longer explanation if that's of interest, but I found that it solved the problem in my case. Thomas On Sun, 2006-08-06 at 10:07 +0200, Andreas Schneider wrote:
Hi,
with the ec encoding, texfont produces faked ligatures, although the font has real fi and fl ligatures. With the texnansi encoding and the same commands, the ligatures are ok. (I checked this by compiling a simple sample file, just changing \setupencoding[default=ec] to \setupencoding[default=texnansi].) The font I'm trying to install is Bitstream Elegant Garamond (bgj) which I have got from a CorelDraw CD. I used the following commands to install the font (note that the fontroot is set because I create a Debian package):
mkdir -p debian/font-elegantgaramond/usr/share/texmf texfont --fontroot=debian/font-elegantgaramond/usr/share/texmf --vendor=bitstrea --collection=eleggar --encoding=texnansi --makepath --install
TeXFont 2.2.1 - ConTeXt / PRAGMA ADE 2000-2004
encoding vector : texnansi vendor name : bitstrea source path : . font collection : eleggar texmf font root : debian/font-elegantgaramond/usr/share/texmf pdftex map file : texnansi-bitstrea-eleggar.map source path : . processing files : all on afm path locating afm files : using pattern * copying files : afm copying : bgjb.afm copying : bgjr.afm copying : bgjri.afm copying files : pfb copying : bgjb.pfb copying : bgjr.pfb copying : bgjri.pfb no map file at : debian/font-elegantgaramond/usr/share/texmf/fonts/map/pdftex/context/texnansi-bitstrea-eleggar.map
font identifier : ElegantGaramondBT-Bold -> text -> tfm + vf generating raw tfm/vpl : texnansi-raw-bgjb (from bgjb) generating new vf : texnansi-bgjb (from texnansi-raw-bgjb)
font identifier : ElegantGaramondBT-Roman -> text -> tfm + vf generating raw tfm/vpl : texnansi-raw-bgjr (from bgjr) generating new vf : texnansi-bgjr (from texnansi-raw-bgjr)
font identifier : ElegantGaramondBT-Italic -> text -> tfm + vf generating raw tfm/vpl : texnansi-raw-bgjri (from bgjri) generating new vf : texnansi-bgjri (from texnansi-raw-bgjri) updating map file : texnansi-bitstrea-eleggar.map
generating : ls-r databases
texfont --fontroot=debian/font-elegantgaramond/usr/share/texmf --vendor=bitstrea --collection=eleggar --encoding=ec --makepath --install
TeXFont 2.2.1 - ConTeXt / PRAGMA ADE 2000-2004
encoding vector : ec vendor name : bitstrea source path : . font collection : eleggar texmf font root : debian/font-elegantgaramond/usr/share/texmf pdftex map file : ec-bitstrea-eleggar.map source path : . processing files : all on afm path locating afm files : using pattern * copying files : afm copying : bgjb.afm copying : bgjr.afm copying : bgjri.afm copying files : pfb copying : bgjb.pfb copying : bgjr.pfb copying : bgjri.pfb no map file at : debian/font-elegantgaramond/usr/share/texmf/fonts/map/pdftex/context/ec-bitstrea-eleggar.map
font identifier : ElegantGaramondBT-Bold -> text -> tfm + vf generating raw tfm/vpl : ec-raw-bgjb (from bgjb) generating new vf : ec-bgjb (from ec-raw-bgjb)
font identifier : ElegantGaramondBT-Roman -> text -> tfm + vf generating raw tfm/vpl : ec-raw-bgjr (from bgjr) generating new vf : ec-bgjr (from ec-raw-bgjr)
font identifier : ElegantGaramondBT-Italic -> text -> tfm + vf generating raw tfm/vpl : ec-raw-bgjri (from bgjri) generating new vf : ec-bgjri (from ec-raw-bgjri) updating map file : ec-bitstrea-eleggar.map
generating : ls-r databases
rm -vf debian/font-elegantgaramond/usr/share/texmf/ls-R ,,debian/font-elegantgaramond/usr/share/texmf/ls-R" entfernt mkdir -p debian/font-elegantgaramond/usr/share/texmf/tex/context/typescript cp -v type-eleggar.tex debian/font-elegantgaramond/usr/share/texmf/tex/context/typescript/ ,,type-eleggar.tex" -> ,,debian/font-elegantgaramond/usr/share/texmf/tex/context/typescript/type-eleggar.tex" mkdir -p debian/font-elegantgaramond/etc/texmf/updmap.d cp -v debian/10bgj.cfg debian/font-elegantgaramond/etc/texmf/updmap.d ,,debian/10bgj.cfg" -> ,,debian/font-elegantgaramond/etc/texmf/updmap.d/10bgj.cfg" mkdir -p debian/font-elegantgaramond/usr/share/texmf/fonts/map/dvips/bgj cp -v *.map debian/font-elegantgaramond/usr/share/texmf/fonts/map/dvips/bgj ,,bgj.map" -> ,,debian/font-elegantgaramond/usr/share/texmf/fonts/map/dvips/bgj/bgj.map" mkdir -p debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj cp -v *.fd debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj ,,t1bgj.fd" -> ,,debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj/t1bgj.fd" mkdir -p debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj cp -v eleggar.sty debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj ,,eleggar.sty" -> ,,debian/font-elegantgaramond/usr/share/texmf/tex/latex/bgj/eleggar.sty"
The typescript I'm using is the following:
% Typescript for serif family Bitstream ElegantGaramond
\usetypescriptfile[type-buy]
% load map file \starttypescript[map][eleggar][\defaultencoding] \loadmapfile[\defaultencoding-bitstrea-eleggar.map] \stoptypescript
% mapping from PostScript name to TFM file name \starttypescript[serif][eleggar][\defaultencoding] \definefontsynonym[ElegantGaramondBT-Bold][\defaultencoding-bgjb][encoding=\defaultencoding] \definefontsynonym[ElegantGaramondBT-Roman][\defaultencoding-bgjr][encoding=\defaultencoding] \definefontsynonym[ElegantGaramondBT-Italic][\defaultencoding-bgjri][encoding=\defaultencoding] \stoptypescript
% mapping from generic family name to PostScript name \starttypescript[serif][eleggar][name] \usetypescript[serif][fallback] \definefontsynonym[Serif] [ElegantGaramondBT-Roman] \definefontsynonym[SerifItalic][ElegantGaramondBT-Italic] \definefontsynonym[SerifBold] [ElegantGaramondBT-Bold] \stoptypescript
% family definition \starttypescript [eleggar] \definetypeface [eleggar] [rm] [serif] [eleggar] [default] [encoding=\defaultencoding] \stoptypescript
What do I do wrong?
Thank you for your help
Andreas _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
On Sun, 6 Aug 2006, Thomas A. Schmitz wrote:
Sorry, I haven't followed this thread closely (so I have no idea if this has already been solved), but I had a similar symptom a while ago. It turned out that it was something with the default EC.enc that ships with tetex. Can you try to do the conversion again, this time using lm-ec.enc instead of EC.enc? I can send a longer explanation if that's of interest, but I found that it solved the problem in my case.
Thanks for that hint. There is no file lm-ec.enc in my installation, but ec-var-lm.enc. If I add a --variant=var-lm to the parameters for texfont (or alternatively create a symbolic link ec.ec -> ec-var-lm.enc in my private texmf tree), then the ligatures work correctly! Unfortunately, umlauts don't work anymore, both typed directly (ä, ö, ü. ß, ...) and with the TeX commands ("a, "o, "u, "s, ...). Did you have problems with umlauts as well using lm-ec.enc? Maybe I should try cork.enc (--encoding=cork) instead? The main reason I want to install the font with ec encoding is that I also want to use it under LaTeX with the T1 encoding. Andreas
On Aug 6, 2006, at 10:28 PM, Andreas Schneider wrote:
Thanks for that hint. There is no file lm-ec.enc in my installation, but ec-var-lm.enc. If I add a --variant=var-lm to the parameters for texfont (or alternatively create a symbolic link ec.ec -> ec-var-lm.enc in my private texmf tree), then the ligatures work correctly! Unfortunately, umlauts don't work anymore, both typed directly (ä, ö, ü. ß, ...) and with the TeX commands ("a, "o, "u, "s, ...). Did you have problems with umlauts as well using lm-ec.enc? Maybe I should try cork.enc (-- encoding=cork) instead? The main reason I want to install the font with ec encoding is that I also want to use it under LaTeX with the T1 encoding.
No, I never had problems with Umlauts. What you can also try is this: if you open EC.enc, you'll find a couple of LIGKERN instructions at the beginning of the file. These seem to confuse some utilities so they don't include the default ligatures anymore. So what you can do: just delete lines 1-27 of EC.enc, so the first line is /ECEncoding [ % now 256 chars follow Then save this new file in the directory where you run texfont so it will be found first. You can discard it afterwards. HTH Thomas
On Sun, 6 Aug 2006, Thomas A. Schmitz wrote:
No, I never had problems with Umlauts.
Now I've found lm-ec.enc in another texmf tree. When I copy lm-ec.enc to the directory where I run texfont, it works fine.
What you can also try is this: if you open EC.enc, you'll find a couple of LIGKERN instructions at the beginning of the file. These seem to confuse some utilities so they don't include the default ligatures anymore. So what you can do: just delete lines 1-27 of EC.enc, so the first line is /ECEncoding [ % now 256 chars follow
Then save this new file in the directory where you run texfont so it will be found first. You can discard it afterwards.
With this trick, it works as well. Thanks for your help Andreas
On Mon, 7 Aug 2006, Andreas Schneider wrote:
Now I've found lm-ec.enc in another texmf tree. When I copy lm-ec.enc to the directory where I run texfont, it works fine.
Unfortunately it only works with pdftex, i.e. texexec --pdf and pdflatex. With texexec or latex it does not work. For example, if I run texexec over the simple sample file \setuppapersize[A4][A4] \mainlanguage[de] \language[de] \enableregime[windows] \setupencoding[default=ec] %\loadmapfile[ec-bitstrea-eleggar.map] \usetypescriptfile[type-eleggar] \usetypescript[eleggar] \setupbodyfont[eleggar,11pt] \setupbodyfontenvironment[default][em=italic] \starttext Dies ist ein Text, der in ElegantGaramond erscheinen soll. Er enthält auch {\it kursive} und {\bf fette} Teile. {\em Hervorgehoben} Einige Zeichen: "`, "', --, "<, "> Ligaturen: fi, fl, ff, ffi, ffl Aufgelöste Ligaturen: f"|i, f"|l Umlaute: ä, ö, ü, ß, Ä, Ö, Ü; "a, "o, "u, "s \stoptext it doesn't complain, but xdvi gives error messages like xdvi.bin: Warning: Character 228 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 18 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 16 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 21 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 19 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 20 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 28 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 29 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 246 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 252 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 255 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 214 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 220 is mapped to .notdef in font ec-raw-bgjr (page 1), replacing by whitespace. and ligatures and umlauts are not displayed. With the texnansi encoding, I get similar results: xdvi.bin: Warning: Character 228 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 132 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 147 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 150 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 12 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 8 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 246 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 252 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 223 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 214 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 220 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. How can I solve this? (Since I've got a postscript printer, I would like to have tex -> dvi -> ps working.) Andreas
On Mon, 7 Aug 2006, Taco Hoekwater wrote:
Andreas Schneider wrote:
but xdvi gives error messages like [...]
My guess is that you have to copy the final
file you used to the folder where dvips (and xdvi, which looks in the same place normally) looks for encoding files.
I created a symlink in my private texmf tree (ec.enc -> lm-ec.enc) and ran
texhash, and after that it was all the same. Anyway, this would not
explain why I have the same symptom with the texnansi encoding, too.
Maybe it helps debugging that dvips gives different error messages:
This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com)
' TeX output 2006.08.07:1402' -> schrift.ps
Andreas Schneider wrote:
\setuppapersize[A4][A4] \mainlanguage[de] \language[de] \enableregime[windows]
\setupencoding[default=ec] %\loadmapfile[ec-bitstrea-eleggar.map] \usetypescriptfile[type-eleggar] \usetypescript[eleggar] \setupbodyfont[eleggar,11pt]
\setupbodyfontenvironment[default][em=italic]
\starttext since you're typesetting german ... why not using the texnansi encoding instead of the flawed ec encoding?
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, 7 Aug 2006, Hans Hagen wrote:
since you're typesetting german ... why not using the texnansi encoding instead of the flawed ec encoding?
The problem is that it doesn't work with the texnansi encoding either. See my last mails. Andreas
Andreas Schneider wrote:
On Mon, 7 Aug 2006, Hans Hagen wrote:
since you're typesetting german ... why not using the texnansi encoding instead of the flawed ec encoding?
The problem is that it doesn't work with the texnansi encoding either. See my last mails.
if the problem is in a font not having glyphs, you can consider making a special encoding vector + enco-* file; not that complex since one can start with an existing one Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, 8 Aug 2006, Hans Hagen wrote:
if the problem is in a font not having glyphs, you can consider making a special encoding vector + enco-* file; not that complex since one can start with an existing one
The problem is that it does work with pdftex (tex -> pdf via texexec --pdf), but it does NOT work with tex -> dvi -> ps via texexec, dvips (some glyphs, such as ligatures and umlauts, don't work in the latter case). It should be possible to get it working, as fontinst is able to do it, so I don't know why I should need an extra encoding. Andreas
Andreas Schneider wrote:
On Tue, 8 Aug 2006, Hans Hagen wrote:
if the problem is in a font not having glyphs, you can consider making a special encoding vector + enco-* file; not that complex since one can start with an existing one
The problem is that it does work with pdftex (tex -> pdf via texexec --pdf), but it does NOT work with tex -> dvi -> ps via texexec, dvips (some glyphs, such as ligatures and umlauts, don't work in the latter case). It should be possible to get it working, as fontinst is able to do it, so I don't know why I should need an extra encoding.
Somehow you yourself (and not texfont!) have created a font map file called bgj.map for dvips, and that file is wrong. Taco
On Tue, 8 Aug 2006, Taco Hoekwater wrote:
Somehow you yourself (and not texfont!) have created a font map file called bgj.map for dvips, and that file is wrong.
Hmm, I have created it just for LaTeX. Since it contains only entries for ec-bgj* (without 'raw') it should not interfere with the other mapfiles (created by texfont) which are for ec-raw-bgj* and texnansi-raw-bgj* (with 'raw'), or am I mistaken? Anyway xdvi complains about texnansi-raw-bgj* (see example below which I had already included in one of my previous mails). Andreas ----------------------------------------------------------------------------- \setuppapersize[A4][A4] \mainlanguage[de] \language[de] \enableregime[windows] \setupencoding[default=texnansi] \usetypescriptfile[type-eleggar] \usetypescript[eleggar] \setupbodyfont[eleggar,11pt] \setupbodyfontenvironment[default][em=italic] \starttext Einige Zeichen: "`, "', --, "<, "> Ligaturen: fi, fl, ff, ffi, ffl Aufgelöste Ligaturen: f"|i, f"|l Umlaute: ä, ö, ü, ß, Ä, Ö, Ü; "a, "o, "u, "s \stoptext ----------------------------------------------------------------------------- xdvi.bin: Warning: Character 228 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 132 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 147 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 150 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 12 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 8 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 246 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 252 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 223 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 214 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace. xdvi.bin: Warning: Character 220 is mapped to .notdef in font texnansi-raw-bgjr (page 1), replacing by whitespace.
Hi Andreas, Andreas Schneider wrote:
On Tue, 8 Aug 2006, Taco Hoekwater wrote:
Somehow you yourself (and not texfont!) have created a font map file called bgj.map for dvips, and that file is wrong.
Hmm, I have created it just for LaTeX. Since it contains only entries for ec-bgj* (without 'raw') it should not interfere with the other mapfiles (created by texfont) which are for ec-raw-bgj* and texnansi-raw-bgj* (with 'raw'), or am I mistaken? Anyway xdvi complains about texnansi-raw-bgj* (see example below which I had already included in one of my previous mails).
There are two problems that I can see. There is only one that you
can fix, and there is another problem that is a base texfont
issue.
The fixable problem first:
If there is a virtual font, then dvi processors will recursively
break it down into its constituents (those are the *-raw-* font
metrics). Eventually, when there are no longer virtual fonts to
resolve, it looks for the 'base' fonts in its map file.
This process works in a similar fashion for all programs like
pdftex, dvipdfmx, dvips, and xdvi, but texfont only creates a
map file for pdftex. Unf, the pdftex map file cannot be used by
dvips, so for dvips you have to create your own (like you did).
When you create a map file for dvips for a texfont-installed
font family, it needs to have those *-raw-* entries that will
map the fonts to the real postscript font files on your harddisk,
and those were missing from your bgj.map.
Using the attached map file fragment, I can create a postscript file
that has fi ligatures of your example in texnansi encoding using
dvips. I have no xdvi here to try it, but that should work as well.
The second problem:
texfont simply does not 'do' EC correctly (at least not on my machine).
There are simply no fi ligatures, not in pdftex either. I will
investigate this further.
Taco
texnansi-raw-bgjb ElegantGaramondBT-Bold "TeXnANSIEncoding ReEncodeFont"
Taco Hoekwater wrote:
The second problem:
texfont simply does not 'do' EC correctly (at least not on my machine). There are simply no fi ligatures, not in pdftex either. I will investigate this further.
how does -afmpl perform? i always suspected afm2tfm not to take non existing ligs into account Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
Taco Hoekwater wrote:
The second problem:
texfont simply does not 'do' EC correctly (at least not on my machine). There are simply no fi ligatures, not in pdftex either. I will investigate this further.
how does -afmpl perform? i always suspected afm2tfm not to take non existing ligs into account
Just as bad (here, at least). I'll get back to you about this tomorrow, it is too late for me to do serious work. Taco
On Aug 8, 2006, at 11:57 PM, Taco Hoekwater wrote:
how does -afmpl perform? i always suspected afm2tfm not to take non existing ligs into account
Just as bad (here, at least). I'll get back to you about this tomorrow, it is too late for me to do serious work.
I've experimented with afm2pl, and as I wrote in an earlier mail: the beginning of EC.enc with its additional LIGKERN instructions confuses it so it will not include default ligatures. If you delete this, it will work. If you use lm-ec.enc (which has a number of mistakes fixed anyway), it works. BUT afm2pl needs a file default.lig which is not present in all TeX distributions. I asked Siep a couple of months ago, and he replied there was a switch to ignore default.lig, but in that case, the default ligs would have to be supplied by texfont itself (which should be doable). IMHO, texfont should switch to afm2pl by default; it's much better at preserving kerning information (Adam, any thoughts on this?), and it makes virtual fonts unnecessary. I now use it regularly for all my font needs and am very satisfied with it. Best Thomas
Thomas A. Schmitz wrote:
On Aug 8, 2006, at 11:57 PM, Taco Hoekwater wrote:
how does -afmpl perform? i always suspected afm2tfm not to take non existing ligs into account
Just as bad (here, at least). I'll get back to you about this tomorrow, it is too late for me to do serious work.
I've experimented with afm2pl, and as I wrote in an earlier mail: the beginning of EC.enc with its additional LIGKERN instructions confuses
well, we can consider to let texfont use a ec-fixed encoding for afm2tfm and the regular ec encoding for the rest --afmencoding=ec-fixed or so
it so it will not include default ligatures. If you delete this, it will work. If you use lm-ec.enc (which has a number of mistakes fixed anyway), it works. BUT afm2pl needs a file default.lig which is not present in all TeX distributions. I asked Siep a couple of months ago, and he replied there was a switch to ignore default.lig, but in
she
that case, the default ligs would have to be supplied by texfont itself (which should be doable). IMHO, texfont should switch to afm2pl by default; it's much better at preserving kerning information (Adam, any thoughts on this?), and it makes virtual fonts unnecessary. I now use it regularly for all my font needs and am very satisfied with it.
for a while afm2pl was the default, but then it suddenly defaulted to latex default (em) spacing which ruined a project here because that went unnoticed and resulted in incompatible output, so it made me more careful; i'm not sure to what extend afm2pl uses the same default for the fontdimen related things as afm2tfm Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
well, we can consider to let texfont use a ec-fixed encoding for afm2tfm and the regular ec encoding for the rest
--afmencoding=ec-fixed
or so
or fix afm2pl.
for a while afm2pl was the default, but then it suddenly defaulted to latex default (em) spacing which ruined a project here because that went unnoticed and resulted in incompatible output, so it made me more careful; i'm not sure to what extend afm2pl uses the same default for the fontdimen related things as afm2tfm
from the afm2pl documentation: -f font_dimensions afm2tfm compatible settings would be something like -f 300,100,0,1000, But as of 0.702 -f afm2tfm is also accepted Taco
Thomas A. Schmitz wrote:
On Aug 8, 2006, at 11:57 PM, Taco Hoekwater wrote:
how does -afmpl perform? i always suspected afm2tfm not to take non existing ligs into account
Just as bad (here, at least). I'll get back to you about this tomorrow, it is too late for me to do serious work.
I've experimented with afm2pl, and as I wrote in an earlier mail: the beginning of EC.enc with its additional LIGKERN instructions confuses it so it will not include default ligatures.
As it turns out, this is the same for afm2tfm. And to make matters even more confusing, I had the following problem: At one point, I had copied EC.enc to the current directory and fixed it. However, it still didn't work, because: [taco@glenlivet new]$ ls *.enc EC.enc [taco@glenlivet new]$ kpsewhich --progname=dvips ec.enc /opt/tex/teTeX/texmf/fonts/enc/dvips/base/EC.enc because of a line in /opt/tex/teTeX/texmf/aliases :-/ Either way, it seems that this LIGKERN interpretation that overrules the afm file is actually considered a feature. The sane way out seems to be to ship our own encoding files in fonts/enc/texfont or so. Taco
Taco Hoekwater wrote:
because of a line in /opt/tex/teTeX/texmf/aliases :-/
ah, the dreadful aliases file ... in tex live they're gone ; let's hope that this aliases fiel does not contain anything related to context tex files (patterns for instance)
Either way, it seems that this LIGKERN interpretation that overrules the afm file is actually considered a feature. The sane way out seems to be to ship our own encoding files in
fonts/enc/texfont
or so.
hm, we can let texfont search for a texfont-ec file first (the map file can still refer to the normal one i suppose) (an alternative is to let texfont copy the ec.enc file to the local path, remove the messy lines, and remove that one afterwards) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Aug 9, 2006, at 3:58 PM, Taco Hoekwater wrote:
I've experimented with afm2pl, and as I wrote in an earlier mail: the beginning of EC.enc with its additional LIGKERN instructions confuses it so it will not include default ligatures.
As it turns out, this is the same for afm2tfm. And to make matters even more confusing, I had the following problem: At one point, I had copied EC.enc to the current directory and fixed it. However, it still didn't work, because:
[taco@glenlivet new]$ ls *.enc EC.enc
[taco@glenlivet new]$ kpsewhich --progname=dvips ec.enc /opt/tex/teTeX/texmf/fonts/enc/dvips/base/EC.enc
because of a line in /opt/tex/teTeX/texmf/aliases :-/
Either way, it seems that this LIGKERN interpretation that overrules the afm file is actually considered a feature. The sane way out seems to be to ship our own encoding files in
fonts/enc/texfont
or so.
Taco
Yes, I have a dim recollection that afm2tfm has the same problem. Isn't lm-ec.enc the better choice anyway? Couldn't we make texfont default to lm-ec.enc when it is called with --en=EC? And for the LIGKERN: yes, I asked about them on the tex-fonts list a while ago, and nobody considered them a problem. IMHO, they're totally useless or even worse, but I received the same ol' answers: can't change that, it's legacy etc. I think Mojca knows something about this as well. So my suggestion would be: make ec a synonym for lm-ec in texfont (but then, because of one or to glyphnames, lm- ec.enc has to be in the mapfile as well). Thomas
Thomas A. Schmitz wrote:
And for the LIGKERN: yes, I asked about them on the tex-fonts list a while ago, and nobody considered them a problem. IMHO, they're totally useless or even worse, but I received the same ol' answers: can't change that, it's legacy etc. I think Mojca knows something
indeed, not even broken things are fixed; i wonner what those ol' users are doing with their patterns since i expect an update in patterns to have more consequences than a fix in fonts
about this as well. So my suggestion would be: make ec a synonym for lm-ec in texfont (but then, because of one or to glyphnames, lm- ec.enc has to be in the mapfile as well).
i see, interesting; before we do that, can you check if we can/need to do the same with texnansi, qx, etc ? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Aug 9, 2006, at 4:52 PM, Hans Hagen wrote:
i see, interesting; before we do that, can you check if we can/need to do the same with texnansi, qx, etc ?
Hans
texnansi is OK, in my experience, and qx as well. t5 also has some LIGKERN instructions at the beginning, but doesn't have f-ligatures in its character set, AFAICS, so this should work as well. I can run some texts this weekend (if you want) and see what comes up. Thomas
Taco Hoekwater wrote:
When you create a map file for dvips for a texfont-installed font family, it needs to have those *-raw-* entries that will map the fonts to the real postscript font files on your harddisk, and those were missing from your bgj.map.
the reason why i create the map files the way we do is that i want to prevent pdftex to be too clever in sharing font resources (thre are versions out there that assume sequivalent "Names" to always equivalent which is not always true (think of slanted or extended fonts) (i've been bitten too often by that so i play safe) it is no problem to add that entry optionally (grep for cleanfont in texexec.pl; to tired to see the light now) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, 8 Aug 2006, Taco Hoekwater wrote:
This process works in a similar fashion for all programs like pdftex, dvipdfmx, dvips, and xdvi, but texfont only creates a map file for pdftex. Unf, the pdftex map file cannot be used by dvips, so for dvips you have to create your own (like you did).
When you create a map file for dvips for a texfont-installed font family, it needs to have those *-raw-* entries that will map the fonts to the real postscript font files on your harddisk, and those were missing from your bgj.map.
Using the attached map file fragment, I can create a postscript file that has fi ligatures of your example in texnansi encoding using dvips. I have no xdvi here to try it, but that should work as well.
Thanks a lot, with that it works now (with the texnansi encoding)! These
facts should be mentioned in the docs.
I also have created another map file ec-bgj.map with the entries
ec-raw-bgjb ElegantGaramondBT-Bold "ECEncoding ReEncodeFont"
The second problem:
texfont simply does not 'do' EC correctly (at least not on my machine). There are simply no fi ligatures, not in pdftex either. I will investigate this further.
On my machine the font works without problems with pdftex (texexec --pdf) and the ec encoding, ligatures and umlauts are okay. Andreas
Andreas Schneider wrote:
Thanks a lot, with that it works now (with the texnansi encoding)! These facts should be mentioned in the docs.
The next version of texfont will create a dvips and dvipdfmx map file as well as a pdftex one, making life a bit easier.
But gv gives an error when I try to view the ps file:
Error: /undefined in ECEncoding
This is error is because lm-ec.enc does not name its encoding "ECEncoding " but "enclmec ", so you have to change the ReEncode strings in the map file. Best, Taco
Hi! On Fri, 11 Aug 2006, Taco Hoekwater wrote:
Andreas Schneider wrote:
Thanks a lot, with that it works now (with the texnansi encoding)! These facts should be mentioned in the docs.
The next version of texfont will create a dvips and dvipdfmx map file as well as a pdftex one, making life a bit easier.
Good!
But gv gives an error when I try to view the ps file:
Error: /undefined in ECEncoding
This is error is because lm-ec.enc does not name its encoding "ECEncoding " but "enclmec", so you have to change the ReEncode strings in the map file.
Ah, thanks again, with that it now works perfectly. Andreas
On Sun, 6 Aug 2006, Thomas A. Schmitz wrote:
Sorry, I haven't followed this thread closely (so I have no idea if this has already been solved), but I had a similar symptom a while ago. It turned out that it was something with the default EC.enc that ships with tetex. Can you try to do the conversion again, this time using lm-ec.enc instead of EC.enc? I can send a longer explanation if that's of interest, but I found that it solved the problem in my case.
Thanks for that hint. There is no file lm-ec.enc in my installation, but ec-var-lm.enc. If I add a --variant=var-lm to the parameters for texfont (or alternatively create a symbolic link ec.ec -> ec-var-lm.enc in my private texmf tree), then the ligatures work correctly! Unfortunately, umlauts don't work anymore, both typed directly (�, �, �. �, ...) and with the TeX commands ("a, "o, "u, "s, ...). Did you have problems with umlauts as well using lm-ec.enc? Maybe I should try cork.enc (--encoding=cork) instead? The main reason I want to install the font with ec encoding is that I also want to use it under LaTeX with the T1 encoding.
Andreas Schneider wrote: that vector was meant for the version of latin modern that had special umlaut characters (these were dropped in later versions) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 8/6/06, Andreas Schneider wrote:
On Sun, 6 Aug 2006, Thomas A. Schmitz wrote:
Sorry, I haven't followed this thread closely (so I have no idea if this has already been solved), but I had a similar symptom a while ago. It turned out that it was something with the default EC.enc that ships with tetex. Can you try to do the conversion again, this time using lm-ec.enc instead of EC.enc? I can send a longer explanation if that's of interest, but I found that it solved the problem in my case.
Thanks for that hint. There is no file lm-ec.enc in my installation
Hmmm ... how old is your ConTeXt then? You should install the new verision of Latin Modern, but recent version of ConTeXt doesn't work with the old version of Latin Modern.
but ec-var-lm.enc. If I add a --variant=var-lm to the parameters for texfont (or alternatively create a symbolic link ec.ec -> ec-var-lm.enc in my private texmf tree), then the ligatures work correctly! Unfortunately, umlauts don't work anymore, both typed directly (ä, ö, ü. ß, ...) and with the TeX commands ("a, "o, "u, "s, ...). Did you have problems with umlauts as well using lm-ec.enc? Maybe I should try cork.enc (--encoding=cork) instead?
Cork won't help you. It's just as bad as ec.enc (they're just synonyms - both are old and kind-of-obsolete, but nobody wants to modernise them; they say that you have to write your own for the usage with recent fonts). You can try if you'll have more luck with this one (should be more or less equivalent with ec-lm.enc if you would have the latest version of LM installed): http://www.tug.org/fontname/tex256.enc ec.enc would give you way too many missing glyphs anyway. Mojca
participants (5)
-
Andreas Schneider
-
Hans Hagen
-
Mojca Miklavec
-
Taco Hoekwater
-
Thomas A. Schmitz