ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* LuaTeX finds font, mtxrun --fonts does not list it?
@ 2015-05-27 20:10 Sandra Snan
  2015-05-28  7:28 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Sandra Snan @ 2015-05-27 20:10 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LuaTeX finds font, mtxrun --fonts does not list it?
  2015-05-27 20:10 LuaTeX finds font, mtxrun --fonts does not list it? Sandra Snan
@ 2015-05-28  7:28 ` Hans Hagen
  2015-05-28  9:37   ` Sandra Snan
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2015-05-28  7:28 UTC (permalink / raw)
  To: ntg-context

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LuaTeX finds font, mtxrun --fonts does not list it?
  2015-05-28  7:28 ` Hans Hagen
@ 2015-05-28  9:37   ` Sandra Snan
  2015-05-28 10:38     ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Sandra Snan @ 2015-05-28  9:37 UTC (permalink / raw)
  To: Hans Hagen, ntg-context

Hans Hagen <pragma@wxs.nl> 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]
\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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LuaTeX finds font, mtxrun --fonts does not list it?
  2015-05-28  9:37   ` Sandra Snan
@ 2015-05-28 10:38     ` Wolfgang Schuster
  2015-05-29  7:39       ` Sandra Snan
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-05-28 10:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 28.05.2015 um 11:37 schrieb Sandra Snan <sandra.snan@idiomdrottning.org>:
> 
> Hans Hagen <pragma@wxs.nl> 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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LuaTeX finds font, mtxrun --fonts does not list it?
  2015-05-28 10:38     ` Wolfgang Schuster
@ 2015-05-29  7:39       ` Sandra Snan
  2016-05-30 12:25         ` Sandra Snan
  0 siblings, 1 reply; 7+ messages in thread
From: Sandra Snan @ 2015-05-29  7:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster <schuster.wolfgang@gmail.com> writes:

>> Am 28.05.2015 um 11:37 schrieb Sandra Snan <sandra.snan@idiomdrottning.org>:
>>> 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.
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LuaTeX finds font, mtxrun --fonts does not list it?
  2015-05-29  7:39       ` Sandra Snan
@ 2016-05-30 12:25         ` Sandra Snan
  2016-05-31  5:01           ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Sandra Snan @ 2016-05-30 12:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <sandra.snan@idiomdrottning.org> writes:

> Wolfgang Schuster <schuster.wolfgang@gmail.com> writes:
>
>>> Am 28.05.2015 um 11:37 schrieb Sandra Snan <sandra.snan@idiomdrottning.org>:
>>>> 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.
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LuaTeX finds font, mtxrun --fonts does not list it?
  2016-05-30 12:25         ` Sandra Snan
@ 2016-05-31  5:01           ` Wolfgang Schuster
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2016-05-31  5:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1122 bytes --]

> 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

[-- Attachment #1.2: Type: text/html, Size: 2370 bytes --]

[-- Attachment #2: futura.pdf --]
[-- Type: application/pdf, Size: 11268 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-31  5:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 20:10 LuaTeX finds font, mtxrun --fonts does not list it? Sandra Snan
2015-05-28  7:28 ` Hans Hagen
2015-05-28  9:37   ` Sandra Snan
2015-05-28 10:38     ` Wolfgang Schuster
2015-05-29  7:39       ` Sandra Snan
2016-05-30 12:25         ` Sandra Snan
2016-05-31  5:01           ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).