[NTG-context] Problem using the new buildin simplefont \definefontfamily with OTF fonts

Wolfgang Schuster schuster.wolfgang at gmail.com
Sun Mar 9 23:12:26 CET 2014


Am 07.03.2014 um 14:35 schrieb 罗晨星 <chenxing.luo at gmail.com>:

> I am using Ubuntu 13.10 with ConTeXt daily build and LuaTeX daily build. My ConTeXt version is 2014.02.14 17:07, LuaTeX version beta-0.78.3 (TeX Live 2014/dev/Debian) (rev 4850) .
> 
> While there are some problems with using the newly added feature of build-in support of simplefonts.
> 
> I was using something like 
> 
> \definefontfamily[mainface][serif][Kepler]
> \setupbodyfont[mainface]
> \starttext
> Hello World!
> \stoptext
> 
> It would end up with using Latin Modern font.
> 
> The log is like this:
> 
> system > 'cont-new.mkiv' loaded
> (/usr/share/texmf/tex/context/base/cont-new.mkiv)
> system > files > jobname '003', input './003', result '003'
> fonts > latin modern fonts are not preloaded
> languages > language 'en' is active
> (/home/alan/tex/test/003.tex
> fonts > preloading latin modern fonts (math)
> {/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
> fonts > 'fallback modern mm 12pt' is loaded
> fonts > preloading latin modern fonts (mono)
> fonts > 'fallback modern tt 12pt' is loaded
> fonts > defining > font with asked name 'unknown' is not found using lookup 'file'
> fonts > defining > unknown font 'unknown', loading aborted
> fonts > defining > unable to define 'unknown' as 'mainface-12pt-rm-tf-0--0'
> backend > xmp > using file '/usr/share/texmf/tex/context/base/lpdf-pdx.xml'
> 
> However, when I use something like Times New Roman (TTF), Utopia (TTF), Georgia(TTF), FZShuSong-Z01 (TTF Chinese font) it would be working all right, fonts applied, no error reported.
> 
> But like in the example, Kepler (OTF), Minion Pro (OTF), Utopia Std (OTF) would failed to be applied. It is as if it would fail every OTF font.
> 
> When I am using some font in the legacy simplefonts module mode, something like:
> 
> \usemodule[simplefonts]
> \setmainfont[Kepler]
> \starttext
> Hello World!
> \stoptext
> 
> Would be working alright. Logged as below:
> 
> fonts > latin modern fonts are not preloaded
> languages > language 'en' is active
> (/home/alan/tex/test/003.tex
> resolvers > modules > 'simplefonts' is loaded
> (/usr/share/texmf/tex/context/third/simplefonts/t-simplefonts.mkiv
> loading > ConTeXt User Module / Simplefonts
> <+ /usr/share/texmf/tex/context/third/simplefonts/t-simplefonts.lua>){/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
> backend > xmp > using file '/usr/share/texmf/tex/context/base/lpdf-pdx.xml'
> pages > flushing realpage 1, userpage 1
>  ) )</home/alan/.fonts/KeplerStd-Subh.otf>
> 
> So what's the problem? Is there anything I should look into?
> 
> If it is a problem with TeXLive how can I use the ConTeXt Standalone without conflict with the previous installed TeXLive (Since I am also using LaTeX) ?

1. Make sure context has added the fonts to its database, you can check this for the minion pro fonts with the following command:

    mtxrun --script fonts --list --all minionpro*

When you don’t see a list with the file for the minion pro font you can try to update the database with

    mtxrun --script fonts --refresh

2. Use the correct name in the third argument of \definefontfamily, e.g. “Kepler” has to be replaced with “Kepler Std”.

Wolfgang



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140309/ff087f33/attachment.html>


More information about the ntg-context mailing list