ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Font recognition with command "context", but not with command "texexec"
@ 2012-07-28 19:11 Martin Rimmler
  2012-07-29  7:34 ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Rimmler @ 2012-07-28 19:11 UTC (permalink / raw)
  To: ntg-context


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

Hi,

this might be a very simple problem, but I tried to figure it out for 
some time now without success. Reading manuals, searching with Google, 
etc. did not help. So if it actually is very simple, I herewith 
apologize. I really tried to solve it without the mailing list.

Here is the Problem:
The command "texexec" ignores the bodyfont setup. When I process the 
following code

     \setupbodyfont[gentium]

     \starttext
     This little text is enough to demonstrate the problem.
     \stoptext

with the command "texexec /filename/", the default font is used. Only 
when i use the command "context/filename/.tex", context uses the font 
gentium.
The gentium font is a truetype font and stored on my system under 
/usr/share/fonts.
I use Linux Mint Debian Edition 201204. My .bashrc file contains the 
following line:

     export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts;/usr/share/fonts"

I use the standalone version of context with pdftex. The command 
\contextversion returns "2012.07.27 16:41", i.e. the time I last updated it.

Using the mkiv switch did not help.

     texexec mkiv /filename/


Any comments are welcome.
Best,

martin


[-- Attachment #1.2: Type: text/html, Size: 1713 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] 9+ messages in thread

* Re: Font recognition with command "context", but not with command "texexec"
  2012-07-28 19:11 Font recognition with command "context", but not with command "texexec" Martin Rimmler
@ 2012-07-29  7:34 ` Wolfgang Schuster
  2012-07-29 13:39   ` Bill Meahan
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2012-07-29  7:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Am 28.07.2012 um 21:11 schrieb Martin Rimmler <martin.rimmler@googlemail.com>:

> Hi,
> 
> this might be a very simple problem, but I tried to figure it out for some time now without success. Reading manuals, searching with Google, etc. did not help. So if it actually is very simple, I herewith apologize. I really tried to solve it without the mailing list.
> 
> Here is the Problem:
> The command "texexec" ignores the bodyfont setup. When I process the following code
> 
>     \setupbodyfont[gentium]
> 
>     \starttext
>     This little text is enough to demonstrate the problem.
>     \stoptext
> 
> with the command "texexec filename", the default font is used. Only when i use the command "context filename.tex", context uses the font gentium. 
> The gentium font is a truetype font and stored on my system under /usr/share/fonts.
> I use Linux Mint Debian Edition 201204. My .bashrc file contains the following line:
> 
>     export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts;/usr/share/fonts"
> 
> I use the standalone version of context with pdftex. The command \contextversion returns "2012.07.27 16:41", i.e. the time I last updated it.
> 
> Using the mkiv switch did not help.
> 
>     texexec mkiv filename
> 
> 
> Any comments are welcome.

For MkII you have to load the typescript file and the typescript yourself while for MkIV these two steps are done together with the \setupbodyfont command when the name for the typeface, typescript and file is the same (e.g. gentium and type-gentium).

\usetypescriptfile[type-gentium]
\usetypescript[gentium][texnansi]
\setupbodyfont[gentium]

\starttext
This little text is enough to demonstrate the problem.
\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 2648 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] 9+ messages in thread

* Re: Font recognition with command "context", but not with command "texexec"
  2012-07-29  7:34 ` Wolfgang Schuster
@ 2012-07-29 13:39   ` Bill Meahan
  2012-07-29 20:36     ` Mojca Miklavec
  0 siblings, 1 reply; 9+ messages in thread
From: Bill Meahan @ 2012-07-29 13:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On 07/29/2012 03:34 AM, Wolfgang Schuster wrote:
>
> For MkII you have to load the typescript file and the typescript
> yourself while for MkIV these two steps are done together with the
> \setupbodyfont command when the name for the typeface, typescript and
> file is the same (e.g. gentium and type-gentium).
>
> \usetypescriptfile[type-gentium]
> \usetypescript[gentium][texnansi]
> \setupbodyfont[gentium]
>
> \starttext
> This little text is enough to demonstrate the problem.
> \stoptext
>
> Wolfgang
>

Just curious: will ConTeXt use the fontconfig mechanism some day or are 
there technical/philosophical reasons not to?


-- 
Bill Meahan, Westland, Michigan USA

“Writing is a combination of intangible
   creative fantasy and appallingly
   hard work.”

           —Anthony Powell


This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4933 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] 9+ messages in thread

* Re: Font recognition with command "context", but not with command "texexec"
  2012-07-29 13:39   ` Bill Meahan
