[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#683943: luatex: fontconfig overridden by OSFONTDIR in default settings



Reuben Thomas <rrt@sc3d.org> writes:

> On 12 August 2012 11:31, Frank Kuester <frank@kuesterei.ch> wrote:
>>
>> Anyway, what I am not sure about is what we should do about this. The
>> documentation in texmf.cnf says:
>>
>> % OSFONTDIR is to provide a convenient hook for allowing TeX to find
>> % fonts installed on the system (outside of TeX).  An empty default
>> % value would add "//" to the search paths, so we give it a dummy value.
>> OSFONTDIR = /usr/share/fonts
>>
>> I am not sure whether luatex is correct in taking this as an alternative
>> to fontconfig.
>
> As far as I can tell, that is what OSFONTDIR is for. 

As far as I read the text quoted above, OSFONTDIR is _not_ meant for
this.  It is meant to access fonts outside the TEXMF trees, and if an
engine has a better way to achieve this, I don't see how this engine
should require the variable to be unset.

So, other than the behavior you describe, is there any other source for
your assertion that OSFONTDIR is meant to tell an engine "don't use
fontconfig"?  Is it written anywhere?

> The
> mkluatexfontdb script, which presumably is trying to mimic the
> behaviour of luatex, also has this behaviour.

That's not really an argument, since it's probably been written by
people who are familiar with the current luatex behavior more than with
what other engines do, did and should do.

>> So it could be that we would need to have a OSFONTDIR.luatex variable
>> instead that is empty?
>
> I don't think that would work, because an empty variable would make it
> search no paths (not the same as unsetting the variable, which as far
> as I can tell is impossible in kpathsea).

I think you're right, you can't unset a variable in kpathsea.  Which, to
me, seems like one argument more why a program should never rely on a
variable being unset...

> If that is correct, then OSFONTDIR should not be set, but per-engine
> versions should be set for whichever engines need it. As far as I can
> tell, the only engines not using fontconfig are tex and ptex.

And do those other engines treat OSFONTDIR like luatex does it?  I
already wrote that I couldn't find any information on this in the luatex
documentation, the same is true for the pdftex manual I now searched in.

Regards, Frank


Reply to: