summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-06-03 15:06:18 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2010-06-03 15:06:18 +0300
commitd2b32f51a324046b00757cf6a5e0e8b1b73327ff (patch)
treeff5b7e4356023c1ccc8fdf181a49ee1da5e90733
parent782e67f7807e25c88a5e1d7fc3bfeddf33fb6adf (diff)
downloadluaotfload-d2b32f51a324046b00757cf6a5e0e8b1b73327ff.tar.gz
Explicitely convert color value to string
Fixes #9
-rw-r--r--otfl-font-clr.lua2
-rw-r--r--tests/color.tex7
2 files changed, 5 insertions, 4 deletions
diff --git a/otfl-font-clr.lua b/otfl-font-clr.lua
index e1f0faa..a6cf63f 100644
--- a/otfl-font-clr.lua
+++ b/otfl-font-clr.lua
@@ -16,7 +16,7 @@ table.insert(fonts.triggers,"color")
function initializers.common.color(tfmdata,value)
if value then
- tfmdata.color = value
+ tfmdata.color = tostring(value)
add_color_callback()
end
end
diff --git a/tests/color.tex b/tests/color.tex
index 7206853..1be8896 100644
--- a/tests/color.tex
+++ b/tests/color.tex
@@ -1,9 +1,10 @@
\input luaotfload.sty
-\pdfminorversion=5 \pdfcompresslevel=9 \pdfobjcompresslevel=9
+\font\testa=file:lmroman10-regular.otf:color=FF0000BB;+trep at 10pt
+\font\testb=file:lmroman10-regular.otf:color=FFFF0099;+trep at 10pt
+\font\testc=file:lmroman10-regular.otf:color=559922;+trep at 12pt
-\font\testa=file:lmroman10-regular.otf:color=FF0000BB;+liga;+tlig;+trep" at 10pt
-\font\testb=file:lmroman10-regular.otf:color=FFFF0099;+liga;+tlig;+trep" at 10pt
\testa \input knuth \par
\testb \input knuth \par
+\testc \input knuth \par
\bye