summaryrefslogtreecommitdiff
path: root/otfl-font-tfm.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2009-11-15 17:10:27 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2009-11-15 17:10:27 +0200
commit78d506538016cd295d9a84ac62e3e036f23feffc (patch)
tree4ce6ccaf20af843787f3f15ebc79df3b632d6c11 /otfl-font-tfm.lua
parentf3fdfa5bee1dad0307347ba6f14b22f0e19053a6 (diff)
downloadluaotfload-78d506538016cd295d9a84ac62e3e036f23feffc.tar.gz
updating to latest (beta 2009.11.13) ConTeXt code
Diffstat (limited to 'otfl-font-tfm.lua')
-rw-r--r--otfl-font-tfm.lua17
1 files changed, 14 insertions, 3 deletions
diff --git a/otfl-font-tfm.lua b/otfl-font-tfm.lua
index 8b799df..5768293 100644
--- a/otfl-font-tfm.lua
+++ b/otfl-font-tfm.lua
@@ -1,6 +1,6 @@
if not modules then modules = { } end modules ['font-tfm'] = {
version = 1.001,
- comment = "companion to font-ini.tex",
+ comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-tfm'] = {
local utf = unicode.utf8
-local next, format, match, lower = next, string.format, string.match, string.lower
+local next, format, match, lower, gsub = next, string.format, string.match, string.lower, string.gsub
local concat, sortedkeys, utfbyte, serialize = table.concat, table.sortedkeys, utf.byte, table.serialize
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
@@ -225,7 +225,7 @@ end
local charactercache = { }
-- The scaler is only used for otf and afm and virtual fonts. If
--- a virtual font has italic correction make sur eto set the
+-- a virtual font has italic correction make sure to set the
-- has_italic flag. Some more flags will be added in the future.
function tfm.do_scale(tfmtable, scaledpoints)
@@ -258,6 +258,9 @@ function tfm.do_scale(tfmtable, scaledpoints)
t.unicodes = tfmtable.unicodes
t.indices = tfmtable.indices
t.marks = tfmtable.marks
+t.goodies = tfmtable.goodies
+t.colorscheme = tfmtable.colorscheme
+--~ t.embedding = tfmtable.embedding
t.descriptions = descriptions
if tfmtable.fonts then
t.fonts = table.fastcopy(tfmtable.fonts) -- hm also at the end
@@ -362,6 +365,7 @@ local private = fonts.private
end
end
if hasquality then
+ -- we could move these calculations elsewhere (saves calculations)
local ve = v.expansion_factor
if ve then
chr.expansion_factor = ve*1000 -- expansionfactor, hm, can happen elsewhere
@@ -553,6 +557,13 @@ end
end
t.nomath, t.MathConstants = true, nil
end
+ -- fullname is used in the subsetting
+ if not t.psname then
+ t.psname = t.fullname -- else bad luck
+ end
+ if trace_defining then
+ logs.report("define font","used for subsetting: %s ",t.fullname or "nofullname")
+ end
return t, delta
end