latex3 / luaotfload

OpenType font loader for LuaTeX
Other
56 stars 6 forks source link

Add configuration for scanning system fonts #258

Closed sigto closed 10 months ago

sigto commented 11 months ago

To ensure that compilation results will be the same and available on different computer architectures / OS, it is reasonable to switch off system fonts collection through configuration. Compattibility with previous versions is kept.

zauguin commented 11 months ago

IMO this should be on the opposite side: Scanning shouldn't be restricted but instead searching system fonts should be configurable. That way the configuration could be changed without invalidating caches.

sigto commented 11 months ago

For the user case not using system fonts there are no any reason to have extra info in cache which is never used. Even more it takes more memory for the cache itself (can be ~ 30%) and for the loaded extra lua tables at compilation time. By the way it is now how the local fonts are managed.

zauguin commented 10 months ago

With a978f22bb2b099e59d70639c32cf2f0369d2f293 and 7f24c06a9a151eea28fd86a711d10204298e6b57 this should no longer be needed. We now have a configuration variable db.location-precedence which allows to change the searched locations and also affects the cache generation.

So

[db]
location-precedence = "texmf,local"

effectively disables scanning for system fonts.

sigto commented 10 months ago

It works with new configuration as expected (tested with dev branch 40078f1e commit).