@ 2012-07-29 20:36     ` Mojca Miklavec
  2012-07-29 23:05       ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2012-07-29 20:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Jul 29, 2012 at 3:39 PM, Bill Meahan wrote:
>
> Just curious: will ConTeXt use the fontconfig mechanism some day or are
> there technical/philosophical reasons not to?

Do you mean MKII or MKIV? For MKII the answer is no. MKIV can - to a
certain extent - read and interpret fontconfig's XML configuration
file. The real question is whether ConTeXt finds the right file. On
windows there is fonts.conf used by XeTeX and it might be that MKIV
reads that file, but I'm not sure.

There is no seriously technical reason, it's more that developers
aren't too eager to have dependencies on external libraries. And the
fact that at least on Windows and Mac the system fonts are being
searched for on their standard locations.

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

* Re: Font recognition with command "context", but not with command "texexec"
  2012-07-29 20:36     ` Mojca Miklavec
@ 2012-07-29 23:05       ` Hans Hagen
  2012-07-30  7:50         ` Mojca Miklavec
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2012-07-29 23:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

On 29-7-2012 22:36, Mojca Miklavec wrote:
> On Sun, Jul 29, 2012 at 3:39 PM, Bill Meahan wrote:
>>
>> Just curious: will ConTeXt use the fontconfig mechanism some day or are
>> there technical/philosophical reasons not to?
>
> Do you mean MKII or MKIV? For MKII the answer is no. MKIV can - to a
> certain extent - read and interpret fontconfig's XML configuration
> file. The real question is whether ConTeXt finds the right file. On
> windows there is fonts.conf used by XeTeX and it might be that MKIV
> reads that file, but I'm not sure.

Last time I checked (more than a year ago) it did read that file. You 
can check that with

\enabletrackers[fonts.names]

when the database is generated.

> There is no seriously technical reason, it's more that developers
> aren't too eager to have dependencies on external libraries. And the
> fact that at least on Windows and Mac the system fonts are being
> searched for on their standard locations.

Or: "the developers never check that as they don't depend on system 
fonts in projects" (I always copy font files to known locations i.e. 
texmf-fonts).

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

* Re: Font recognition with command "context", but not with command "texexec"
  2012-07-29 23:05       ` Hans Hagen
@ 2012-07-30  7:50         ` Mojca Miklavec
  2012-07-30  9:06           ` Khaled Hosny
  0 siblings, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2012-07-30  7:50 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Mon, Jul 30, 2012 at 1:05 AM, Hans Hagen wrote:
> On 29-7-2012 22:36, Mojca Miklavec wrote:
>>
>> For MKII the answer is no. MKIV can - to a
>> certain extent - read and interpret fontconfig's XML configuration
>> file. The real question is whether ConTeXt finds the right file. On
>> windows there is fonts.conf used by XeTeX and it might be that MKIV
>> reads that file, but I'm not sure.
>
>
> Last time I checked (more than a year ago) it did read that file.

What I have in mind is that it's far from being trivial to find the
right fonts.conf, on linux in particular. On my mac I have:

/Applications/Gimp.app/Contents/Resources/etc/fonts/fonts.conf
/Applications/MPlayer OSX Extended.app/Contents/Resources/fonts/fonts.conf
/opt/local/etc/fonts/fonts.conf
/usr/X11/lib/X11/fontconfig/conf.avail/05-osx-fonts.conf
/usr/X11/lib/X11/fontconfig/conf.d/05-osx-fonts.conf
/usr/X11/lib/X11/fontconfig/fonts.conf

So feel free to guess which one to use ;)

I believe that one should at least consider
/usr/X11/lib/X11/fontconfig/fonts.conf &
/usr/X11/lib/X11/fontconfig/conf.d/05-osx-fonts.conf in my case, but
there is no "include the other file", so ConTeXt would actually have
to start reading both. The first two files are bundled with
applications (Gimp, MPlayer) and aso have their own caches & their own
settings, so when users start messing and configuring the system-wide
settings, those two applications won't obey those anyway.

One has to set at least the variable
    FONTCONFIG_PATH
which means that it won't work out of the box, in which case one can
just as well set OSFONTDIR directly.

I think that I asked Fedora packagers to set FONTCONFIG_PATH in their
distribution though.

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

* Re: Font recognition with command "context", but not with command "texexec"
  2012-07-30  7:50         ` Mojca Miklavec
