LuaTeX finds font, mtxrun --fonts does not list it?
I'm trying to add a ttf font (Futura) so I can use it in ConTeXt. I've ran mtxrun --script fonts --list --all |less looked at a ttf font that was there, copied my Futura ttfs to the same directory it was in, and ran mtxrun --script fonts --reload --force But I still can't find it in mtxrun --script fonts --list --all |less nor can I use it in ConTeXt. (The filenames don't have spaces.) The curious thing is that the luatex cache has it. It's listed in /home/sandra/.texmf-var/luatex-cache/generic/names/luaotfload-names.luc under various names, all starting with "futuralt". Curiously, /home/sandra/.texmf-var/luatex-cache/context/[number]/fonts/otf/futuralt-book.tm[ac] exist. But the only "book-" related name in luaotfload-names.luc is futuraltbook, not futuralt-book. Neither worked in ConTeXt, though. How do I move forward with this, how do I add ttfs so that ConTeXt understand them? Sandra
On 5/27/2015 10:10 PM, Sandra Snan wrote:
I'm trying to add a ttf font (Futura) so I can use it in ConTeXt.
I've ran mtxrun --script fonts --list --all |less looked at a ttf font that was there, copied my Futura ttfs to the same directory it was in, and ran mtxrun --script fonts --reload --force
But I still can't find it in mtxrun --script fonts --list --all |less
nor can I use it in ConTeXt. (The filenames don't have spaces.)
The curious thing is that the luatex cache has it. It's listed in /home/sandra/.texmf-var/luatex-cache/generic/names/luaotfload-names.luc under various names, all starting with "futuralt".
Curiously, /home/sandra/.texmf-var/luatex-cache/context/[number]/fonts/otf/futuralt-book.tm[ac] exist.
But the only "book-" related name in luaotfload-names.luc is futuraltbook, not futuralt-book. Neither worked in ConTeXt, though.
How do I move forward with this, how do I add ttfs so that ConTeXt understand them?
when resolving fonts context makes safe filenames for fonts so don't worry about the - being gone the fact that there is a luc file means that the font has been loaded so the question is: how does your tex code look what happens if you put file: before a name? 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
when resolving fonts context makes safe filenames for fonts so don't worry about the - being gone
the fact that there is a luc file means that the font has been loaded so the question is: how does your tex code look
what happens if you put file: before a name?
Here is the full file. $body$ is filled in by pandoc. Sandra % interface output=luatex \usemodule[simplefonts][protrusion=quality,expansion=quality] \setupsimplefonts[expansion=quality,protrusion=quality] \setuppagenumbering[location=] \enableregime [utf-8] \setuppapersize[A4, portrait][A4, portrait] \setuplanguage[sv][leftquote=›,rightquote=‹,leftquotation=»,rightquotation=«] \mainlanguage [sv] \setupfontsynonym [Serif] [handling=pure] \usetypescript[serif][hanging][pure] \definefontfamily[futura][sans][file:futuralt] \definefontfamily [praise][serif][junicode] \setupalign[justified,hanging,hz] \usetypescript[serif,sans,mono][hz][quality] \setupbodyfont[praise] \setuphead[section][style={\switchtotypeface[futura]\tfd}] \starttext $body$ \stoptext
Am 28.05.2015 um 11:37 schrieb Sandra Snan
: Hans Hagen
writes: when resolving fonts context makes safe filenames for fonts so don't worry about the - being gone
the fact that there is a luc file means that the font has been loaded so the question is: how does your tex code look
what happens if you put file: before a name?
Here is the full file. $body$ is filled in by pandoc.
Sandra
% interface output=luatex \usemodule[simplefonts][protrusion=quality,expansion=quality] \setupsimplefonts[expansion=quality,protrusion=quality]
Don’t load the simplefonts module because you don’t need it when you use the \definefontfamily command.
\setuppagenumbering[location=] \enableregime [utf-8]
You can drop this line because ConTeXt uses UTF-8 as default encoding.
\setuppapersize[A4, portrait][A4, portrait]
There is no “portrait” keyword for the \setuppapersize and you can also drop this line because ConTeXt uses A4 as default paper size.
\setuplanguage[sv][leftquote=›,rightquote=‹,leftquotation=»,rightquotation=«] \mainlanguage [sv] \setupfontsynonym [Serif] [handling=pure] \usetypescript[serif][hanging][pure]
You can drop both lines because they are only used by MkII.
\definefontfamily[futura][sans][file:futuralt]
Don’t use the “file:” prefix in the third argument. \definefontfamily [futura] [sans] [Futura LT]
\definefontfamily [praise][serif][junicode]
\setupalign[justified,hanging,hz] \usetypescript[serif,sans,mono][hz][quality]
Remove the line above because it’s only used by MkII.
\setupbodyfont[praise] \setuphead[section][style={\switchtotypeface[futura]\tfd}] \starttext $body$ \stoptext
When you use math in your text you have to set a font for it. Wolfgang
Wolfgang Schuster
Am 28.05.2015 um 11:37 schrieb Sandra Snan
: what happens if you put file: before a name? \definefontfamily[futura][sans][file:futuralt]
Don’t use the “file:” prefix in the third argument.
I don't understand this exchange.
\setuppapersize[A4, portrait][A4, portrait]
There is no “portrait” keyword for the \setuppapersize and you can also drop this line because ConTeXt uses A4 as default paper size.
I was working from a template for A7 landscape that's why this was still in there. But a lot of the other stuff is just cargo-culted cruft and voodoo that has accumulated over the years of only rarely making new templates. Thank you for helping me clear it out. Here is the file now: % interface output=luatex \setuppagenumbering[location=] \setuplanguage[sv][leftquote=›,rightquote=‹,leftquotation=»,rightquotation=«] \mainlanguage [sv] \definefontfamily[futura][sans][Futura LT] \definefontfamily [praise][serif][junicode] \setupalign[justified,hanging,hz] \setupbodyfont[praise] \setuphead[section][style={\switchtotypeface[futura]}] \starttext $body$ \stoptext % Still no luck with the Futura.
For some reason, it just started working today. After all this time. I
have no idea what was going on.
\definefontfamily[jeans][sans][file:futuralt]
and then referring to to the font family "jeans" later on.
Looks great, too.
Sandra
Sandra Snan
Wolfgang Schuster
writes: Am 28.05.2015 um 11:37 schrieb Sandra Snan
: what happens if you put file: before a name? \definefontfamily[futura][sans][file:futuralt]
Don’t use the “file:” prefix in the third argument.
I don't understand this exchange.
\setuppapersize[A4, portrait][A4, portrait]
There is no “portrait” keyword for the \setuppapersize and you can also drop this line because ConTeXt uses A4 as default paper size.
I was working from a template for A7 landscape that's why this was still in there.
But a lot of the other stuff is just cargo-culted cruft and voodoo that has accumulated over the years of only rarely making new templates. Thank you for helping me clear it out.
Here is the file now:
% interface output=luatex \setuppagenumbering[location=] \setuplanguage[sv][leftquote=›,rightquote=‹,leftquotation=»,rightquotation=«] \mainlanguage [sv] \definefontfamily[futura][sans][Futura LT] \definefontfamily [praise][serif][junicode] \setupalign[justified,hanging,hz] \setupbodyfont[praise] \setuphead[section][style={\switchtotypeface[futura]}] \starttext $body$ \stoptext
% Still no luck with the Futura.
Sandra Snan mailto:sandra.snan@idiomdrottning.org 30. Mai 2016 um 14:25 For some reason, it just started working today. After all this time. I have no idea what was going on. \definefontfamily[jeans][sans][file:futuralt] and then referring to to the font family "jeans" later on. Looks great, too. The font declaration is still wrong and it’s more likely you get Latin Modern Sans in your document which is used as fallback when the requested sans serif font wasn’t found.
You can see in the attached document the output from the following example. Only the first font defintion loads Futura, the third falls back to Latin Modern because there is no font with the name “file:futura”. \definefontfamily[realfutura][ss][Futura] \definefontfamily[fakefutura][ss][Latin Modern Sans] \definefontfamily[filefutura][ss][file:futura] \starttext \switchtobodyfont[realfutura]Is this Futura or Latin Modern Sans? \switchtobodyfont[fakefutura]Is this Futura or Latin Modern Sans? \switchtobodyfont[filefutura]Is this Futura or Latin Modern Sans? \stoptext Wolfgang
participants (3)
-
Hans Hagen
-
Sandra Snan
-
Wolfgang Schuster