summaryrefslogtreecommitdiff
path: root/otfl-font-otf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'otfl-font-otf.lua')
-rw-r--r--otfl-font-otf.lua21
1 files changed, 11 insertions, 10 deletions
diff --git a/otfl-font-otf.lua b/otfl-font-otf.lua
index cab6fae..924e9a6 100644
--- a/otfl-font-otf.lua
+++ b/otfl-font-otf.lua
@@ -12,6 +12,8 @@ if not modules then modules = { } end modules ['font-otf'] = {
-- to_table -> totable
-- ascent descent
+-- more checking against low level calls of functions
+
local utf = unicode.utf8
local utfbyte = utf.byte
@@ -515,7 +517,7 @@ local mt = {
}
actions["prepare tables"] = function(data,filename,raw)
- data.properties.italic_correction = false
+ data.properties.hasitalics = false
end
actions["add dimensions"] = function(data,filename)
@@ -600,7 +602,7 @@ local function somecopy(old) -- fast one
end
end
--- not setting italic_correction and class (when nil) during
+-- not setting hasitalics and class (when nil) during
-- table cronstruction can save some mem
actions["prepare glyphs"] = function(data,filename,raw)
@@ -844,7 +846,7 @@ actions["analyze glyphs"] = function(data,filename,raw) -- maybe integrate this
local resources = data.resources
local metadata = data.metadata
local properties = data.properties
- local italic_correction = false
+ local hasitalics = false
local widths = { }
local marks = { }
for unicode, description in next, descriptions do
@@ -856,7 +858,7 @@ actions["analyze glyphs"] = function(data,filename,raw) -- maybe integrate this
-- skip
else
description.italic = italic
- italic_correction = true
+ hasitalics = true
end
local width = glyph.width
widths[width] = (widths[width] or 0) + 1
@@ -869,7 +871,7 @@ actions["analyze glyphs"] = function(data,filename,raw) -- maybe integrate this
end
end
-- flag italic
- properties.italic_correction = italic_correction
+ properties.hasitalics = hasitalics
-- flag marks
resources.marks = marks
-- share most common width for cjk fonts
@@ -1309,8 +1311,6 @@ actions["reorganize lookups"] = function(data,filename,raw)
end
end
--- to be checked italic_correction
-
local function check_variants(unicode,the_variants,splitter,unicodes)
local variants = the_variants.variants
if variants then -- use splitter
@@ -1928,9 +1928,9 @@ local function otftotfm(specification)
tfmdata.shared = shared
end
shared.rawdata = rawdata
- shared.features = features -- default
+ -- shared.features = features -- default
shared.dynamics = { }
- shared.processes = { }
+ -- shared.processes = { }
tfmdata.changed = { }
shared.features = features
shared.processes = otf.setfeatures(tfmdata,features)
@@ -1949,7 +1949,8 @@ local function read_from_otf(specification)
tfmdata.properties.sub = specification.sub
--
tfmdata = constructors.scale(tfmdata,specification)
- constructors.applymanipulators("otf",tfmdata,specification.features.normal,trace_features,report_otf)
+ local allfeatures = tfmdata.shared.features or specification.features.normal
+ constructors.applymanipulators("otf",tfmdata,allfeatures,trace_features,report_otf)
constructors.setname(tfmdata,specification) -- only otf?
fonts.loggers.register(tfmdata,file.extname(specification.filename),specification)
end