Dear list, ConTeXt Standalone in Windows uses the system font directory out of the box. In Linux, one needs to set OSFONTDIR to "/usr/share/fonts//". Since this is the default directory for fonts in Linux, wouldn’t it be possible to set it by default in ConTeXt Standalone for Linux? Many thanks for your help, Pablo -- http://www.ousia.tk
On Tue, Oct 15, 2013 at 7:44 PM, Pablo Rodriguez
Dear list,
ConTeXt Standalone in Windows uses the system font directory out of the box.
In Linux, one needs to set OSFONTDIR to "/usr/share/fonts//".
Since this is the default directory for fonts in Linux, wouldn’t it be possible to set it by default in ConTeXt Standalone for Linux?
imho, it's always better to keep separate "os system fonts" and context (or texlive). -- luigi
On 10/15/2013 08:46 PM, luigi scarso wrote:
On Tue, Oct 15, 2013 at 7:44 PM, Pablo Rodriguez wrote: [...] Since this is the default directory for fonts in Linux, wouldn’t it be possible to set it by default in ConTeXt Standalone for Linux?
imho, it's always better to keep separate "os system fonts" and context (or texlive).
Luigi, many thanks for your reply.
From you reply, I think I haven’t expressed myself right.
I mean adding the Linux option to the lines: do local osfontdir=osgetenv("OSFONTDIR") if osfontdir and osfontdir~="" then elseif osname=="windows" then ossetenv("OSFONTDIR","c:/windows/fonts//") elseif osname=="macosx" then ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//") + elseif osname=="linux" then + ossetenv("OSFONTDIR","$HOME/.fonts//;/usr/share/fonts//") end end So it would work out of the box also for Linux users. (Not sure whether this is right, I only guess so [and directory listing is by no means complete.) Many thanks for your help, Pablo -- http://www.ousia.tk
On Tue, 15 Oct 2013 21:53:20 +0200
Pablo Rodriguez
On 10/15/2013 08:46 PM, luigi scarso wrote:
On Tue, Oct 15, 2013 at 7:44 PM, Pablo Rodriguez wrote: [...] Since this is the default directory for fonts in Linux, wouldn’t it be possible to set it by default in ConTeXt Standalone for Linux?
imho, it's always better to keep separate "os system fonts" and context (or texlive).
Luigi,
many thanks for your reply.
From you reply, I think I haven’t expressed myself right.
I mean adding the Linux option to the lines:
do local osfontdir=osgetenv("OSFONTDIR") if osfontdir and osfontdir~="" then elseif osname=="windows" then ossetenv("OSFONTDIR","c:/windows/fonts//") elseif osname=="macosx" then
ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//") + elseif osname=="linux" then + ossetenv("OSFONTDIR","$HOME/.fonts//;/usr/share/fonts//") end end
So it would work out of the box also for Linux users. (Not sure whether this is right, I only guess so [and directory listing is by no means complete.)
On my system it is NOT /usr/share/fonts so this would be inappropriate. And, as Luigi suggested, it is not always a very good idea to mix OS system fonts and TeX fonts. Currently, the user can achieve this if desired by setting OSFONTDIR. Alan
On 10/15/2013 10:23 PM, Alan BRASLAU wrote:
[...] On my system it is NOT /usr/share/fonts so this would be inappropriate.
Thanks for your reply, Alan. I must be missing something, because I think that adding /usr/share/fonts to your system would be simply ineffective.
And, as Luigi suggested, it is not always a very good idea to mix OS system fonts and TeX fonts. Currently, the user can achieve this if desired by setting OSFONTDIR.
Sorry, but I don’t get what you mean (neither I got what Luigi meant). I don’t mix system and TeX fonts. I mainly use system fonts with ConTeXt. I still don’t understand what could be wrong in using system fonts in ConTeXt (or mixing them with the ones that come in ConTeXt Standalone). I simply don’t get why OSFONTDIR is set for Windows and MacOSX users and not for Linux users. Which is the reason for this difference? Many thanks for your help, Pablo -- http://www.ousia.tk
On 10/15/2013 11:15 PM, Pablo Rodriguez wrote:
On 10/15/2013 10:23 PM, Alan BRASLAU wrote:
[...] On my system it is NOT /usr/share/fonts so this would be inappropriate.
Thanks for your reply, Alan.
I must be missing something, because I think that adding /usr/share/fonts to your system would be simply ineffective.
And, as Luigi suggested, it is not always a very good idea to mix OS system fonts and TeX fonts. Currently, the user can achieve this if desired by setting OSFONTDIR.
Sorry, but I don’t get what you mean (neither I got what Luigi meant).
I don’t mix system and TeX fonts. I mainly use system fonts with ConTeXt.
I still don’t understand what could be wrong in using system fonts in ConTeXt (or mixing them with the ones that come in ConTeXt Standalone).
I simply don’t get why OSFONTDIR is set for Windows and MacOSX users and not for Linux users.
Which is the reason for this difference?
because on windows it's standardized and on linux it isn't so we would end up in discussions about the right setting (and indeed we already had those discussions) 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 -----------------------------------------------------------------
Hi Everybody,
Please excuse my ignorance of 'linux' and ConTeXt gathering of fonts.
I understand that linux is not linux and unix is not unix.
My question is what would happen if a path in OSFONTDIR does not exist?
If the path is gracefully ignored and the overhead is not to great maybe we
could add some of the more common locations of the more common (l)unixes.
Also, is there a utility to gather fonts in X11 or other GUIs that finds the fonts on a system?
Maybe that can be leveraged.
Just a thought.
regards
Keith.
Am 15.10.2013 um 23:50 schrieb Hans Hagen
On 10/15/2013 11:15 PM, Pablo Rodriguez wrote:
On 10/15/2013 10:23 PM, Alan BRASLAU wrote:
[...] On my system it is NOT /usr/share/fonts so this would be inappropriate.
Thanks for your reply, Alan.
I must be missing something, because I think that adding /usr/share/fonts to your system would be simply ineffective.
And, as Luigi suggested, it is not always a very good idea to mix OS system fonts and TeX fonts. Currently, the user can achieve this if desired by setting OSFONTDIR.
Sorry, but I don’t get what you mean (neither I got what Luigi meant).
I don’t mix system and TeX fonts. I mainly use system fonts with ConTeXt.
I still don’t understand what could be wrong in using system fonts in ConTeXt (or mixing them with the ones that come in ConTeXt Standalone).
I simply don’t get why OSFONTDIR is set for Windows and MacOSX users and not for Linux users.
Which is the reason for this difference?
because on windows it's standardized and on linux it isn't so we would end up in discussions about the right setting (and indeed we already had those discussions)
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 ___________________________________________________________________________________
On 10/15/2013 11:50 PM, Hans Hagen wrote:
On 10/15/2013 11:15 PM, Pablo Rodriguez wrote:
[...] I simply don’t get why OSFONTDIR is set for Windows and MacOSX users and not for Linux users.
Which is the reason for this difference?
because on windows it's standardized and on linux it isn't so we would end up in discussions about the right setting (and indeed we already had those discussions)
Many thanks for your reply, Hans. Wouldn’t it be possible to set more than one directory for Linux? (MacOSX has more than one.) I want to avoid a discussion on orthodox settings for system font directory in Linux (it’s beyond both my knowledge and my interests). But specifying more than a directory could fix the issue. Many thanks for your help, Pablo -- http://www.ousia.tk
On 10/16/2013 9:47 PM, Pablo Rodriguez wrote:
On 10/15/2013 11:50 PM, Hans Hagen wrote:
On 10/15/2013 11:15 PM, Pablo Rodriguez wrote:
[...] I simply don’t get why OSFONTDIR is set for Windows and MacOSX users and not for Linux users.
Which is the reason for this difference?
because on windows it's standardized and on linux it isn't so we would end up in discussions about the right setting (and indeed we already had those discussions)
Many thanks for your reply, Hans.
Wouldn’t it be possible to set more than one directory for Linux? (MacOSX has more than one.)
That should work already. Also, the fontconfig environment variable si used.
I want to avoid a discussion on orthodox settings for system font directory in Linux (it’s beyond both my knowledge and my interests). But specifying more than a directory could fix the issue.
Maybe ... we like to minimize the amount of useless file access, for instance a (not connected) network path could slow down a run (each run).
Many thanks for your help,
What does \starttext \ctxlua{inspect(fonts.names.getpaths())} \stoptext show on the console? 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 -----------------------------------------------------------------
On 10/17/2013 09:55 AM, Hans Hagen wrote:
What does
\starttext \ctxlua{inspect(fonts.names.getpaths())} \stoptext
show on the console?
fonts > names > 'OSFONTDIR' specifies path '/usr/share/fonts' table={ "/usr/share/fonts", } ) ) with the OSFONTDIR set by me. And after updating the beta and not setting OSFONTDIR: fonts > otf loading > preprocessing and caching time 0.167, packtime 0.050 fonts > 'fallback modern rm 12pt' is loaded table={ } ) ) Many thanks for your reply, Pablo -- http://www.ousia.tk
participants (5)
-
Alan BRASLAU
-
Hans Hagen
-
Keith J. Schultz
-
luigi scarso
-
Pablo Rodriguez