Postscript Type1 fonts & MK IV
I'd like to get some Postscript Type1 fonts working with MK IV (installed via the minimals under Linux). I placed the *.pfb fonts in ~/.fonts and did: mtxrun --script fonts --reload mtxrun --script fonts --list --all --pattern=* ...but the output doesn't show any of the *.pfb fonts. The *.ttf fonts installed alongside them in ~/.fonts do show up, and I can create PDFs with those ttf fonts using the `context` command, but I'm not sure how to proceed with the Postscript fonts. Thanks for any suggestions, John -- John Magolske http://B79.net/contact
Am 28.08.10 01:16, schrieb John Magolske:
I'd like to get some Postscript Type1 fonts working with MK IV (installed via the minimals under Linux). I placed the *.pfb fonts in ~/.fonts and did:
mtxrun --script fonts --reload mtxrun --script fonts --list --all --pattern=*
...but the output doesn't show any of the *.pfb fonts. The *.ttf fonts installed alongside them in ~/.fonts do show up, and I can create PDFs with those ttf fonts using the `context` command, but I'm not sure how to proceed with the Postscript fonts.
ConTeXt needs also the afm files for type 1 fonts. Wolfgang
On 28-8-2010 1:16, John Magolske wrote:
I'd like to get some Postscript Type1 fonts working with MK IV (installed via the minimals under Linux). I placed the *.pfb fonts in ~/.fonts and did:
mtxrun --script fonts --reload mtxrun --script fonts --list --all --pattern=*
....but the output doesn't show any of the *.pfb fonts. The *.ttf fonts installed alongside them in ~/.fonts do show up, and I can create PDFs with those ttf fonts using the `context` command, but I'm not sure how to proceed with the Postscript fonts.
put the afm files in the tree as well - either in the afm subtree (with pfb's in the type1 subtree) - or in the data tree (alongside pfb's) then run mtxrun --generate Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
* Hans Hagen
On 28-8-2010 1:16, John Magolske wrote:
I'd like to get some Postscript Type1 fonts working with MK IV (installed via the minimals under Linux).
put the afm files in the tree as well
- either in the afm subtree (with pfb's in the type1 subtree) - or in the data tree (alongside pfb's)
then run mtxrun --generate
Thanks -- I put a SabonLT-Roman.afm and a SabonLT-Roman.pfb into ~/.fonts and got things working. But I'm having a heck of a time with another font family. It's a PS Type1 font for Mac, and I've tried all sorts of things in attempting to generate .pfb & .afm files from the original Mac PS Type1 fonts ... fontforge, fondu, type1afm, font2afm ... on the Mac & on my Linux box. But I can't get an afm/pfb combo that works. I've pasted the output of a `context` command below (changed the font name here as I don't think its license allows for converting it). Is it inherently tricky to get Type1 PS Mac fonts working with ConTeXt & luatex on Linux? I'm trying to avoid spending another $300 for some fonts I already purchased but can no longer use (not on a Mac much any more). I was able to use these *.pfb fonts with LaTeX + xetex in the past under Linux. Also, the SabonLT-Roman.afm file that came from Linotype has a section titled "StartKernData", but .afm files generated using type1afm, fontforge, font2afm, etc. have no kerning section. Would using such .afm files cause sub-standard output with regard to kerning? Any suggestions/clarifications much appreciated, John ---- % context test1.tex MTXrun | run 1: luatex --fmt="/home/john/context/tex/texmf-cache/luatex-cache /context/de...42/formats/cont-en" --lua="/home/john/context/tex/texmf-cache /luatex-cache/context/de...42/formats/cont-en.lui" --backend=pdf "./test1.tex "This is LuaTeX, Version beta-0.61.0-2010072816 \write18 enabled. (test1.tex ConTeXt ver: 2010.08.20 00:00 MKIV fmt: 2010.8.22 int: english/english system : cont-new loaded (/home/john/context/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/home/john/context/tex/texmf-context/tex/context/base/cont-new.mkiv)) system : cont-fil loaded (/home/john/context/tex/texmf-context/tex/context/base/cont-fil.tex loading : ConTeXt File Synonyms ) system : cont-sys.rme loaded (/home/john/context/tex/texmf-context/tex/context/user/cont-sys.rme (/home/john/context/tex/texmf-context/tex/context/base/type-def.mkiv) (/home/john/context/tex/texmf-context/tex/context/base/type-lua.mkiv) (/home/john/context/tex/texmf-context/tex/context/base/type-siz.mkiv) (/home/john/context/tex/texmf-context/tex/context/base/type-otf.mkiv)) system : test1.top loaded (test1.top) fonts : preloading latin modern fonts {/home/john/context/tex/texmf/fonts/map/dvips/lm/lm-math.map} {/home/john/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map} {/home/john/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} bodyfont : 12pt rm is loaded language : language en is active load afm > reading /home/john/.fonts/SomeMacintoshPSfont.afm load afm > unifying /home/john/.fonts/SomeMacintoshPSfont.afm load afm > assigning private slot U+F0000 for unknown glyph name onesuperior load afm > assigning private slot U+F0001 for unknown glyph name ffl load afm > assigning private slot U+F0002 for unknown glyph name ffi load afm > assigning private slot U+F0003 for unknown glyph name ff load afm > assigning private slot U+F0004 for unknown glyph name nbspace load afm > assigning private slot U+F0005 for unknown glyph name FL261 load afm > assigning private slot U+F0006 for unknown glyph name fi load afm > assigning private slot U+F0007 for unknown glyph name twosuperior load afm > assigning private slot U+F0008 for unknown glyph name threesuperior load afm > assigning private slot U+F0009 for unknown glyph name fl load afm > add ligatures load afm > add tex-ligatures load afm > add extra kerns load afm > add tounicode data load afm > saving: SomeMacintoshPSfont in cache report | lua: compiling /home/john/context/tex/texmf-cache/luatex-cache/context /de675cef24f333545b18002e92921442/fonts/afmacintoshPSfont.tma into /home/john/context/tex/texmf-cache/luatex-cache/context/de...42/fonts/afmacintoshPSfont.tmc define fonts > source file 'SomeMacintoshPSfont' is not found define fonts > unable to determine font format for '' publications : loading formatting style from bxml-apa (/home/john/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv) systems : begin file test1.tex at line 10 pages > flushing realpage 1, userpage 1, subpage 1 systems : end file test1.tex at line 12 system : cont-err loaded (/home/john/context/tex/texmf-context/tex/context/base/cont-err.tex systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead Type1: Could not open Type1 font: (null)) ) MTXrun | fatal error: return code: 1 -- John Magolske http://B79.net/contact
On 08/29/2010 08:50 AM, John Magolske wrote:
Is it inherently tricky to get Type1 PS Mac fonts working with ConTeXt & luatex on Linux?
It should not be.
Also, the SabonLT-Roman.afm file that came from Linotype has a section titled "StartKernData", but .afm files generated using type1afm, fontforge, font2afm, etc. have no kerning section. Would using such .afm files cause sub-standard output with regard to kerning?
Yes. If the pfb font versions match, you should be able use the afm from Linotype.
load afm> reading /home/john/.fonts/SomeMacintoshPSfont.afm
Why the odd afm name? Is there a matching SomeMacintoshPSfont.pfb ? If there is, context cannot find it, and that is where this fatal message comes from:
Type1: Could not open Type1 font: (null)) )
Best wishes, Taco
* Taco Hoekwater
On 08/29/2010 08:50 AM, John Magolske wrote:
Is it inherently tricky to get Type1 PS Mac fonts working with ConTeXt & luatex on Linux?
It should not be.
load afm> reading /home/john/.fonts/SomeMacintoshPSfont.afm
Why the odd afm name? Is there a matching SomeMacintoshPSfont.pfb ?
There is a matching SomeMacintoshPSfont.pfb. The odd name has to do with me replacing the real font name with a made-up name in what I pasted into my email to the list. Maybe that's silly/overly-cautious ... but I think the license for that font doesn't allow converting it from a Mac PS font to a (Win?) PS font, generating afm files from it with type1afm, etc. Anyhow, to re-cap, I did: * go to the iMac & find a font named "SomeMacintoshPSfont" * use Fontforge to generate "SomeMacintoshPSfont.pfb" * use the type1afm utility to generate "SomeMacintoshPSfont.afm" * put these pfb & afm files in the ~/.fonts directory on Linux box * run `mtxrun --generate` * run `mtxrun --script fonts --reload` * view output of `mtxrun --script fonts --list --all` to get names for use in typscript. But it doesn't work for some reason... load afm > saving: SomeMacintoshPSfont in cache ... define fonts > source file 'SomeMacintoshPSfont' is not found Regards, John -- John Magolske http://B79.net/contact
On 08/29/2010 10:11 AM, John Magolske wrote:
Anyhow, to re-cap, I did:
* go to the iMac& find a font named "SomeMacintoshPSfont" * use Fontforge to generate "SomeMacintoshPSfont.pfb" * use the type1afm utility to generate "SomeMacintoshPSfont.afm" * put these pfb& afm files in the ~/.fonts directory on Linux box
There were some issues earlier this week with fonts in ~/.fonts not being found, and I don't recall what was going on exactly. But definitely, you can try to put the files in <texmf>/fonts/data and see if that helps (even if you do that just for testing). Best wishes, Taco
On Sat, Aug 28, 2010 at 11:50:38PM -0700, John Magolske wrote:
Also, the SabonLT-Roman.afm file that came from Linotype has a section titled "StartKernData", but .afm files generated using type1afm, fontforge, font2afm, etc. have no kerning section. Would using such .afm files cause sub-standard output with regard to kerning?
FontForge can load mac type1 kerning, see: http://fontforge.sourceforge.net/faq.html#FOND-kern I think after that generating a pfb font will also generate an afm file as well. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
* Khaled Hosny
On Sat, Aug 28, 2010 at 11:50:38PM -0700, John Magolske wrote:
Also, the SabonLT-Roman.afm file that came from Linotype has a section titled "StartKernData", but .afm files generated using type1afm, fontforge, font2afm, etc. have no kerning section. Would using such .afm files cause sub-standard output with regard to kerning?
FontForge can load mac type1 kerning, see: http://fontforge.sourceforge.net/faq.html#FOND-kern
Thanks, useful information linked there: "The mac stored kerning information in the FOND resource associated with a bitmap font (it is not stored in the file with the postscript font). If you wish kerning data for a mac postscript font, you must find a font file containing a bitmap font with the same family and style as the postscript." Reading this, I went into the directory of the font in question, found the *.bmap file and ran `fondu -afm` on it. This created afm files for all the fonts in that family, each file including a "StartKernData" section with plenty of kerning data. So I feel closer...at least I know how to create afm files that include kerning data. But unfortunately, I still can't get these fonts to work with ConTeXt. It must have something to do with the font itself, as the SabonLT-Roman.afm and SabonLT-Roman.pfb I placed in the ~/.fonts directory are working fine. John -- John Magolske http://B79.net/contact
On Sun, Aug 29, 2010 at 11:17:18PM -0700, John Magolske wrote:
* Khaled Hosny
[100829 08:37]: On Sat, Aug 28, 2010 at 11:50:38PM -0700, John Magolske wrote:
Also, the SabonLT-Roman.afm file that came from Linotype has a section titled "StartKernData", but .afm files generated using type1afm, fontforge, font2afm, etc. have no kerning section. Would using such .afm files cause sub-standard output with regard to kerning?
FontForge can load mac type1 kerning, see: http://fontforge.sourceforge.net/faq.html#FOND-kern
Thanks, useful information linked there:
"The mac stored kerning information in the FOND resource associated with a bitmap font (it is not stored in the file with the postscript font). If you wish kerning data for a mac postscript font, you must find a font file containing a bitmap font with the same family and style as the postscript."
Reading this, I went into the directory of the font in question, found the *.bmap file and ran `fondu -afm` on it. This created afm files for all the fonts in that family, each file including a "StartKernData" section with plenty of kerning data.
So I feel closer...at least I know how to create afm files that include kerning data. But unfortunately, I still can't get these fonts to work with ConTeXt. It must have something to do with the font itself, as the SabonLT-Roman.afm and SabonLT-Roman.pfb I placed in the ~/.fonts directory are working fine.
Try Taco's suggestion, I myself got unpredictable results with ~/.fonts, try instead ~/texmf/fonts/{afm,type1} or even ~/texmf/fonts/data Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
* Khaled Hosny
Try Taco's suggestion, I myself got unpredictable results with ~/.fonts, try instead ~/texmf/fonts/{afm,type1} or even ~/texmf/fonts/data
Thanks! This solved my problem: % mkdir -p ~/texmf/fonts/data % mv *.{pfb,afm} ~/texmf/fonts/data % export OSFONTDIR="$HOME/.fonts;$HOME/texmf/fonts/data" Or, to keep all fonts under ~/.fonts , this also works: % mkdir -p ~/.fonts/tex % mv *.{pfb,afm} ~/.fonts/tex % mkdir -p ~/texmf/fonts % ln -s ~/.fonts/tex ~/texmf/fonts/data % export OSFONTDIR="$HOME/.fonts" For some reason I was trying $HOME/context/tex/texmf/fonts/data previously, which didn't work. But things are now working quite nicely now -- thank you all. Regards, John -- John Magolske http://B79.net/contact
On 08/31/2010 08:27 AM, John Magolske wrote:
* Khaled Hosny
[100830 18:29]: Try Taco's suggestion, I myself got unpredictable results with ~/.fonts, try instead ~/texmf/fonts/{afm,type1} or even ~/texmf/fonts/data
We should try to find what is causing the erratic behavior of ~/.fonts Best wishes, Taco
On 08/31/2010 09:31 AM, Taco Hoekwater wrote:
On 08/31/2010 08:27 AM, John Magolske wrote:
* Khaled Hosny
[100830 18:29]: Try Taco's suggestion, I myself got unpredictable results with ~/.fonts, try instead ~/texmf/fonts/{afm,type1} or even ~/texmf/fonts/data
We should try to find what is causing the erratic behavior of ~/.fonts
Perhaps it is all just because the default $OSFONTDIR does not contain ~/.fonts ? I tried this: export OSFONTDIR=/usr/share/fonts:~/.fonts and everything works as it should. Best wishes, Taco
On Tue, Aug 31, 2010 at 11:19:50AM +0200, Taco Hoekwater wrote:
On 08/31/2010 09:31 AM, Taco Hoekwater wrote:
On 08/31/2010 08:27 AM, John Magolske wrote:
* Khaled Hosny
[100830 18:29]: Try Taco's suggestion, I myself got unpredictable results with ~/.fonts, try instead ~/texmf/fonts/{afm,type1} or even ~/texmf/fonts/data
We should try to find what is causing the erratic behavior of ~/.fonts
Perhaps it is all just because the default $OSFONTDIR does not contain ~/.fonts ? I tried this:
export OSFONTDIR=/usr/share/fonts:~/.fonts
Mine is: export OSFONTDIR='$HOME/.fonts//:/usr/share/fonts//' Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On Tue, 31 Aug 2010, Khaled Hosny wrote:
On Tue, Aug 31, 2010 at 11:19:50AM +0200, Taco Hoekwater wrote:
On 08/31/2010 09:31 AM, Taco Hoekwater wrote:
On 08/31/2010 08:27 AM, John Magolske wrote:
* Khaled Hosny
[100830 18:29]: Try Taco's suggestion, I myself got unpredictable results with ~/.fonts, try instead ~/texmf/fonts/{afm,type1} or even ~/texmf/fonts/data
We should try to find what is causing the erratic behavior of ~/.fonts
Perhaps it is all just because the default $OSFONTDIR does not contain ~/.fonts ? I tried this:
export OSFONTDIR=/usr/share/fonts:~/.fonts
Mine is:
export OSFONTDIR='$HOME/.fonts//:/usr/share/fonts//'
Mine is (in setuptex) OSFONTDIR="$HOME/.fonts;/usr/share/fonts;" export OSFONTDIR I had some troubles with OSFONTDIR and opentype fonts in the past. Perhaps I should use : and trailing // and test again. Aditya
On Mon, Aug 30, 2010 at 11:27:00PM -0700, John Magolske wrote:
* Khaled Hosny
[100830 18:29]: Try Taco's suggestion, I myself got unpredictable results with ~/.fonts, try instead ~/texmf/fonts/{afm,type1} or even ~/texmf/fonts/data
Thanks! This solved my problem:
% mkdir -p ~/texmf/fonts/data % mv *.{pfb,afm} ~/texmf/fonts/data % export OSFONTDIR="$HOME/.fonts;$HOME/texmf/fonts/data"
Or, to keep all fonts under ~/.fonts , this also works:
I think the OSFONTDIR is unnecessary here, context will seach ~/texmf anyway. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
* Khaled Hosny
On Mon, Aug 30, 2010 at 11:27:00PM -0700, John Magolske wrote:
% mkdir -p ~/texmf/fonts/data % mv *.{pfb,afm} ~/texmf/fonts/data % export OSFONTDIR="$HOME/.fonts;$HOME/texmf/fonts/data"
I think the OSFONTDIR is unnecessary here, context will seach ~/texmf anyway.
I found that if $HOME/texmf/fonts/data was not explicitly included in the OSFONTDIR environment variable, the fonts in that directory did not show up. Also, I tried a : and trailing // in the path as mentioned in another post, but it made no difference. Regards, John -- John Magolske http://B79.net/contact
participants (6)
-
Aditya Mahajan
-
Hans Hagen
-
John Magolske
-
Khaled Hosny
-
Taco Hoekwater
-
Wolfgang Schuster