[lltx] luaotfload readable cache and skipping system fonts

Sigitas Tolusis sigitas at vtex.lt
Fri Oct 3 08:43:31 CEST 2014


Hi,

I have two issues concerning some use case using luaotfload package with LuaLaTeX.
The idea is to use TeX system in network multiuser environment with central control.
So, there are no place for using system fonts from different users or different font cache. 

1. Suppress using/reading/caching system fonts. My idea is to add some configuration item to luaotfload. 
Let say (as example):

-- luaotfload.conf --
[db]
scan-system = false

--- luaotfload-configuration.lua        2014-08-04 03:11:40.000000000 +0300
+++ luaotfload-configuration.lua.new    2014-10-02 12:17:04.000000000 +0300
@@ -137,6 +137,7 @@
   db = {
     formats     = "otf,ttf,ttc,dfont",
     scan_local  = false,
+    scan_system = true,
     skip_read   = false,
     strip       = true,
     update_live = true,
@@ -409,6 +410,7 @@
       end
     },
     scan_local   = { in_t = boolean_t, },
+    scan_system  = { in_t = boolean_t, },
     skip_read    = { in_t = boolean_t, },
     strip        = { in_t = boolean_t, },
     update_live  = { in_t = boolean_t, },

 --- luaotfload-database.lua     2014-08-04 03:11:40.000000000 +0300
+++ luaotfload-database.lua.new 2014-10-02 12:19:45.000000000 +0300
@@ -2851,7 +2851,9 @@
     local max_fonts = config.luaotfload.db.max_fonts --- XXX revisit for lua 5.3 wrt integers

     tableappend (filenames, collect_font_filenames_texmf  ())
-    tableappend (filenames, collect_font_filenames_system ())
+    if config.luaotfload.db.scan_system == true then
+       tableappend (filenames, collect_font_filenames_system ())
+    end
     if config.luaotfload.db.scan_local == true then
         tableappend (filenames, collect_font_filenames_local  ())
     end

2. Use only readable font cache (TEXMFCACHE) which can be placed 
somewhere on readonly network drive or CD. 
Actually we already have configuration possibility in db section "update-live = false", 
but the luaotfload package still required writable directory for the cache.
Maybe it it reasonable to drop this requirement then using readonly configuration. 

I look forward for any comments or suggestions how to deal with described situation 
using current luaotfload package version (v2.5 2014-08-10).

Regards,
Sigitas Tolusis 





More information about the lualatex-dev mailing list