[lltx] luaotfload-database.lua

Reinhard Kotucha reinhard.kotucha at web.de
Mon May 27 00:50:00 CEST 2013


On 2013-05-26 at 11:10:08 +0200, Philipp Gesang wrote:

 > You could also replace the file resolver.
 > 
 >     fonts.definers.resolvers.file = function (spec)
 >       --- rewrite spec.name here
 >     end

Hi Philipp,
spec.name contains the name without a path, so I suppose that the path
is added somewhere else later.

Using the patch_font callback works fine.

 > > If you have the same font installed in a TEXMF tree and in a system
 > > font directory, luaotfload is using the system font.  This is very bad.   
 > 
 > Well, isnÕt that the reason why I installed that font in the
 > first place?
 > 
 > > There might be different versions of a particular font with the same
 > > file name.  CentOS switched from teTeX to TeXLive-2007 recently.
 > 
 > Which would mean an outdated *texmf*.
 > 
 > > You can imagine how old the system fonts are on this system.
 > 
 > Usually, when someone asks for help with their distroÕs tex
 > packages, the first thing theyÕre told is to drop it in favor of
 > texlive (or the minimals). This is not limited to tex, btw., but
 > quite common with other languages that come with dedicated
 > package management.
 >
 > > If somebody installs TL from tug.org, I suppose that he wants to
 > > use the versions provided by TeX Live.  Or even newer versions in
 > > own TEXMF trees.
 > 
 > Or those in ~/.fonts, which is *the* canonical directory to
 > install your preferred fonts in.
 
I maintain a TeX Live system on a server, so the only way to make
fonts accessible to all machines is to put them into a TEXMF tree.

 > Since you are loading fonts by their filename and donÕt care for
 > system fonts, you probably have no need for a names database. We
 > could make it optional, I guess, by installing a kpse-only file:
 > resolver and omitting the others. This could be toggled by
 > setting a flag in config.luaotfload.

Yes, making it configurable is certainly a good idea.

 > The texmf vs. system fonts matter could be made configurable as
 > well, allowing the user to prioritize as they see fit. This would
 > require either a dotfile or separate tables in the database for
 > each of the search paths. Either way, itÕs a more complex
 > addition so itÕll probably require testing.
 > 
 > For a start, you can test with this branch:
 > 
 >     https://github.com/phi-gamma/luaotfload/commits/texmf-fonts
 > 
 > it restores the previous behavior of not indexing full paths for
 > texmf fonts and also prefers them over system fonts.

It prefers texmf fonts but they are still specified with a full path.
The latter has always been the case in the TL-2012 version.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the lualatex-dev mailing list