diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua index c81f9e2cb00..b86ab59fb3f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua @@ -2749,25 +2749,33 @@ end) do local settings_to_array = utilities.parsers.settings_to_array - local namedcolorattributes = attributes.colors.namedcolorattributes - local colorvalues = attributes.colors.values + -- local namedcolorattributes = attributes.colors.namedcolorattributes + -- local colorvalues = attributes.colors.values + + -- implement { + -- name = "definefontcolorpalette", + -- arguments = { "string", "string" }, + -- actions = function(name,set) + -- set = settings_to_array(set) + -- for i=1,#set do + -- local name = set[i] + -- local space, color = namedcolorattributes(name) + -- local values = colorvalues[color] + -- if values then + -- set[i] = { r = values[3], g = values[4], b = values[5] } + -- else + -- set[i] = { r = 0, g = 0, b = 0 } + -- end + -- end + -- otf.registerpalette(name,set) + -- end + -- } implement { name = "definefontcolorpalette", arguments = { "string", "string" }, actions = function(name,set) - set = settings_to_array(set) - for i=1,#set do - local name = set[i] - local space, color = namedcolorattributes(name) - local values = colorvalues[color] - if values then - set[i] = { r = values[3], g = values[4], b = values[5] } - else - set[i] = { r = 0, g = 0, b = 0 } - end - end - otf.registerpalette(name,set) + otf.registerpalette(name,settings_to_array(set)) end } |