From 641b8d0802ead673334ad7048c701238e6c8c81e Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Wed, 8 Jun 2016 11:39:00 +0200 Subject: 2016-06-08 10:54:00 --- tex/context/base/mkiv/font-otr.lua | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'tex/context/base/mkiv/font-otr.lua') diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua index 659526297..e09e87d4a 100644 --- a/tex/context/base/mkiv/font-otr.lua +++ b/tex/context/base/mkiv/font-otr.lua @@ -129,12 +129,11 @@ local function readlongdatetime(f) return 0x100000000 * d + 0x1000000 * e + 0x10000 * f + 0x100 * g + h end -local tableversion = 0.004 -local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF +local tableversion = 0.004 +readers.tableversion = tableversion +local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF +local reportedskipped = { } -readers.tableversion = tableversion - -local reportedskipped = { } local function reportskippedtable(tag) if not reportedskipped[tag] then @@ -1657,6 +1656,26 @@ function readers.glyf(f,fontdata,specification) -- part goes to cff module end end +-- Experimental (we need fonts). + +function readers.colr(f,fontdata,specification) + if specification.details then + reportskippedtable("colr") + end +end + +function readers.cpal(f,fontdata,specification) + if specification.details then + reportskippedtable("cpal") + end +end + +function readers.svg(f,fontdata,specification) + if specification.details then + reportskippedtable("svg") + end +end + -- Here we have a table that we really need for later processing although a more advanced gpos table -- can also be available. Todo: we need a 'fake' lookup for this (analogue to ff). @@ -1997,6 +2016,9 @@ local function readdata(f,offset,specification) readers["cmap"](f,fontdata,specification) readers["loca"](f,fontdata,specification) readers["glyf"](f,fontdata,specification) + readers["colr"](f,fontdata,specification) + readers["cpal"](f,fontdata,specification) + readers["svg" ](f,fontdata,specification) readers["kern"](f,fontdata,specification) readers["gdef"](f,fontdata,specification) readers["gsub"](f,fontdata,specification) @@ -2165,7 +2187,8 @@ function readers.loadfont(filename,n) goodies = { }, metadata = getinfo(fontdata,n), -- no platformnames here ! properties = { - hasitalics = fontdata.hasitalics or false, + hasitalics = fontdata.hasitalics or false, + maxcolorclass = fontdata.maxcolorclass, }, resources = { -- filename = fontdata.filename, @@ -2182,6 +2205,8 @@ function readers.loadfont(filename,n) version = getname(fontdata,"version"), cidinfo = fontdata.cidinfo, mathconstants = fontdata.mathconstants, + colorpalettes = fontdata.colorpalettes, + svgshapes = fontdata.svgshapes, }, } end -- cgit v1.2.3