latest beta has trouble loading fonts on OS X
Hi all, Hans, I have trouble using my own fonts with the latest beta on my OS X box. The problem appears to be that it is unable to create the database. When I run (on mtxrun --script fonts --list I get as the last lines of my output MTXrun | fontnames: globbing path /Library/Fonts/**.dfont MTXrun | fontnames: globbing path /System/Library/Fonts/**.dfont font loading failed for /System/Library/Fonts/Keyboard.dfont It appears this particular font cannot be loaded, so the entire database fails. On my linux laptop, everything works as expected. So my questions are: 1. What can be done about it? 2. Where is OSFONTDIR set on mkiv? I specifically do NOT want my system fonts used by ConTeXt; everything I want to use with TeX is in one of my texmf trees. How can I prevent mkiv from taking the system paths into account? All best Thomas
Thomas A. Schmitz wrote:
Hi all, Hans,
I have trouble using my own fonts with the latest beta on my OS X box. The problem appears to be that it is unable to create the database. When I run (on
mtxrun --script fonts --list
I get as the last lines of my output
MTXrun | fontnames: globbing path /Library/Fonts/**.dfont MTXrun | fontnames: globbing path /System/Library/Fonts/**.dfont font loading failed for /System/Library/Fonts/Keyboard.dfont
It appears this particular font cannot be loaded, so the entire database fails. On my linux laptop, everything works as expected.
So my questions are:
1. What can be done about it?
currently only loading dfonts is implemented; the backend code in luatex has to be written yet (will happen soon)
2. Where is OSFONTDIR set on mkiv? I specifically do NOT want my system fonts used by ConTeXt; everything I want to use with TeX is in one of my texmf trees. How can I prevent mkiv from taking the system paths into account?
indeed, putting them in the tree is more robust (and controllable) mojca is supposed to know the osfontdir details 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 -----------------------------------------------------------------
2. Where is OSFONTDIR set on mkiv? I specifically do NOT want my system fonts used by ConTeXt; everything I want to use with TeX is in one of my texmf trees. How can I prevent mkiv from taking the system paths into account?
indeed, putting them in the tree is more robust (and controllable)
mojca is supposed to know the osfontdir details
May I jump in here with a question? The other day I realized that whatever OSFONTDIR is set in texmf.cnf is overridden in luatools.lua mtxrun.lua data-res.lua and possibly in other files, too. While these fix functions point to the correct osx font directories 1. ~/Library/Fonts 2. /Library/Fonts 3. /System/Library/Fonts and set things up as intended for most scenarios presumably, we're losing quite a bit of flexibility here I guess. Are this fix functions considered a temporary workaround or are they part of a larger plan? If they're just a hack, I'm wondering whether we could delegate control over OSFONTDIR back to the configuration files ... Oliver
Oliver Buerschaper wrote:
2. Where is OSFONTDIR set on mkiv? I specifically do NOT want my system fonts used by ConTeXt; everything I want to use with TeX is in one of my texmf trees. How can I prevent mkiv from taking the system paths into account?
indeed, putting them in the tree is more robust (and controllable)
mojca is supposed to know the osfontdir details
May I jump in here with a question? The other day I realized that whatever OSFONTDIR is set in texmf.cnf is overridden in
luatools.lua mtxrun.lua data-res.lua
only data-res, as the others use that (merged) ... i'll add a check for cnf settings
and possibly in other files, too. While these fix functions point to the correct osx font directories
1. ~/Library/Fonts 2. /Library/Fonts 3. /System/Library/Fonts
and set things up as intended for most scenarios presumably, we're losing quite a bit of flexibility here I guess. Are this fix functions considered a temporary workaround or are they part of a larger plan? If they're just a hack, I'm wondering whether we could delegate control over OSFONTDIR back to the configuration files ...
the problem is that it's kind of unofficial and we cannot be soure if it's set. anyhow, i'll also test the cnf data local ie, iv = instance.environment, instance.variables local function fix(varname,default) local proname = varname .. "." .. instance.progname or "crap" local p, v = ie[proname], ie[varname] or iv[varname] if not ((p and p ~= "") or (v and v ~= "")) then iv[varname] = default -- or environment? end end 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 -----------------------------------------------------------------
Hi all, Hans Hagen wrote:
currently only loading dfonts is implemented; the backend code in luatex has to be written yet (will happen soon)
A note for the brave: as of a few minutes ago, the luatex source (trunk) in the supelec.fr repository is capable of handling dfont files in the backend as well (you will also need the latest context beta, of course). There will be a normal luatex beta sometime next week, but it would be nice if some of the Mac-enabled people that know how to compile luatex, could try to see if it really works 'in the wild'. Best wishes, Taco
Am 14.08.2009 um 16:24 schrieb Taco Hoekwater:
There will be a normal luatex beta sometime next week, but it would be nice if some of the Mac-enabled people that know how to compile luatex, could try to see if it really works 'in the wild'.
The fonts are found $ mtxrun --script fonts --list --pattern=baskerville* baskerville Baskerville /Library/Fonts/ Baskerville.dfont (sub) baskervillebold Baskerville Bold /Library/Fonts/ Baskerville.dfont (sub) baskervillebolditalic Baskerville Bold Italic /Library/Fonts/ Baskerville.dfont (sub) baskervilleitalic Baskerville Italic /Library/Fonts/ Baskerville.dfont (sub) baskervillesemibold Baskerville SemiBold /Library/Fonts/ Baskerville.dfont (sub) baskervillesemibolditalic Baskerville SemiBold Italic /Library/Fonts/ Baskerville.dfont (sub) but this \starttext {\definedfont[name:baskerville*default]Baskerville} \stoptext fails !LuaTeX error: writefont.c: The file (/Library/Fonts/ Baskerville.dfont) does not contain font `Baskerville-2' ==> Fatal error occurred, no output PDF file produced! Wolfgang
Wolfgang Schuster wrote:
but this
\starttext {\definedfont[name:baskerville*default]Baskerville} \stoptext
fails
!LuaTeX error: writefont.c: The file (/Library/Fonts/Baskerville.dfont) does not contain font `Baskerville-2'
That is a somewhat weird font name. Can you run the code below to see that font name info it reports for that dfont file? \starttext \ctxlua { print( table.serialize( fontloader.info('/Library/Fonts/Baskerville.dfont')))} \stoptext Best wishes, Taco
Am 14.08.2009 um 17:28 schrieb Taco Hoekwater:
That is a somewhat weird font name. Can you run the code below to see that font name info it reports for that dfont file?
I get the same message with Optima, American Typewriter and Futura.
\starttext \ctxlua { print( table.serialize( fontloader.info('/Library/Fonts/Baskerville.dfont')))} \stoptext
t={ { ["familyname"]="Baskerville", ["fontname"]="Baskerville-Bold", ["fullname"]="Baskerville Bold", ["italicangle"]=0, ["version"]="6.0d2e1", ["weight"]="Bold", }, { ["familyname"]="Baskerville", ["fontname"]="Baskerville-SemiBold", ["fullname"]="Baskerville SemiBold", ["italicangle"]=0, ["version"]="6.0d2e1", ["weight"]="Demi", }, { ["familyname"]="Baskerville", ["fontname"]="Baskerville-SemiBoldItalic", ["fullname"]="Baskerville SemiBold Italic", ["italicangle"]=-17, ["version"]="6.0d2e1", ["weight"]="Demi", }, { ["familyname"]="Baskerville", ["fontname"]="Baskerville-Italic", ["fullname"]="Baskerville Italic", ["italicangle"]=-17, ["version"]="6.0d2e1", ["weight"]="Book", }, { ["familyname"]="Baskerville", ["fontname"]="Baskerville", ["fullname"]="Baskerville", ["italicangle"]=0, ["version"]="6.0d2e1", ["weight"]="Book", }, { ["familyname"]="Baskerville", ["fontname"]="Baskerville-BoldItalic", ["fullname"]="Baskerville Bold Italic", ["italicangle"]=-17, ["version"]="6.0d2e1", ["weight"]="Bold", }, } Wolfgang
participants (5)
-
Hans Hagen
-
Oliver Buerschaper
-
Taco Hoekwater
-
Thomas A. Schmitz
-
Wolfgang Schuster