ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* OSFONTDIR in ConTeXt Standalone
@ 2013-10-15 17:44 Pablo Rodriguez
  2013-10-15 18:46 ` luigi scarso
  0 siblings, 1 reply; 10+ messages in thread
From: Pablo Rodriguez @ 2013-10-15 17:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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] 10+ messages in thread

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-15 17:44 OSFONTDIR in ConTeXt Standalone Pablo Rodriguez
@ 2013-10-15 18:46 ` luigi scarso
  2013-10-15 19:53   ` Pablo Rodriguez
  0 siblings, 1 reply; 10+ messages in thread
From: luigi scarso @ 2013-10-15 18:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Tue, Oct 15, 2013 at 7:44 PM, Pablo Rodriguez <oinos@gmx.es> wrote:

> 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

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

[-- Attachment #2: 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] 10+ messages in thread

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-15 18:46 ` luigi scarso
@ 2013-10-15 19:53   ` Pablo Rodriguez
  2013-10-15 20:23     ` Alan BRASLAU
  0 siblings, 1 reply; 10+ messages in thread
From: Pablo Rodriguez @ 2013-10-15 19:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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] 10+ messages in thread

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-15 19:53   ` Pablo Rodriguez
@ 2013-10-15 20:23     ` Alan BRASLAU
  2013-10-15 21:15       ` Pablo Rodriguez
  0 siblings, 1 reply; 10+ messages in thread
From: Alan BRASLAU @ 2013-10-15 20:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: oinos

On Tue, 15 Oct 2013 21:53:20 +0200
Pablo Rodriguez <oinos@gmx.es> wrote:

> 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
___________________________________________________________________________________
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] 10+ messages in thread

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-15 20:23     ` Alan BRASLAU
@ 2013-10-15 21:15       ` Pablo Rodriguez
  2013-10-15 21:50         ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Pablo Rodriguez @ 2013-10-15 21:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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] 10+ messages in thread

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-15 21:15       ` Pablo Rodriguez
@ 2013-10-15 21:50         ` Hans Hagen
  2013-10-16  8:19           ` Keith J. Schultz
  2013-10-16 19:47           ` Pablo Rodriguez
  0 siblings, 2 replies; 10+ messages in thread
From: Hans Hagen @ 2013-10-15 21:50 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

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

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-15 21:50         ` Hans Hagen
@ 2013-10-16  8:19           ` Keith J. Schultz
  2013-10-16 19:47           ` Pablo Rodriguez
  1 sibling, 0 replies; 10+ messages in thread
From: Keith J. Schultz @ 2013-10-16  8:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <pragma@wxs.nl>:

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

___________________________________________________________________________________
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] 10+ messages in thread

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-15 21:50         ` Hans Hagen
  2013-10-16  8:19           ` Keith J. Schultz
@ 2013-10-16 19:47           ` Pablo Rodriguez
  2013-10-17  7:55             ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Pablo Rodriguez @ 2013-10-16 19:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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] 10+ messages in thread

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-16 19:47           ` Pablo Rodriguez
@ 2013-10-17  7:55             ` Hans Hagen
  2013-10-17 15:07               ` Pablo Rodriguez
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2013-10-17  7:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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] 10+ messages in thread

* Re: OSFONTDIR in ConTeXt Standalone
  2013-10-17  7:55             ` Hans Hagen
@ 2013-10-17 15:07               ` Pablo Rodriguez
  0 siblings, 0 replies; 10+ messages in thread
From: Pablo Rodriguez @ 2013-10-17 15:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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] 10+ messages in thread

end of thread, other threads:[~2013-10-17 15:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-15 17:44 OSFONTDIR in ConTeXt Standalone Pablo Rodriguez
2013-10-15 18:46 ` luigi scarso
2013-10-15 19:53   ` Pablo Rodriguez
2013-10-15 20:23     ` Alan BRASLAU
2013-10-15 21:15       ` Pablo Rodriguez
2013-10-15 21:50         ` Hans Hagen
2013-10-16  8:19           ` Keith J. Schultz
2013-10-16 19:47           ` Pablo Rodriguez
2013-10-17  7:55             ` Hans Hagen
2013-10-17 15:07               ` Pablo Rodriguez

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).