Hi,
like others before, I tried to get the script alphabet from Ralph
Smith's Formal Font to work in MkIV (minimals) and failed. There seems
to be only outdated or unclear and unspecific information about where to
start with fonts available. Or: there is information everywhere but I
can't put it together.
I downloaded a rsfs.zip from [1] containing .mf, .pfb, .afm, .pfm files
and a .map file. It seems to be a type1 font.
The manual [2] states, that a script texfont.pl can do install the font.
Mojca said [3] on the mailing list that texfont is not the way to go, so
I didn't try to go further in that direction.
Do I need .tfm files? If so, how to get them?
I put the "rsfs" directory with its subdirs from the .zip to the folder
c:\context\tex\texmf-fonts\fonts\data\ as Wolfgang suggested [4] and ran
"context --generate". I seems as if this did not install the font, but I
have no idea. How can I check this?
\definefont[rsfs][file:rsfs*default]
\starttext
\rsfs ABCDEFGHIJKLMNOPQRSTUVWXYZ
\stoptext
just gave me the alphabet in default font. Is there a way to ask ConTeXt
which fonts (or does ConTeXt "know" typescripts?) it knows?
In addition, I tried the example from Hans and Otared at [5] which
crashes on my installation (error log appended at the end).
I don't know how to proceed here. Hopefully someone from this list can
assist me. Thanks in advance.
Kind regards,
Stefan
[1] http://www.ctan.org/tex-archive/fonts/rsfs/
[2] http://pmrb.free.fr/contextref.pdf
[3]
http://archive.contextgarden.net/message/20101213.120015.795450f2.en.html
[4]
http://archive.contextgarden.net/message/20101214.102347.a6a2216f.en.html
[5]
http://archive.contextgarden.net/message/20100414.122529.bc3ba584.en.html
mtx-context | warning: syntex is enabled
mtx-context | run 1: luatex --synctex=1
--fmt="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en"
--lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui"
--backend="pdf" "./rsfs_test.tex"
This is LuaTeX, Version beta-0.66.0-2011021923 (rev 4086)
\write18 enabled.
(rsfs_test.tex
ConTeXt ver: 2011.02.25 22:03 MKIV fmt: 2011.3.16 int: english/english
system > cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system > beware: some patches loaded from cont-new.mkiv
)
system > rsfs_test.top loaded
(rsfs_test.top)
fonts > latin modern fonts are not preloaded
languages > language en is active
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv){C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
system > begin file rsfs_test.tex at line 41
backend > xmp > using file
'C:/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages > flushing realpage 1, userpage 1, subpage 1
system > end file rsfs_test.tex at line 57
){C:/context/tex/texmf/fonts/enc/dvips/lm/lm-mathsy.enc}{C:/context/tex/texmf/fonts/enc/dvips/lm/lm-mathit.enc}
On Wed, Mar 16, 2011 at 09:00, Stefan Müller
like others before, I tried to get the script alphabet from Ralph Smith's Formal Font to work in MkIV (minimals) and failed. There seems to be only outdated or unclear and unspecific information about where to start with fonts available. Or: there is information everywhere but I can't put it together.
I downloaded a rsfs.zip from [1] containing .mf, .pfb, .afm, .pfm files and a .map file. It seems to be a type1 font.
The manual [2] states, that a script texfont.pl can do install the font. Mojca said [3] on the mailing list that texfont is not the way to go, so I didn't try to go further in that direction.
Do I need .tfm files? If so, how to get them?
You don't need tfm files and you don't need to use texfont.pl.
I put the "rsfs" directory with its subdirs from the .zip to the folder c:\context\tex\texmf-fonts\fonts\data\ as Wolfgang suggested [4] and ran "context --generate". I seems as if this did not install the font, but I have no idea. How can I check this?
For mkiv minimals, the following should work: a) Install font as appropriate for your OS. b) Make sure OS font directory containing font pfb file is included in OSFONTDIR c) Update LuaTeX's font info by running mtxrun --script fonts --reload d) Check the list of fonts using mtxrun --script fonts --list --all --pattern=* At that point you have the font known to LuaTeX. Then you need to set it up in your document; I posted a full example of that a while back, it's at http://pastebin.tlhiv.org/9GeRRcI4 but I haven't put it into the wiki yet. mathew -- URL:http://www.pobox.com/~meta/
Hi mathew, thanks for your reply! On 16.03.2011 16:58, mathew wrote:
On Wed, Mar 16, 2011 at 09:00, Stefan Müller
wrote: [...] I put the "rsfs" directory with its subdirs from the .zip to the folder c:\context\tex\texmf-fonts\fonts\data\ as Wolfgang suggested [4] and ran "context --generate". I seems as if this did not install the font, but I have no idea. How can I check this?
For mkiv minimals, the following should work: a) Install font as appropriate for your OS.
I'm using Windows Vista 64bit and installed the rsfs font by right-clicking the .pfm files. I thought I had to use the .pfb files, but Windows did not recognize those and didn't show "Install" in the context menu. After installing the .pfm files I could find them in "C:\Windows\Fonts".
b) Make sure OS font directory containing font pfb file is included in OSFONTDIR
Is this a typo and do you mean .pfm file? Otherwise I don't get it. Should I just copy the .pfb files to "C:\Windows\Fonts", too? Did something went wrong with installation? When running "mtxrun --script fonts --reload"
c) Update LuaTeX's font info by running mtxrun --script fonts --reload
there were the lines fonts | names | identifying system font files with suffix otf fonts | names | adding path from OSFONTDIR: c:/windows/fonts fonts | names | adding path from fontconfig file: c:/windows/fonts in the output, so I guess OSFONTDIR is correct (where would I change it, anyway?) as "c:/windows/fonts" is considered. Here mtxrun tries to identify fonts with a number of "suffixes". It only consideres otf, ttf, ttc, dfont and afm (and caps versions). Shouldn't there be pfm or pfb as well?
d) Check the list of fonts using mtxrun --script fonts --list --all --pattern=*
I tried this and got a lot of fonts (around 900) printed to screen, however "rsfs" was not present in this list. What did I wrong? Thank you very much for your patience! Best regards, Stefan
At that point you have the font known to LuaTeX. Then you need to set it up in your document; I posted a full example of that a while back, it's at http://pastebin.tlhiv.org/9GeRRcI4 but I haven't put it into the wiki yet.
mathew
Am Thu, 17 Mar 2011 10:05:17 +0100 schrieb Stefan Müller:
Is this a typo and do you mean .pfm file? Otherwise I don't get it. Should I just copy the .pfb files to "C:\Windows\Fonts", too?
You need both pfm and pfb in the fonts folder. But windows probably pulled the pfb along with the pfm when you told it to install the font. -- Ulrike Fischer
Ah, thanks for that. Indeed, there are .pfm and .pfb files in the Fonts directory now. But still mtxrun --script fonts --reload doesn't seem to check for those file types... Best regards, Stefan. On 17.03.2011 13:40, Ulrike Fischer wrote:
Am Thu, 17 Mar 2011 10:05:17 +0100 schrieb Stefan Müller:
Is this a typo and do you mean .pfm file? Otherwise I don't get it. Should I just copy the .pfb files to "C:\Windows\Fonts", too?
You need both pfm and pfb in the fonts folder. But windows probably pulled the pfb along with the pfm when you told it to install the font.
Hi Stefan, It seems that somehow on your system the rsfs font is not seen by mkiv. In fact after the following command mtxrun --script fonts --reload you should say mtxrun --script fonts --list --pattern=rsfs in order to see whether any rsfs font is detected by mkiv. If the fonts are not listed it means that either the fonts are not on your system, or mkiv does not see them because they are not at the right place. Best regards: OK On 17 mars 2011, at 14:41, Stefan Müller wrote:
Ah, thanks for that. Indeed, there are .pfm and .pfb files in the Fonts directory now. But still
mtxrun --script fonts --reload
doesn't seem to check for those file types...
Best regards, Stefan.
On 17.03.2011 13:40, Ulrike Fischer wrote:
Am Thu, 17 Mar 2011 10:05:17 +0100 schrieb Stefan Müller:
Is this a typo and do you mean .pfm file? Otherwise I don't get it. Should I just copy the .pfb files to "C:\Windows\Fonts", too?
You need both pfm and pfb in the fonts folder. But windows probably pulled the pfb along with the pfm when you told it to install the font.
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
%%%%%%%%%%%%%%%%%% Otared Kavian Département de Mathématiques Université de Versailles Saint-Quentin Bâtiment Fermat 45 avenue des Etats Unis 78035 Versailles cedex Téléphone: +33 1 39 25 46 42 Secrétariat: +33 1 39 25 46 44 Secrétariat: +33 1 39 25 46 46 e-mail: Otared.Kavian@math.uvsq.fr
So... I think I got somewhere now with the explanations from you and mathew. It seems that the problem were the missing .afm files (as mtxrun wanted those, not .pfm nor .pfb). I found two different solutions A and B: (1) Install fonts (.pfm) in Windows (2A) Put .afm files to C:\Windows\Fonts (2B) Put the complete rsfs (containing the .afm and all the other stuff) directory to texmf-fonts\fonts (3) Run "mtxrun --script fonts --reload" (4) Running "mtxrun --script fonts --list --all --pattern=rsfs" shows the fonts (Note the "--all", otherwise only one is printed) There are two things now, that are somehow strange to me: - In both versions, step (1) seems to be mandatory. I would expect, that the rsfs directory in texmf-fonts\fonts should be enough, as mtxrun clearly searches there and all the files are there, too. I don't understand the problem here. - If the .pfm and .pfb files are sufficient for Windows, why does mtxrun specifically search for .afm files and not also for .pfm? Anyhow, the fonts are finally listed/recognized by mtxrun. Unfortunately, the example at http://archive.contextgarden.net/message/20100414.122529.bc3ba584.en.html still doesn't show me the rsfs font, only a default font. Probably I just have to look into that (and the example from mathew) tomorrow. Best regards and thanks so far, Stefan.
On Thu, Mar 17, 2011 at 04:05, Stefan Müller
I'm using Windows Vista 64bit and installed the rsfs font by right-clicking the .pfm files. I thought I had to use the .pfb files, but Windows did not recognize those and didn't show "Install" in the context menu. After installing the .pfm files I could find them in "C:\Windows\Fonts".
.pfb is "Printer Font, Binary". .pfa is "Printer Font, ASCII". .pfm is Printer Font Metrics, binary. .afm is Adobe Font Metrics, ASCII. Typically each font will have a set of outlines in a pfb or pfa file, and a set of metrics in a pfm or afm file. For Windows, you want the pfb and pfm files.
Is this a typo and do you mean .pfm file? Otherwise I don't get it. Should I just copy the .pfb files to "C:\Windows\Fonts", too? Did something went wrong with installation?
On Windows 7, the OS will identify only the .pfm file as the actual font. However, when you install the font by opening it and clicking the "Install" button, Windows invisibly locates the matching .pfb file from the same directory, and copies them both to the C:\Windows\Fonts directory. It then hides the separate files from you. However, you can open the command line prompt and cd to \windows\fonts and use dir to see them.
fonts | names | identifying system font files with suffix otf fonts | names | adding path from OSFONTDIR: c:/windows/fonts fonts | names | adding path from fontconfig file: c:/windows/fonts
in the output, so I guess OSFONTDIR is correct (where would I change it, anyway?) as "c:/windows/fonts" is considered.
Yes, looks like it's correct. You'd change it by setting an environment variable. http://www.itechtalk.com/thread3595.html
Here mtxrun tries to identify fonts with a number of "suffixes". It only consideres otf, ttf, ttc, dfont and afm (and caps versions). Shouldn't there be pfm or pfb as well?
On Linux, it seems to scan for .afm files, as that's what Linux expects and installs in preference to pfm. I'd expect the Windows version to scan for .pfm, but I've never run any kind of TeX under Windows. To be honest, I did have problems getting LuaTeX and XeTeX to recognize the PostScript fonts installed with GhostScript, so I eventually removed them from my font path. My general conclusion is that life is a lot, lot simpler if you throw away all your Type 1 fonts and replace them with OpenType versions. (I used fontforge to convert the few that I really wanted to keep.) Also, if you can find out what TeX is looking for, there are tools to convert between pfb and pfa, and between afm and pfm. mathew -- URL:http://www.pobox.com/~meta/
On 17.03.2011 16:04, mathew wrote:
On Thu, Mar 17, 2011 at 04:05, Stefan Müller
wrote: I'm using Windows Vista 64bit and installed the rsfs font by right-clicking the .pfm files. I thought I had to use the .pfb files, but Windows did not recognize those and didn't show "Install" in the context menu. After installing the .pfm files I could find them in "C:\Windows\Fonts".
.pfb is "Printer Font, Binary". .pfa is "Printer Font, ASCII". .pfm is Printer Font Metrics, binary. .afm is Adobe Font Metrics, ASCII.
Typically each font will have a set of outlines in a pfb or pfa file, and a set of metrics in a pfm or afm file. For Windows, you want the pfb and pfm files.
Is this a typo and do you mean .pfm file? Otherwise I don't get it. Should I just copy the .pfb files to "C:\Windows\Fonts", too? Did something went wrong with installation?
On Windows 7, the OS will identify only the .pfm file as the actual font. However, when you install the font by opening it and clicking the "Install" button, Windows invisibly locates the matching .pfb file from the same directory, and copies them both to the C:\Windows\Fonts directory.
It then hides the separate files from you. However, you can open the command line prompt and cd to \windows\fonts and use dir to see them.
Yeah, I just figured that out. I love that about Windows...
fonts | names | identifying system font files with suffix otf fonts | names | adding path from OSFONTDIR: c:/windows/fonts fonts | names | adding path from fontconfig file: c:/windows/fonts
in the output, so I guess OSFONTDIR is correct (where would I change it, anyway?) as "c:/windows/fonts" is considered.
Yes, looks like it's correct.
You'd change it by setting an environment variable. http://www.itechtalk.com/thread3595.html
Yes, I thought so. I just asked, because I couldn't find an environment variable with that name. Even after "setuptex.bat" typing "echo %OSFONTDIR%" did only print "%OSFONTDIR%" and not a list of paths, as I expected.
Here mtxrun tries to identify fonts with a number of "suffixes". It only consideres otf, ttf, ttc, dfont and afm (and caps versions). Shouldn't there be pfm or pfb as well?
On Linux, it seems to scan for .afm files, as that's what Linux expects and installs in preference to pfm. I'd expect the Windows version to scan for .pfm, but I've never run any kind of TeX under Windows.
To be honest, I did have problems getting LuaTeX and XeTeX to recognize the PostScript fonts installed with GhostScript, so I eventually removed them from my font path. My general conclusion is that life is a lot, lot simpler if you throw away all your Type 1 fonts and replace them with OpenType versions. (I used fontforge to convert the few that I really wanted to keep.)
Also, if you can find out what TeX is looking for, there are tools to convert between pfb and pfa, and between afm and pfm.
mathew
On Mar 17, 2011, at 11:53, Stefan Müller wrote:
Yes, I thought so. I just asked, because I couldn't find an environment variable with that name. Even after "setuptex.bat" typing "echo %OSFONTDIR%" did only print "%OSFONTDIR%" and not a list of paths, as I expected.
There are defaults baked into the binaries. If you don't set the environment variable, you get the built-in defaults. That's generally how things work on Unix. On Mar 17, 2011, at 11:53, Stefan Müller wrote:
(2A) Put .afm files to C:\Windows\Fonts (2B) Put the complete rsfs (containing the .afm and all the other stuff) directory to texmf-fonts\fonts
Right... From the point of view of ConTeXt/LuaTeX use, there's no need for the fonts to be installed in Windows; you just need to have all the files somewhere that OSFONTDIR (or the default font paths) will point. The font outlines will be embedded into the PDF by default, so the OS doesn't need to have access to them.
- In both versions, step (1) seems to be mandatory. I would expect, that the rsfs directory in texmf-fonts\fonts should be enough, as mtxrun clearly searches there and all the files are there, too. I don't understand the problem here.
Hmm, that *would* explain my problem with getting GhostScript's Type 1 fonts working... I must investigate further!
- If the .pfm and .pfb files are sufficient for Windows, why does mtxrun specifically search for .afm files and not also for .pfm?
Probably because mtxrun (and the rest of ConTeXt and LuaTeX) are written for Unix and ported to Windows, and Unix uses .afm files for metrics. (Except OS X, which is different for historical reasons.) That and .afm files are much easier to work with because they're text files. But it might not be a bad idea for LuaTeX to automatically perform a pfm2afm conversion and cache the converted files when necessary, and probably not that hard to code. On the other hand, Type 1 fonts are legacy at this point, so it might not be worth it. mathew
On Thu, Mar 17, 2011 at 09:42:38PM -0500, mathew wrote:
- If the .pfm and .pfb files are sufficient for Windows, why does mtxrun specifically search for .afm files and not also for .pfm?
Probably because mtxrun (and the rest of ConTeXt and LuaTeX) are written for Unix and ported to Windows, and Unix uses .afm files for metrics. (Except OS X, which is different for historical reasons.)
That and .afm files are much easier to work with because they're text files.
AFAIK, ConTeXt needs afm files to load type1 files, something related to encoding the font and ligatures/kerning. So you need bot afm and bfb/bfa files together somewhere context searches for fonts and it should work. PFM files are not needed at all (dunno what they are for actually, some obscure windows thing I guess).
But it might not be a bad idea for LuaTeX to automatically perform a pfm2afm conversion and cache the converted files when necessary, and probably not that hard to code. On the other hand, Type 1 fonts are legacy at this point, so it might not be worth it.
LuaTeX can load afm files thanks to the embedded, fontforge derived, font loader, but AFAIK it does not handle pfm files at all. Hans considers type1 fonts obsolete (and I agree with him :)) and he is unlikely to put much effort into supporting them. Regards, Khaled -- Khaled Hosny Egyptian Arab
On 18-3-2011 4:27, Khaled Hosny wrote:
But it might not be a bad idea for LuaTeX to automatically perform a pfm2afm conversion and cache the converted files when necessary, and probably not that hard to code. On the other hand, Type 1 fonts are legacy at this point, so it might not be worth it.
LuaTeX can load afm files thanks to the embedded, fontforge derived, font loader, but AFAIK it does not handle pfm files at all.
Hans considers type1 fonts obsolete (and I agree with him :)) and he is unlikely to put much effort into supporting them.
Indeed. I kicked out the last encoding related code a while ago. Also, I only consider a type 1 font okay when it has both an afm and a pfb file and mkiv can handle that quite well (even beyond the regular tex encodings). Personally I need it for fonts that I have bought and don't want to buy again. 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 -----------------------------------------------------------------
On Fri, Mar 18, 2011 at 05:04, Hans Hagen
Also, I only consider a type 1 font okay when it has both an afm and a pfb file and mkiv can handle that quite well (even beyond the regular tex encodings). Personally I need it for fonts that I have bought and don't want to buy again.
Same here, but I found it easier to convert my fonts to OpenType by loading them into fontforge and doing Save As... I still have a mystery regarding the type 1 fonts installed with GhostScript, though: \definetypeface [dingbats][ss][sans][dingbats][default] \starttext {\dingbats \uchar{39}{7}\uchar{39}{13}\uchar{39}{42}} \stoptext produces no visible output, yet... $ mtxrun --script fonts --list --all --pattern=dingbat* dingbats dingbats /usr/share/fonts/type1/gsfonts/d050000l.afm dingbatsnormal dingbats /usr/share/fonts/type1/gsfonts/d050000l.afm $ ls /usr/share/fonts/type1/gsfonts/d050000l* /usr/share/fonts/type1/gsfonts/d050000l.afm /usr/share/fonts/type1/gsfonts/d050000l.pfb /usr/share/fonts/type1/gsfonts/d050000l.pfm $ This is with minimals and LuaTeX on Ubuntu. Get info on the PDF in Okular shows no Type 1 fonts embedded. (Also, is uchar intended to be a documented feature?) mathew
On 18-3-2011 3:40, mathew wrote:
On Fri, Mar 18, 2011 at 05:04, Hans Hagen
wrote: Also, I only consider a type 1 font okay when it has both an afm and a pfb file and mkiv can handle that quite well (even beyond the regular tex encodings). Personally I need it for fonts that I have bought and don't want to buy again.
Same here, but I found it easier to convert my fonts to OpenType by loading them into fontforge and doing Save As...
I still have a mystery regarding the type 1 fonts installed with GhostScript, though:
\definetypeface [dingbats][ss][sans][dingbats][default]
this assumes a dingbats typescript
\starttext {\dingbats \uchar{39}{7}\uchar{39}{13}\uchar{39}{42}} \stoptext
{\getnamedglyphdirect{dingbats}{0x39}} ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Fri, Mar 18, 2011 at 09:51, Hans Hagen
On 18-3-2011 3:40, mathew wrote:
\definetypeface [dingbats][ss][sans][dingbats][default]
this assumes a dingbats typescript
Sorry, I omitted that when copying my code...
\starttext {\dingbats \uchar{39}{7}\uchar{39}{13}\uchar{39}{42}} \stoptext
{\getnamedglyphdirect{dingbats}{0x39}}
\starttypescript [sans][dingbats][name] \definefontsynonym [Sans][name:dingbats] \stoptypescript \definetypeface [dingbats][ss][sans][dingbats][default] \starttext {\getnamedglyphdirect{dingbats}{0x272a}} Or here's the character directly: ✪ \stoptext ...still not working. But KCharSelect says that the Dingbats font has a glyph at 0x272a. fonts > fallback modern rm 12pt is loaded system > begin file makeup.tex at line 5 fonts > defining > font with asked name 'dingbats' is not found using lookup 'file' fonts > defining > unknown font dingbats, loading aborted fonts > defining > unable to define dingbats as \**currentsymbolfont** backend > xmp > using file '/usr/local/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml' And yet if I run mtxrun --script fonts --list --all --pattern=* | grep dingbats immediately after that ConTeXt run, in the same shell session, I see: dingbats dingbats /usr/share/fonts/type1/gsfonts/d050000l.afm dingbatsnormal dingbats /usr/share/fonts/type1/gsfonts/d050000l.afm Also doesn't work if I reference the afm file directly using \definefontsynonym [sans][/usr/share/fonts/type1/gsfonts/d050000l.afm] mathew
On 18-3-2011 5:01, mathew wrote:
On Fri, Mar 18, 2011 at 09:51, Hans Hagen
wrote: On 18-3-2011 3:40, mathew wrote:
\definetypeface [dingbats][ss][sans][dingbats][default]
this assumes a dingbats typescript
Sorry, I omitted that when copying my code...
\starttext {\dingbats \uchar{39}{7}\uchar{39}{13}\uchar{39}{42}} \stoptext
{\getnamedglyphdirect{dingbats}{0x39}}
\starttypescript [sans][dingbats][name] \definefontsynonym [Sans][name:dingbats] \stoptypescript \definetypeface [dingbats][ss][sans][dingbats][default] \starttext {\getnamedglyphdirect{dingbats}{0x272a}}
Or here's the character directly: ✪ \stoptext
...still not working. But KCharSelect says that the Dingbats font has a glyph at 0x272a.
fonts> fallback modern rm 12pt is loaded system> begin file makeup.tex at line 5 fonts> defining> font with asked name 'dingbats' is not found using lookup 'file' fonts> defining> unknown font dingbats, loading aborted fonts> defining> unable to define dingbats as \**currentsymbolfont** backend> xmp> using file '/usr/local/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
And yet if I run mtxrun --script fonts --list --all --pattern=* | grep dingbats immediately after that ConTeXt run, in the same shell session, I see: dingbats dingbats /usr/share/fonts/type1/gsfonts/d050000l.afm dingbatsnormal dingbats /usr/share/fonts/type1/gsfonts/d050000l.afm
Also doesn't work if I reference the afm file directly using \definefontsynonym [sans][/usr/share/fonts/type1/gsfonts/d050000l.afm]
try name:dingbats or file:d050000l and no path ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On 18.03.2011 03:42, mathew wrote:
On Mar 17, 2011, at 11:53, Stefan Müller wrote:
Yes, I thought so. I just asked, because I couldn't find an environment variable with that name. Even after "setuptex.bat" typing "echo %OSFONTDIR%" did only print "%OSFONTDIR%" and not a list of paths, as I expected.
There are defaults baked into the binaries. If you don't set the environment variable, you get the built-in defaults. That's generally how things work on Unix.
Alright, that would explain it.
On Mar 17, 2011, at 11:53, Stefan Müller wrote:
(2A) Put .afm files to C:\Windows\Fonts (2B) Put the complete rsfs (containing the .afm and all the other stuff) directory to texmf-fonts\fonts
Right... From the point of view of ConTeXt/LuaTeX use, there's no need for the fonts to be installed in Windows; you just need to have all the files somewhere that OSFONTDIR (or the default font paths) will point. The font outlines will be embedded into the PDF by default, so the OS doesn't need to have access to them.
The point I was trying to make here was that on my system I _needed_ to install the fonts in Windows first. Otherwise mtxrun wouldn't find them, no matter where the afm files were. This is maybe because of the directory structure, but I have no idea, especially as somewhere it was stated that I should just "put the directory there". I have the following: texmf-fonts \ fonts \ rsfs \ *.mf texmf-fonts \ fonts \ rsfs \ type1 \ *.pfb texmf-fonts \ fonts \ rsfs \ type1 \ afm \ *.afm texmf-fonts \ fonts \ rsfs \ type1 \ map \ *.map texmf-fonts \ fonts \ rsfs \ type1 \ pfm \ *.pfm mtxrun finds the pfb (pfm) in C:\Windows\Fonts and the afm files here. But it doesn't look for the pfb (pfm) in texmf-fonts... Is this because of the "legacy" issue? It's pretty inconvenient.
- In both versions, step (1) seems to be mandatory. I would expect, that the rsfs directory in texmf-fonts\fonts should be enough, as mtxrun clearly searches there and all the files are there, too. I don't understand the problem here.
Hmm, that *would* explain my problem with getting GhostScript's Type 1 fonts working... I must investigate further!
- If the .pfm and .pfb files are sufficient for Windows, why does mtxrun specifically search for .afm files and not also for .pfm?
Probably because mtxrun (and the rest of ConTeXt and LuaTeX) are written for Unix and ported to Windows, and Unix uses .afm files for metrics. (Except OS X, which is different for historical reasons.)
That and .afm files are much easier to work with because they're text files.
But it might not be a bad idea for LuaTeX to automatically perform a pfm2afm conversion and cache the converted files when necessary, and probably not that hard to code. On the other hand, Type 1 fonts are legacy at this point, so it might not be worth it.
mathew
I'll keep in mind that the type1 fonts are obsolete. I just thought it would be a nice idea to try "getting some font" with the rsfs first, as there were "full examples" (which do not work here for some reason) on the mailing list. Thanks for the help, Stefan.
On 18-3-2011 12:26, Stefan Müller wrote:
I have the following: texmf-fonts \ fonts \ rsfs \ *.mf texmf-fonts \ fonts \ rsfs \ type1 \ *.pfb texmf-fonts \ fonts \ rsfs \ type1 \ afm \ *.afm texmf-fonts \ fonts \ rsfs \ type1 \ map \ *.map texmf-fonts \ fonts \ rsfs \ type1 \ pfm \ *.pfm
just put the pfb and afm files (forget about map files) texmf-fonts/fonts/data/rsfs and run "mtxrun --generate" afterwards 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 -----------------------------------------------------------------
Indeed, that works! Thank you very much. So again, structure matters. Kind regards, Stefan. On 18.03.2011 12:39, Hans Hagen wrote:
On 18-3-2011 12:26, Stefan Müller wrote:
I have the following: texmf-fonts \ fonts \ rsfs \ *.mf texmf-fonts \ fonts \ rsfs \ type1 \ *.pfb texmf-fonts \ fonts \ rsfs \ type1 \ afm \ *.afm texmf-fonts \ fonts \ rsfs \ type1 \ map \ *.map texmf-fonts \ fonts \ rsfs \ type1 \ pfm \ *.pfm
just put the pfb and afm files (forget about map files)
texmf-fonts/fonts/data/rsfs
and run "mtxrun --generate" afterwards
Hans
participants (6)
-
Hans Hagen
-
Khaled Hosny
-
mathew
-
Otared Kavian
-
Stefan Müller
-
Ulrike Fischer