How to add a font folder with local fonts?
How can I add a simple folder (not a texmf tree) with opentype or truetype fonts to the search path of context? I have tried with a local texmfcnf.lua and return { content = { variables = { OPENTYPEFONTS = ".;D:/myfonts//;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR", }, }, } but while `mtxrun --expand-var` reports the new value the folder is ignored when I run `mtxrun --script fonts --reload`. (Side remark: I found some small problems in mtxrun while testing: mtxrun and also the wiki give as an example mtxrun --script font --list somename but correct would imho be mtxrun --script fonts --list somename Also I would have expected that "mtxrun --script base --expand-var VAR" works, but actually I needed "mtxrun --expand-var VAR".) -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 10/9/2017 4:09 PM, Ulrike Fischer wrote:
How can I add a simple folder (not a texmf tree) with opentype or truetype fonts to the search path of context?
I have tried with a local texmfcnf.lua and
return { content = { variables = { OPENTYPEFONTS = ".;D:/myfonts//;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR", }, }, }
context doesn't look at those variables, it looks for fonts in: (1) the tree i.e. the file database (in the order: otf, ttf, ttc, afm) (2) in OSFONTDIR (3) i the fonts.conf xml file (never used that one myself) and I'll add (4) EXTRAFONTS for you to play with (although you can also add the path to OSFONTDIR for testing). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am Mon, 9 Oct 2017 21:48:39 +0200 schrieb Hans Hagen:
On 10/9/2017 4:09 PM, Ulrike Fischer wrote:
How can I add a simple folder (not a texmf tree) with opentype or truetype fonts to the search path of context?
I have tried with a local texmfcnf.lua and
return { content = { variables = { OPENTYPEFONTS = ".;D:/myfonts//;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR", }, }, }
context doesn't look at those variables, it looks for fonts in:
(1) the tree i.e. the file database (in the order: otf, ttf, ttc, afm) (2) in OSFONTDIR
I don't want something "systemwide". I have too many texsystems and don't want side-effects (actually I want context to see the texlive fonts, to make test easier). I can set OSFONTDIR only for context, but it would be a bit tricky.
(3) i the fonts.conf xml file (never used that one myself)
Is there a context specific fontconfig (I'm on windows, so don't have a system fontconfig)
and I'll add
(4) EXTRAFONTS
for you to play with (although you can also add the path to OSFONTDIR for testing).
Thanks. That would be the easiest (and cleanest). I will wait for the next update. -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 10/9/2017 10:37 PM, Ulrike Fischer wrote:
Am Mon, 9 Oct 2017 21:48:39 +0200 schrieb Hans Hagen:
On 10/9/2017 4:09 PM, Ulrike Fischer wrote:
How can I add a simple folder (not a texmf tree) with opentype or truetype fonts to the search path of context?
I have tried with a local texmfcnf.lua and
return { content = { variables = { OPENTYPEFONTS = ".;D:/myfonts//;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR", }, }, }
context doesn't look at those variables, it looks for fonts in:
(1) the tree i.e. the file database (in the order: otf, ttf, ttc, afm) (2) in OSFONTDIR
I don't want something "systemwide". I have too many texsystems and don't want side-effects (actually I want context to see the texlive fonts, to make test easier).
I can set OSFONTDIR only for context, but it would be a bit tricky.
(3) i the fonts.conf xml file (never used that one myself)
Is there a context specific fontconfig (I'm on windows, so don't have a system fontconfig)
no, and apart from testing it years ago i never used it myself (i'm on windows too and even on the linux boxes i put all fonts in texmf-fonts/fonts/data)
and I'll add
(4) EXTRAFONTS
for you to play with (although you can also add the path to OSFONTDIR for testing).
Thanks. That would be the easiest (and cleanest). I will wait for the next update.
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am 2017-10-09 um 22:37 schrieb Ulrike Fischer
(2) in OSFONTDIR
I don't want something "systemwide". I have too many texsystems and don't want side-effects (actually I want context to see the texlive fonts, to make test easier).
I can set OSFONTDIR only for context, but it would be a bit tricky.
Hm, I’m used to setup/make scripts per project, setting some path works well with that. Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
Am Tue, 10 Oct 2017 11:31:15 +0200 schrieb Henning Hraban Ramm:
I can set OSFONTDIR only for context, but it would be a bit tricky.
Hm, I’m used to setup/make scripts per project, setting some path works well with that.
The tricky part is to fit it in my current configuration system. I share configuration between two PC and so adding things which should have an effect only on one of them needs (due to different pathes) always a bit thinking -- not impossible and not so difficult but a bit tricky ;-). So adjusting a local file would be easier. -- Ulrike Fischer http://www.troubleshooting-tex.de/
you might consider using git easy to keep track of your data and to share / clone the latest state. .F
On 10 Oct 2017, at 12:25, Ulrike Fischer
wrote: Am Tue, 10 Oct 2017 11:31:15 +0200 schrieb Henning Hraban Ramm:
I can set OSFONTDIR only for context, but it would be a bit tricky.
Hm, I’m used to setup/make scripts per project, setting some path works well with that.
The tricky part is to fit it in my current configuration system. I share configuration between two PC and so adding things which should have an effect only on one of them needs (due to different pathes) always a bit thinking -- not impossible and not so difficult but a bit tricky ;-). So adjusting a local file would be easier.
-- Ulrike Fischer http://www.troubleshooting-tex.de/
___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am Tue, 10 Oct 2017 13:34:02 +0200 schrieb Floris van Manen:
you might consider using git easy to keep track of your data and to share / clone the latest state.
I use git. But on two Computer there are always some settings that you don't want to share e.g. on the one texlive is in D:\texlive and on the other in C:\users\...\texlive. And the relative pathes between context and texlive are different too. -- Ulrike Fischer http://www.troubleshooting-tex.de/
Am 2017-10-09 um 16:09 schrieb Ulrike Fischer
How can I add a simple folder (not a texmf tree) with opentype or truetype fonts to the search path of context?
The official way is to set OSFONTDIR like any other PATH. ConTeXt also recognizes fontconfig fonts.conf files (https://en.wikipedia.org/wiki/Fontconfig). Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
participants (4)
-
Floris van Manen
-
Hans Hagen
-
Henning Hraban Ramm
-
Ulrike Fischer