@ 2012-07-30  9:06           ` Khaled Hosny
  2012-07-30  9:16             ` Mojca Miklavec
  0 siblings, 1 reply; 9+ messages in thread
From: Khaled Hosny @ 2012-07-30  9:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On Mon, Jul 30, 2012 at 09:50:44AM +0200, Mojca Miklavec wrote:
> On Mon, Jul 30, 2012 at 1:05 AM, Hans Hagen wrote:
> > On 29-7-2012 22:36, Mojca Miklavec wrote:
> >>
> >> For MKII the answer is no. MKIV can - to a
> >> certain extent - read and interpret fontconfig's XML configuration
> >> file. The real question is whether ConTeXt finds the right file. On
> >> windows there is fonts.conf used by XeTeX and it might be that MKIV
> >> reads that file, but I'm not sure.
> >
> >
> > Last time I checked (more than a year ago) it did read that file.
> 
> What I have in mind is that it's far from being trivial to find the
> right fonts.conf, on linux in particular. On my mac I have:
> 
> /Applications/Gimp.app/Contents/Resources/etc/fonts/fonts.conf
> /Applications/MPlayer OSX Extended.app/Contents/Resources/fonts/fonts.conf
> /opt/local/etc/fonts/fonts.conf
> /usr/X11/lib/X11/fontconfig/conf.avail/05-osx-fonts.conf
> /usr/X11/lib/X11/fontconfig/conf.d/05-osx-fonts.conf
> /usr/X11/lib/X11/fontconfig/fonts.conf
> 
> So feel free to guess which one to use ;)
> 
> I believe that one should at least consider
> /usr/X11/lib/X11/fontconfig/fonts.conf &
> /usr/X11/lib/X11/fontconfig/conf.d/05-osx-fonts.conf in my case, but
> there is no "include the other file", so ConTeXt would actually have
> to start reading both.

fonts.conf should have something like:

<include ignore_missing="yes">conf.d</include>

no? Here it does, otherwise fontconfig itself has no way of reading
other files. But the whole thing is tricky, because the default path to
the root fonts.conf file is set into libfontconfig at build time,
ConTeXt has no way of knowing that, short of linking to libfontconfig.

> The first two files are bundled with applications (Gimp, MPlayer) and
> aso have their own caches & their own settings, so when users start
> messing and configuring the system-wide settings, those two
> applications won't obey those anyway.

Which is very pointless, there should be only one fontconfig installed
system wide, but that mac anyway :)

Regards,
 Khaled
___________________________________________________________________________________
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] 9+ messages in thread

