diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-gds.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/font-gds.lua | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/font-gds.lua b/Master/texmf-dist/tex/context/base/font-gds.lua index 9e7cb841e3f..073d9ed57d1 100644 --- a/Master/texmf-dist/tex/context/base/font-gds.lua +++ b/Master/texmf-dist/tex/context/base/font-gds.lua @@ -9,10 +9,12 @@ if not modules then modules = { } end modules ['font-gds'] = { -- depends on ctx local type, next, tonumber = type, next, tonumber -local gmatch, format, lower, find, splitup = string.gmatch, string.format, string.lower, string.find, string.splitup -local texsp = tex.sp +local gmatch, lower, find, splitup = string.gmatch, string.lower, string.find, string.splitup -local fonts, nodes, attributes, node = fonts, nodes, attributes, node +local fonts = fonts +local nodes = nodes +local attributes = attributes +local node = node local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end) local report_goodies = logs.reporter("fonts","goodies") @@ -20,6 +22,11 @@ local report_goodies = logs.reporter("fonts","goodies") local allocate = utilities.storage.allocate local setmetatableindex = table.setmetatableindex +local implement = interfaces.implement + +local texsp = tex.sp +local formatters = string.formatters + local otf = fonts.handlers.otf local afm = fonts.handlers.afm local tfm = fonts.handlers.tfm @@ -429,7 +436,7 @@ local function setextrafeatures(tfmdata) addotffeature(tfmdata.shared.rawdata,feature,specification) registerotffeature { name = feature, - description = format("extra: %s",feature) + description = formatters["extra: %s"](feature) } end end @@ -819,8 +826,17 @@ end -- interface -commands.loadfontgoodies = fontgoodies.load -commands.enablefontcolorschemes = colorschemes.enable +implement { + name = "loadfontgoodies", + actions = fontgoodies.load, + arguments = "string" +} + +implement { + name = "enablefontcolorschemes", + onlyonce = true, + actions = colorschemes.enable +} -- weird place ... depends on math @@ -853,7 +869,7 @@ local function setkeepligatures(tfmdata,value) if letterspacing then local keptligatures = letterspacing.keptligatures if keptligatures then - local unicodes = tfmdata.resources.unicodes + local unicodes = tfmdata.resources.unicodes -- so we accept names local hash = { } for k, v in next, keptligatures do local u = unicodes[k] |