From d2b32f51a324046b00757cf6a5e0e8b1b73327ff Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 3 Jun 2010 15:06:18 +0300 Subject: Explicitely convert color value to string Fixes #9 --- otfl-font-clr.lua | 2 +- tests/color.tex | 7 ++++--- 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 -- cgit v1.2.3