* Re: Font recognition with command "context", but not with command "texexec"
  2012-07-30  9:06           ` Khaled Hosny
@ 2012-07-30  9:16             ` Mojca Miklavec
  2012-07-30 10:31               ` Khaled Hosny
  0 siblings, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2012-07-30  9:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On Mon, Jul 30, 2012 at 11:06 AM, Khaled Hosny wrote:
> On Mon, Jul 30, 2012 at 09:50:44AM +0200, Mojca Miklavec wrote:
>> On Mon, Jul 30, 2012 at 1:05 AM, Hans Hagen wrote:
>> > On 29-7-2012 22:36, Mojca Miklavec wrote:
>> >>
>> >> For MKII the answer is no. MKIV can - to a
>> >> certain extent - read and interpret fontconfig's XML configuration
>> >> file. The real question is whether ConTeXt finds the right file. On
>> >> windows there is fonts.conf used by XeTeX and it might be that MKIV
>> >> reads that file, but I'm not sure.
>> >
>> >
>> > Last time I checked (more than a year ago) it did read that file.
>>
>> What I have in mind is that it's far from being trivial to find the
>> right fonts.conf, on linux in particular. On my mac I have:
>>
>> /Applications/Gimp.app/Contents/Resources/etc/fonts/fonts.conf
>> /Applications/MPlayer OSX Extended.app/Contents/Resources/fonts/fonts.conf
>> /opt/local/etc/fonts/fonts.conf
>> /usr/X11/lib/X11/fontconfig/conf.avail/05-osx-fonts.conf
>> /usr/X11/lib/X11/fontconfig/conf.d/05-osx-fonts.conf
>> /usr/X11/lib/X11/fontconfig/fonts.conf
>>
>> So feel free to guess which one to use ;)
>>
>> I believe that one should at least consider
>> /usr/X11/lib/X11/fontconfig/fonts.conf &
>> /usr/X11/lib/X11/fontconfig/conf.d/05-osx-fonts.conf in my case, but
>> there is no "include the other file", so ConTeXt would actually have
>> to start reading both.
>
> fonts.conf should have something like:
>
> <include ignore_missing="yes">conf.d</include>

Oh, sorry, that's right. I missed that one.

> no? Here it does, otherwise fontconfig itself has no way of reading
> other files. But the whole thing is tricky, because the default path to
> the root fonts.conf file is set into libfontconfig at build time,
> ConTeXt has no way of knowing that, short of linking to libfontconfig.
>
>> The first two files are bundled with applications (Gimp, MPlayer) and
>> aso have their own caches & their own settings, so when users start
>> messing and configuring the system-wide settings, those two
>> applications won't obey those anyway.
>
> Which is very pointless, there should be only one fontconfig installed
> system wide, but that mac anyway :)

I might be wrong, but I tend to believe that Mac doesn't ship with
fontconfig at all. Or rather, fontconfig is part of X11 only (which is
part of OS X) and I've heard rumors that 10.8 doesn't ship with X11 by
default.

I believe it's the other way around: applications on Mac should not
use fontconfig ;), but when they do (most of them being ported from
linux), they cannot rely on fontconfig's presence on the system.

It's more or less the same situation on windows. When you launch VLC,
MPlayer, gnuplot/wxt or XeTeX after a long time, it spends the first
minute refreshing font cache.

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

* Re: Font recognition with command "context", but not with command "texexec"
  2012-07-30  9:16             ` Mojca Miklavec
@ 2012-07-30 10:31               ` Khaled Hosny
  0 siblings, 0 replies; 9+ messages in thread
From: Khaled Hosny @ 2012-07-30 10:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On Mon, Jul 30, 2012 at 11:16:44AM +0200, Mojca Miklavec wrote:
> I believe it's the other way around: applications on Mac should not
> use fontconfig ;), but when they do (most of them being ported from
> linux), they cannot rely on fontconfig's presence on the system.
> 
> It's more or less the same situation on windows. When you launch VLC,
> MPlayer, gnuplot/wxt or XeTeX after a long time, it spends the first
> minute refreshing font cache.

Right, I think fontconfig should turn itself into a warper around native
system font services on such systems and not manage a cache on its own,
which is better than porting every fontconfig using application. OT
anyway.

Regards,
 Khaled
___________________________________________________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2012-07-30 10:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-28 19:11 Font recognition with command "context", but not with command "texexec" Martin Rimmler
2012-07-29  7:34 ` Wolfgang Schuster
2012-07-29 13:39   ` Bill Meahan
2012-07-29 20:36     ` Mojca Miklavec
2012-07-29 23:05       ` Hans Hagen
2012-07-30  7:50         ` Mojca Miklavec
2012-07-30  9:06           ` Khaled Hosny
2012-07-30  9:16             ` Mojca Miklavec
2012-07-30 10:31               ` Khaled Hosny

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