summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-ini.lua
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-05-29 09:35:02 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-05-29 09:35:02 +0000
commitbad9348a29610a5030b0ff1da29174f9fe2dbc98 (patch)
tree1a27079839d052f5b5760ec698e7d708a779a2c5 /Master/texmf-dist/tex/luatex/luaotfload/otfl-font-ini.lua
parente62580242146a93f7836af785779cfd1a79e0ce1 (diff)
luaotfload update (2010/05/28 v1.08a)
git-svn-id: svn://tug.org/texlive/trunk@18578 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/otfl-font-ini.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/otfl-font-ini.lua60
1 files changed, 16 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-ini.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-ini.lua
index b9988687d68..e4514978175 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-ini.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-ini.lua
@@ -70,54 +70,26 @@ fonts.define.specify.synonyms = fonts.define.specify.synonyms or { }
-- tracing
-fonts.color = fonts.color or { }
+if not fonts.color then
-local attribute = attributes.private('color')
-local mapping = (attributes and attributes.list[attribute]) or { }
+ fonts.color = {
+ set = function() end,
+ reset = function() end,
+ }
-local set_attribute = node.set_attribute
-local unset_attribute = node.unset_attribute
-
-function fonts.color.set(n,c)
- local mc = mapping[c]
- if not mc then
- unset_attribute(n,attribute)
- else
- set_attribute(n,attribute,mc)
- end
-end
-function fonts.color.reset(n)
- unset_attribute(n,attribute)
end
--- this will change ...
-
-function fonts.show_char_data(n)
- local tfmdata = fonts.ids[font.current()]
- if tfmdata then
- if type(n) == "string" then
- n = utf.byte(n)
- end
- local chr = tfmdata.characters[n]
- if chr then
- write_nl(format("%s @ %s => U%04X => %s => ",tfmdata.fullname,tfmdata.size,n,utf.char(n)) .. serialize(chr,false))
- end
- end
-end
+-- format identification
-function fonts.show_font_parameters()
- local tfmdata = fonts.ids[font.current()]
- if tfmdata then
- local parameters, mathconstants = tfmdata.parameters, tfmdata.MathConstants
- local hasparameters, hasmathconstants = parameters and next(parameters), mathconstants and next(mathconstants)
- if hasparameters then
- write_nl(format("%s @ %s => parameters => ",tfmdata.fullname,tfmdata.size) .. serialize(parameters,false))
- end
- if hasmathconstants then
- write_nl(format("%s @ %s => math constants => ",tfmdata.fullname,tfmdata.size) .. serialize(mathconstants,false))
- end
- if not hasparameters and not hasmathconstants then
- write_nl(format("%s @ %s => no parameters and/or mathconstants",tfmdata.fullname,tfmdata.size))
- end
+fonts.formats = { }
+
+function fonts.fontformat(filename,default)
+ local extname = file.extname(filename)
+ local format = fonts.formats[extname]
+ if format then
+ return format
+ else
+ logs.report("fonts define","unable to detemine font format for '%s'",filename)
+ return default
end
end