summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua62
1 files changed, 44 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua
index 0d484797511..8faf3d1727b 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua
@@ -2,14 +2,14 @@
-------------------------------------------------------------------------------
-- FILE: luaotfload-configuration.lua
-- DESCRIPTION: config file reader
--- REQUIREMENTS: Luaotfload 2.6 or above
+-- REQUIREMENTS: Luaotfload 2.7 or above
-- AUTHOR: Philipp Gesang, <phg@phi-gamma.net>
-- AUTHOR: Dohyun Kim <nomosnomos@gmail.com>
-------------------------------------------------------------------------------
--
if not modules then modules = { } end modules ["luaotfload-configuration"] = {
- version = "2.6",
+ version = "2.7",
comment = "part of Luaotfload",
author = "Philipp Gesang, Dohyun Kim",
copyright = "Luaotfload Development Team",
@@ -89,7 +89,7 @@ local config_paths = {
}
local valid_formats = tabletohash {
- "otf", "ttc", "ttf", "dfont", "afm", "pfb", "pfa",
+ "otf", "ttc", "ttf", "afm", --"pfb", "pfa",
}
local feature_presets = {
@@ -135,7 +135,6 @@ local registered_loaders = {
reference = "reference",
unpackaged = "unpackaged",
context = "context",
- tl2014 = "tl2014",
}
local pick_fontloader = function (s)
@@ -189,13 +188,14 @@ local permissible_color_callbacks = {
local default_config = {
db = {
- formats = "otf,ttf,ttc,dfont",
- scan_local = false,
- skip_read = false,
- strip = true,
- update_live = true,
- compress = true,
- max_fonts = 2^51,
+ formats = "otf,ttf,ttc",
+ scan_local = false,
+ skip_read = false,
+ strip = true,
+ update_live = true,
+ compress = true,
+ max_fonts = 2^51,
+ use_fontforge = false,
},
run = {
resolver = "cached",
@@ -369,6 +369,29 @@ local set_default_features = function ()
return true
end
+local set_fontforge = function ()
+ local names = fonts.names
+ if not names or not names.use_fontforge then
+ --- happens normally on the first run
+ logreport ("log", 4, "db", "Database not present.")
+ return true
+ end
+ local use_ff = config.luaotfload.db.use_fontforge
+ if use_ff == true then
+ if not _G.fontloader then
+ logreport ("both", 0, "db",
+ "Fontforge loader was requested but the fontloader \z
+ library is missing.")
+ return false
+ end
+ logreport ("log", 0, "db", "Loading font data with FontForge.")
+ names.use_fontforge (true)
+ else
+ logreport ("log", 4, "db", "Loading font data with the Lua loader.")
+ names.use_fontforge (false)
+ end
+ return true
+end
reconf_tasks = {
{ "Set the log level" , set_loglevel },
@@ -377,6 +400,7 @@ reconf_tasks = {
{ "Set the font filter" , set_font_filter },
{ "Install font name resolver", set_name_resolver },
{ "Set default features" , set_default_features },
+ { "Set fontforge" , set_fontforge },
}
-------------------------------------------------------------------------------
@@ -475,6 +499,7 @@ local option_spec = {
out_t = number_t, --- TODO int_t from 5.3.x on
transform = tointeger,
},
+ use_fontforge = { in_t = boolean_t, },
},
run = {
live = { in_t = boolean_t, }, --- false for the tool, true for TeX run
@@ -643,13 +668,14 @@ local conf_footer = [==[
local formatters = {
db = {
- compress = { false, format_boolean },
- formats = { false, format_string },
- max_fonts = { false, format_integer },
- scan_local = { false, format_boolean },
- skip_read = { false, format_boolean },
- strip = { false, format_boolean },
- update_live = { false, format_boolean },
+ compress = { false, format_boolean },
+ formats = { false, format_string },
+ max_fonts = { false, format_integer },
+ scan_local = { false, format_boolean },
+ skip_read = { false, format_boolean },
+ strip = { false, format_boolean },
+ update_live = { false, format_boolean },
+ use_fontforge = { false, format_boolean },
},
default_features = {
__default = { true, format_keyval },