summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDohyun Kim <nomosnomos@gmail.com>2015-05-02 19:07:18 +0900
committerDohyun Kim <nomosnomos@gmail.com>2015-05-02 19:07:18 +0900
commit1f74982cb8e0980d956f97bd9bbb75391eb67d75 (patch)
treee844eed2acd0b26eb671f31a3f06481cc0f6a744
parent5ee570d2cd339e74e28f906c84aa76e6a940bc1b (diff)
downloadluaotfload-1f74982cb8e0980d956f97bd9bbb75391eb67d75.tar.gz
ignore full opacity input: moved to tfm stage
-rw-r--r--src/luaotfload-colors.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/luaotfload-colors.lua b/src/luaotfload-colors.lua
index 24e7840..081f0f6 100644
--- a/src/luaotfload-colors.lua
+++ b/src/luaotfload-colors.lua
@@ -73,10 +73,11 @@ local lpegmatch = lpeg.match
local C, Cg, Ct, P, R, S = lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.R, lpeg.S
local digit16 = R("09", "af", "AF")
+local opaque = S("fF") * S("fF")
local octet = C(digit16 * digit16)
local p_rgb = octet * octet * octet
-local p_rgba = p_rgb * octet
+local p_rgba = p_rgb * (octet - opaque)
local valid_digits = C(p_rgba + p_rgb) -- matches eight or six hex digits
local p_Crgb = Cg(octet/hex_to_dec, "red") --- for captures
@@ -224,9 +225,6 @@ end
local get_font_color = function (font_id)
local tfmdata = identifiers[font_id]
local font_color = tfmdata and tfmdata.properties and tfmdata.properties.color
- if font_color then
- font_color = font_color:gsub("(%x%x%x%x%x%x)[fF][fF]$", "%1")
- end
return font_color
end