[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev, keepnames: Add configuration option to keep weird names (c537d15)

Marcel Fabian Krüger tex at 2krueger.de
Mon Aug 9 17:57:43 CEST 2021


Repository : https://github.com/latex3/luaotfload
On branches: dev,keepnames
Link       : https://github.com/latex3/luaotfload/commit/c537d15d6cd0f09d36b6f89cc75bf83c782e56f8

>---------------------------------------------------------------

commit c537d15d6cd0f09d36b6f89cc75bf83c782e56f8
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu Aug 5 02:46:30 2021 +0200

    Add configuration option to keep weird names


>---------------------------------------------------------------

c537d15d6cd0f09d36b6f89cc75bf83c782e56f8
 doc/luaotfload.conf.rst          | 6 ++++++
 src/luaotfload-configuration.lua | 2 ++
 src/luaotfload-init.lua          | 6 ++++++
 3 files changed, 14 insertions(+)

diff --git a/doc/luaotfload.conf.rst b/doc/luaotfload.conf.rst
index 4f44368..269441e 100644
--- a/doc/luaotfload.conf.rst
+++ b/doc/luaotfload.conf.rst
@@ -228,6 +228,8 @@ Section ``misc``
 +---------------+--------+-------------------------+
 |  version      |   s    |  <Luaotfload version>   |
 +---------------+--------+-------------------------+
+|  keepnames    |   b    |  ``true``               |
++---------------+--------+-------------------------+
 
 With ``statistics`` enabled, extra statistics will be collected during
 index creation and appended to the index file. It may then be queried
@@ -241,6 +243,10 @@ terminal dimensions cannot be retrieved.
 The value of ``version`` is derived from the version string hard-coded
 in the Luaotfload source. Override at your own risk.
 
+The ``keepnames`` option decides if the ConTeXt fontloader should keep
+names it considers useless or if they should be discarded. This option
+only takes effect after font caches are regenererated.
+
 
 Section ``paths``
 -----------------------------------------------------------------------
diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua
index effb6b2..5d28733 100644
--- a/src/luaotfload-configuration.lua
+++ b/src/luaotfload-configuration.lua
@@ -218,6 +218,7 @@ local default_config = {
     version        = luaotfload.version,
     statistics     = false,
     termwidth      = nil,
+    keepnames      = true,
   },
   paths = {
     names_dir           = "names",
@@ -611,6 +612,7 @@ local option_spec = {
         return w
       end,
     },
+    keepnames       = { in_t = boolean_t, },
   },
   paths = {
     names_dir           = { in_t = string_t, },
diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua
index 69596ac..bc7e32d 100644
--- a/src/luaotfload-init.lua
+++ b/src/luaotfload-init.lua
@@ -551,10 +551,16 @@ local function init_post_load_agl ()
 
 end
 
+local function init_post_apply_keepnames ()
+  local keepnames = config.luaotfload.misc.keepnames
+  luaotfload.fontloader.fonts.privateoffsets.keepnames = keepnames
+end
+
 --- (unit -> unit) list
 local init_post_actions = {
   init_post_install_callbacks,
   init_post_load_agl,
+  init_post_apply_keepnames
 }
 
 --- unit -> size_t





More information about the latex3-commits mailing list.