From ba744a4bce3ed03eefbf2b4746fa24e6d388d9ff Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 14 Jun 2016 23:09:47 +0200 Subject: [fontloader] sync with Context as of 2016-06-14 --- src/fontloader/misc/fontloader-font-dsp.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/fontloader/misc/fontloader-font-dsp.lua') diff --git a/src/fontloader/misc/fontloader-font-dsp.lua b/src/fontloader/misc/fontloader-font-dsp.lua index 9726c51..a1ae17f 100644 --- a/src/fontloader/misc/fontloader-font-dsp.lua +++ b/src/fontloader/misc/fontloader-font-dsp.lua @@ -2214,9 +2214,9 @@ function readers.math(f,fontdata,specification) end function readers.colr(f,fontdata,specification) - if specification.details then - local datatable = fontdata.tables.colr - if datatable then + local datatable = fontdata.tables.colr + if datatable then + if specification.glyphs then local tableoffset = datatable.offset setposition(f,tableoffset) local version = readushort(f) @@ -2266,11 +2266,12 @@ function readers.colr(f,fontdata,specification) glyphs[glyphindex].colors = t end end + fontdata.hascolor = true end end function readers.cpal(f,fontdata,specification) - if specification.details then + if specification.glyphs then local datatable = fontdata.tables.cpal if datatable then local tableoffset = datatable.offset @@ -2316,9 +2317,9 @@ function readers.cpal(f,fontdata,specification) end function readers.svg(f,fontdata,specification) - if specification.details then - local datatable = fontdata.tables.svg - if datatable then + local datatable = fontdata.tables.svg + if datatable then + if specification.glyphs then local tableoffset = datatable.offset setposition(f,tableoffset) local version = readushort(f) @@ -2351,5 +2352,6 @@ function readers.svg(f,fontdata,specification) end fontdata.svgshapes = entries end + fontdata.hascolor = true end end -- cgit v1.2.3