summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-09-20 08:17:28 +0200
committerGitHub <noreply@github.com>2016-09-20 08:17:28 +0200
commit27384ea726edd394c31a3bd35503488f5494fe67 (patch)
tree1b63e4c6d9e91361d7555831c59f62e6001f1fda /src
parent692704c12ac6f952080aad16df123400a0c82c0e (diff)
parent83b27d3d2faa30ef518f1b5e0a4a87a74107a93c (diff)
downloadluaotfload-27384ea726edd394c31a3bd35503488f5494fe67.tar.gz
Merge pull request #379 from phi-gamma/master
latest loader and changes for a pre-release
Diffstat (limited to 'src')
-rw-r--r--src/fontloader/misc/fontloader-font-con.lua84
-rw-r--r--src/fontloader/misc/fontloader-font-dsp.lua3
-rw-r--r--src/fontloader/misc/fontloader-font-map.lua100
-rw-r--r--src/fontloader/misc/fontloader-font-otl.lua2
-rw-r--r--src/fontloader/misc/fontloader-font-ots.lua10
-rw-r--r--src/fontloader/misc/fontloader-fonts-ext.lua15
-rw-r--r--src/fontloader/misc/fontloader-l-lua.lua1
-rw-r--r--src/fontloader/misc/fontloader-l-string.lua1
-rw-r--r--src/fontloader/misc/fontloader-swiglib-test.lua750
-rw-r--r--src/fontloader/misc/fontloader-swiglib.lua5
-rw-r--r--src/fontloader/misc/fontloader-util-str.lua3
-rw-r--r--src/fontloader/runtime/fontloader-basics-gen.lua1
-rw-r--r--src/fontloader/runtime/fontloader-reference.lua100
-rw-r--r--src/luaotfload-database.lua44
14 files changed, 983 insertions, 136 deletions
diff --git a/src/fontloader/misc/fontloader-font-con.lua b/src/fontloader/misc/fontloader-font-con.lua
index 931e4e7..b3e506b 100644
--- a/src/fontloader/misc/fontloader-font-con.lua
+++ b/src/fontloader/misc/fontloader-font-con.lua
@@ -144,7 +144,9 @@ end
local unscaled = {
ScriptPercentScaleDown = true,
ScriptScriptPercentScaleDown = true,
- RadicalDegreeBottomRaisePercent = true
+ RadicalDegreeBottomRaisePercent = true,
+ NoLimitSupFactor = true,
+ NoLimitSubFactor = true,
}
function constructors.assignmathparameters(target,original) -- simple variant, not used in context
@@ -490,13 +492,13 @@ function constructors.scale(tfmdata,specification)
--
if hasmath then
constructors.assignmathparameters(target,tfmdata) -- does scaling and whatever is needed
- properties.hasmath = true
- target.nomath = false
- target.MathConstants = target.mathparameters
+ properties.hasmath = true
+ target.nomath = false
+ target.MathConstants = target.mathparameters
else
- properties.hasmath = false
- target.nomath = true
- target.mathparameters = nil -- nop
+ properties.hasmath = false
+ target.nomath = true
+ target.mathparameters = nil -- nop
end
--
-- Here we support some context specific trickery (this might move to a plugin). During the
@@ -905,42 +907,42 @@ function constructors.finalize(tfmdata)
-- tfmdata.unscaled
--
if not properties.hasmath then
- properties.hasmath = not tfmdata.nomath
+ properties.hasmath = not tfmdata.nomath
end
--
- tfmdata.MathConstants = nil
- tfmdata.postprocessors = nil
- --
- tfmdata.fontname = nil
- tfmdata.filename = nil
- tfmdata.fullname = nil
- tfmdata.name = nil -- most tricky part
- tfmdata.psname = nil
- --
- tfmdata.encodingbytes = nil
- tfmdata.embedding = nil
- tfmdata.tounicode = nil
- tfmdata.cidinfo = nil
- tfmdata.format = nil
- tfmdata.direction = nil
- tfmdata.type = nil
- tfmdata.nomath = nil
- tfmdata.designsize = nil
- --
- tfmdata.size = nil
- tfmdata.stretch = nil
- tfmdata.shrink = nil
- tfmdata.step = nil
- tfmdata.auto_expand = nil
- tfmdata.auto_protrude = nil
- tfmdata.extend = nil
- tfmdata.slant = nil
- tfmdata.units = nil
- tfmdata.units_per_em = nil
- --
- tfmdata.cache = nil
- --
- properties.finalized = true
+ tfmdata.MathConstants = nil
+ tfmdata.postprocessors = nil
+ --
+ tfmdata.fontname = nil
+ tfmdata.filename = nil
+ tfmdata.fullname = nil
+ tfmdata.name = nil -- most tricky part
+ tfmdata.psname = nil
+ --
+ tfmdata.encodingbytes = nil
+ tfmdata.embedding = nil
+ tfmdata.tounicode = nil
+ tfmdata.cidinfo = nil
+ tfmdata.format = nil
+ tfmdata.direction = nil
+ tfmdata.type = nil
+ tfmdata.nomath = nil
+ tfmdata.designsize = nil
+ --
+ tfmdata.size = nil
+ tfmdata.stretch = nil
+ tfmdata.shrink = nil
+ tfmdata.step = nil
+ tfmdata.auto_expand = nil
+ tfmdata.auto_protrude = nil
+ tfmdata.extend = nil
+ tfmdata.slant = nil
+ tfmdata.units = nil
+ tfmdata.units_per_em = nil
+ --
+ tfmdata.cache = nil
+ --
+ properties.finalized = true
--
return tfmdata
end
diff --git a/src/fontloader/misc/fontloader-font-dsp.lua b/src/fontloader/misc/fontloader-font-dsp.lua
index 1c81e5e..cd28168 100644
--- a/src/fontloader/misc/fontloader-font-dsp.lua
+++ b/src/fontloader/misc/fontloader-font-dsp.lua
@@ -1933,7 +1933,7 @@ function readers.gdef(f,fontdata,specification)
end
end
-- mark sets : todo: just make the same as class sets above
- if marksetsoffset then
+ if marksetsoffset and marksetsoffset > tableoffset then -- zero offset means no table
setposition(f,marksetsoffset)
local format = readushort(f)
if format == 1 then
@@ -1942,7 +1942,6 @@ function readers.gdef(f,fontdata,specification)
for i=1,nofsets do
sets[i] = readulong(f)
end
- -- somehow this fails on e.g. notosansethiopic-bold.ttf
for i=1,nofsets do
local offset = sets[i]
if offset ~= 0 then
diff --git a/src/fontloader/misc/fontloader-font-map.lua b/src/fontloader/misc/fontloader-font-map.lua
index 7f3b0f9..e2254f8 100644
--- a/src/fontloader/misc/fontloader-font-map.lua
+++ b/src/fontloader/misc/fontloader-font-map.lua
@@ -12,6 +12,7 @@ local match, format, find, concat, gsub, lower = string.match, string.format, st
local P, R, S, C, Ct, Cc, lpegmatch = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.match
local floor = math.floor
local formatters = string.formatters
+local sortedhash, sortedkeys = table.sortedhash, table.sortedkeys
local trace_loading = false trackers.register("fonts.loading", function(v) trace_loading = v end)
local trace_mapping = false trackers.register("fonts.mapping", function(v) trace_mapping = v end)
@@ -236,30 +237,37 @@ local namesplitter = Ct(C((1 - ligseparator - varseparator)^1) * (ligseparator *
-- to be completed .. for fonts that use unicodes for ligatures which
-- is a actually a bad thing and should be avoided in the first place
-local overloads = allocate {
- IJ = { name = "I_J", unicode = { 0x49, 0x4A }, mess = 0x0132 },
- ij = { name = "i_j", unicode = { 0x69, 0x6A }, mess = 0x0133 },
- ff = { name = "f_f", unicode = { 0x66, 0x66 }, mess = 0xFB00 },
- fi = { name = "f_i", unicode = { 0x66, 0x69 }, mess = 0xFB01 },
- fl = { name = "f_l", unicode = { 0x66, 0x6C }, mess = 0xFB02 },
- ffi = { name = "f_f_i", unicode = { 0x66, 0x66, 0x69 }, mess = 0xFB03 },
- ffl = { name = "f_f_l", unicode = { 0x66, 0x66, 0x6C }, mess = 0xFB04 },
- fj = { name = "f_j", unicode = { 0x66, 0x6A } },
- fk = { name = "f_k", unicode = { 0x66, 0x6B } },
-}
-
-for k, v in next, overloads do
- local name = v.name
- local mess = v.mess
- if name then
- overloads[name] = v
- end
- if mess then
- overloads[mess] = v
+do
+
+ local overloads = allocate {
+ IJ = { name = "I_J", unicode = { 0x49, 0x4A }, mess = 0x0132 },
+ ij = { name = "i_j", unicode = { 0x69, 0x6A }, mess = 0x0133 },
+ ff = { name = "f_f", unicode = { 0x66, 0x66 }, mess = 0xFB00 },
+ fi = { name = "f_i", unicode = { 0x66, 0x69 }, mess = 0xFB01 },
+ fl = { name = "f_l", unicode = { 0x66, 0x6C }, mess = 0xFB02 },
+ ffi = { name = "f_f_i", unicode = { 0x66, 0x66, 0x69 }, mess = 0xFB03 },
+ ffl = { name = "f_f_l", unicode = { 0x66, 0x66, 0x6C }, mess = 0xFB04 },
+ fj = { name = "f_j", unicode = { 0x66, 0x6A } },
+ fk = { name = "f_k", unicode = { 0x66, 0x6B } },
+ }
+
+ local o = { }
+
+ for k, v in next, overloads do
+ local name = v.name
+ local mess = v.mess
+ if name then
+ o[name] = v
+ end
+ if mess then
+ o[mess] = v
+ end
+ o[k] = v
end
-end
-mappings.overloads = overloads
+ mappings.overloads = o
+
+end
function mappings.addtounicode(data,filename,checklookups)
local resources = data.resources
@@ -272,6 +280,7 @@ function mappings.addtounicode(data,filename,checklookups)
end
local properties = data.properties
local descriptions = data.descriptions
+ local overloads = mappings.overloads
-- we need to move this code
unicodes['space'] = unicodes['space'] or 32
unicodes['hyphen'] = unicodes['hyphen'] or 45
@@ -290,17 +299,25 @@ function mappings.addtounicode(data,filename,checklookups)
local usedmap = cidinfo and fonts.cid.getmap(cidinfo)
local uparser = makenameparser() -- hm, every time?
if usedmap then
- oparser = usedmap and makenameparser(cidinfo.ordering)
- cidnames = usedmap.names
- cidcodes = usedmap.unicodes
+ oparser = usedmap and makenameparser(cidinfo.ordering)
+ cidnames = usedmap.names
+ cidcodes = usedmap.unicodes
end
- local ns = 0
- local nl = 0
+ local ns = 0
+ local nl = 0
+ --
+ -- in order to avoid differences between runs due to hash randomization we
+ -- run over a sorted list
--
- for du, glyph in next, descriptions do
- local name = glyph.name
+ local dlist = sortedkeys(descriptions)
+ --
+ -- for du, glyph in next, descriptions do
+ for i=1,#dlist do
+ local du = dlist[i]
+ local glyph = descriptions[du]
+ local name = glyph.name
if name then
- local overload = overloads[name]
+ local overload = overloads[name] or overloads[du]
if overload then
-- get rid of weird ligatures
-- glyph.name = overload.name
@@ -436,6 +453,11 @@ function mappings.addtounicode(data,filename,checklookups)
end
end
end
+ else
+ local overload = overloads[du]
+ if overload then
+ glyph.unicode = overload.unicode
+ end
end
end
if type(checklookups) == "function" then
@@ -446,7 +468,10 @@ function mappings.addtounicode(data,filename,checklookups)
local collected = false
local unicoded = 0
- for unicode, glyph in next, descriptions do
+ -- for du, glyph in next, descriptions do
+ for i=1,#dlist do
+ local du = dlist[i]
+ local glyph = descriptions[du]
if glyph.class == "ligature" and (force_ligatures or not glyph.unicode) then
if not collected then
collected = fonts.handlers.otf.readers.getcomponents(data)
@@ -454,7 +479,7 @@ function mappings.addtounicode(data,filename,checklookups)
break
end
end
- local u = collected[unicode] -- always tables
+ local u = collected[du] -- always tables
if u then
local n = #u
for i=1,n do
@@ -478,7 +503,10 @@ function mappings.addtounicode(data,filename,checklookups)
report_fonts("%n ligature tounicode mappings deduced from gsub ligature features",unicoded)
end
if trace_mapping then
- for unic, glyph in table.sortedhash(descriptions) do
+ -- for unic, glyph in sortedhash(descriptions) do
+ for i=1,#dlist do
+ local du = dlist[i]
+ local glyph = descriptions[du]
local name = glyph.name or "-"
local index = glyph.index or 0
local unicode = glyph.unicode
@@ -488,12 +516,12 @@ function mappings.addtounicode(data,filename,checklookups)
for i=1,#unicode do
unicodes[i] = formatters("%U",unicode[i])
end
- report_fonts("internal slot %U, name %a, unicode %U, tounicode % t",index,name,unic,unicodes)
+ report_fonts("internal slot %U, name %a, unicode %U, tounicode % t",index,name,du,unicodes)
else
- report_fonts("internal slot %U, name %a, unicode %U, tounicode %U",index,name,unic,unicode)
+ report_fonts("internal slot %U, name %a, unicode %U, tounicode %U",index,name,du,unicode)
end
else
- report_fonts("internal slot %U, name %a, unicode %U",index,name,unic)
+ report_fonts("internal slot %U, name %a, unicode %U",index,name,du)
end
end
end
diff --git a/src/fontloader/misc/fontloader-font-otl.lua b/src/fontloader/misc/fontloader-font-otl.lua
index 0662290..cf6603f 100644
--- a/src/fontloader/misc/fontloader-font-otl.lua
+++ b/src/fontloader/misc/fontloader-font-otl.lua
@@ -52,7 +52,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.026 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.027 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
otf.svgcache = containers.define("fonts", "svg", otf.version, true)
otf.pdfcache = containers.define("fonts", "pdf", otf.version, true)
diff --git a/src/fontloader/misc/fontloader-font-ots.lua b/src/fontloader/misc/fontloader-font-ots.lua
index da5d50a..1c64720 100644
--- a/src/fontloader/misc/fontloader-font-ots.lua
+++ b/src/fontloader/misc/fontloader-font-ots.lua
@@ -2752,10 +2752,12 @@ function otf.dataset(tfmdata,font) -- generic variant, overloaded in context
}
rs[language] = rl
local sequences = tfmdata.resources.sequences
- for s=1,#sequences do
- local v = enabled and initialize(sequences[s],script,language,enabled,autoscript,autolanguage)
- if v then
- rl[#rl+1] = v
+ if sequences then
+ for s=1,#sequences do
+ local v = enabled and initialize(sequences[s],script,language,enabled,autoscript,autolanguage)
+ if v then
+ rl[#rl+1] = v
+ end
end
end
end
diff --git a/src/fontloader/misc/fontloader-fonts-ext.lua b/src/fontloader/misc/fontloader-fonts-ext.lua
index 9d8d307..0b61e27 100644
--- a/src/fontloader/misc/fontloader-fonts-ext.lua
+++ b/src/fontloader/misc/fontloader-fonts-ext.lua
@@ -270,3 +270,18 @@ otffeatures.register {
node = reencode,
}
}
+
+local function ignore(tfmdata,key,value)
+ if value then
+ tfmdata.mathparameters = nil
+ end
+end
+
+otffeatures.register {
+ name = "ignoremathconstants",
+ description = "ignore math constants table",
+ initializers = {
+ base = ignore,
+ node = ignore,
+ }
+}
diff --git a/src/fontloader/misc/fontloader-l-lua.lua b/src/fontloader/misc/fontloader-l-lua.lua
index b90f37e..3571538 100644
--- a/src/fontloader/misc/fontloader-l-lua.lua
+++ b/src/fontloader/misc/fontloader-l-lua.lua
@@ -198,3 +198,4 @@ if flush then
local popen = io.popen if popen then function io.popen (...) flush() return popen (...) end end
end
+
diff --git a/src/fontloader/misc/fontloader-l-string.lua b/src/fontloader/misc/fontloader-l-string.lua
index e9dc2bb..88297f2 100644
--- a/src/fontloader/misc/fontloader-l-string.lua
+++ b/src/fontloader/misc/fontloader-l-string.lua
@@ -177,6 +177,7 @@ function string.topattern(str,lowercase,strict)
end
end
+-- print(string.escapedpattern("abc*234",true))
-- print(string.escapedpattern("12+34*.tex",false))
-- print(string.escapedpattern("12+34*.tex",true))
-- print(string.topattern ("12+34*.tex",false,false))
diff --git a/src/fontloader/misc/fontloader-swiglib-test.lua b/src/fontloader/misc/fontloader-swiglib-test.lua
index db6a729..00d7c5a 100644
--- a/src/fontloader/misc/fontloader-swiglib-test.lua
+++ b/src/fontloader/misc/fontloader-swiglib-test.lua
@@ -1,25 +1,743 @@
-local gm = swiglib("gmwand.core")
-gm.InitializeMagick(".")
-local magick_wand = gm.NewMagickWand()
-local drawing_wand = gm.NewDrawingWand()
+-- local gm = require("swiglib.gmwand.core") -- local gm = swiglib("gmwand.core")
+--
+-- gm.InitializeMagick(".")
+--
+-- local magick_wand = gm.NewMagickWand()
+-- local drawing_wand = gm.NewDrawingWand()
+--
+-- gm.MagickSetSize(magick_wand,800,600)
+-- gm.MagickReadImage(magick_wand,"xc:red")
+--
+-- gm.DrawPushGraphicContext(drawing_wand)
+--
+-- gm.DrawSetFillColor(drawing_wand,gm.NewPixelWand())
+--
+-- -- gm.DrawSetFont(drawing_wand, kpse.findfile("DejaVuSerifBold.ttf"))
+-- -- gm.DrawSetFontSize(drawing_wand, 96)
+-- -- gm.DrawAnnotation(drawing_wand,300,200, "LuaTeX")
+--
+-- gm.DrawPopGraphicContext(drawing_wand)
+-- gm.MagickDrawImage(magick_wand,drawing_wand)
+--
+-- gm.MagickWriteImages(magick_wand,"./luatex-swiglib-test.jpg",1)
+--
+-- gm.DestroyDrawingWand(drawing_wand)
+-- gm.DestroyMagickWand(magick_wand)
-gm.MagickSetSize(magick_wand,800,600)
-gm.MagickReadImage(magick_wand,"xc:red")
+local swighelpers = require("swiglib.helpers.core")
+local sqlite = require("swiglib.sqlite.core")
-gm.DrawPushGraphicContext(drawing_wand)
+-- s.sqlite3_create_function_v2_lua_callback(function() end)
-gm.DrawSetFillColor(drawing_wand,gm.NewPixelWand())
--- gm.DrawSetFont(drawing_wand, kpse.findfile("DejaVuSerifBold.ttf"))
--- gm.DrawSetFontSize(drawing_wand, 96)
--- gm.DrawAnnotation(drawing_wand,300,200, "LuaTeX")
+local t = [[
+ CREATE TABLE IF NOT EXISTS loggers (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `time` int(11) NOT NULL,
+ `type` int(11) NOT NULL,
+ `action` varchar(15) NOT NULL,
+ `data` longtext,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `id_unique_key` (`id`)
+ )
+ DEFAULT CHARSET = utf8 ;
+]]
-gm.DrawPopGraphicContext(drawing_wand)
-gm.MagickDrawImage(magick_wand,drawing_wand)
+local t = [[
+CREATE TABLE IF NOT EXISTS loggers (
+ `id` INTEGER PRIMARY KEY AUTOINCREMENT,
+ `time` int(11) NOT NULL,
+ `type` int(11) NOT NULL,
+ `action` varchar(15) NOT NULL,
+ `data` longtext
+ );
+]]
-gm.MagickWriteImages(magick_wand,"./luatex-swiglib-test.jpg",1)
+local function execute(name,query)
+ local db = sqlite.new_sqlite3_p_array(1)
+ local okay = sqlite.sqlite3_open(name,db)
+ local dbh = sqlite.sqlite3_p_array_getitem(db,0)
+ if okay ~= sqlite.SQLITE_OK then
+ return false, sqlite.sqlite3_errmsg(dbh)
+ end
+ local result = { }
+ local callback = function(data,nofcolumns,values,fields)
+ local r = { }
+ for i=0,nofcolumns-1 do
+ local field = sqlite.char_p_array_getitem(fields,i)
+ local value = sqlite.char_p_array_getitem(values,i)
+ r[field] = value
+ end
+ result[#result+1] = r
+ return sqlite.SQLITE_OK
+ end
+ local data = nil
+ local message = nil
+ local okay = sqlite.sqlite3_exec_lua_callback(dbh,query,callback,data,message)
+ if okay ~= sqlite.SQLITE_OK then
+ return false, sqlite.sqlite3_errmsg(dbh)
+ end
+ sqlite.sqlite3_close(dbh)
+ sqlite.delete_sqlite3_p_array(db)
+ return result
+end
-gm.DestroyDrawingWand(drawing_wand)
-gm.DestroyMagickWand(magick_wand)
+execute("foo.db",t)
+-- execute("test.db",t)
+
+local template =[[
+ INSERT INTO loggers (
+ `time`,
+ `type`,
+ `action`,
+ `data`
+ ) VALUES (
+ %s,
+ %s,
+ '%s',
+ '%s'
+ ) ;
+]]
+
+-- for i=1,100 do
+-- local t = string.format(template,os.time(),1,"oeps " .. i,"more")
+-- execute("foo.db",t)
+-- end
+
+
+local r = execute("foo.db","select * from loggers;")
+inspect(r)
+
+
+-- inspect(table.sortedkeys(sqlite))
+-- inspect(table.sortedkeys(swighelpers))
+
+
+
+t={
+ "FULLY_WITHIN",
+ "NOT_WITHIN",
+ "PARTLY_WITHIN",
+ "SQLITE3_TEXT",
+ "SQLITE_ABORT",
+ "SQLITE_ABORT_ROLLBACK",
+ "SQLITE_ACCESS_EXISTS",
+ "SQLITE_ACCESS_READ",
+ "SQLITE_ACCESS_READWRITE",
+ "SQLITE_ALTER_TABLE",
+ "SQLITE_ANALYZE",
+ "SQLITE_ANY",
+ "SQLITE_ATTACH",
+ "SQLITE_AUTH",
+ "SQLITE_AUTH_USER",
+ "SQLITE_BLOB",
+ "SQLITE_BUSY",
+ "SQLITE_BUSY_RECOVERY",
+ "SQLITE_BUSY_SNAPSHOT",
+ "SQLITE_CANTOPEN",
+ "SQLITE_CANTOPEN_CONVPATH",
+ "SQLITE_CANTOPEN_FULLPATH",
+ "SQLITE_CANTOPEN_ISDIR",
+ "SQLITE_CANTOPEN_NOTEMPDIR",
+ "SQLITE_CHECKPOINT_FULL",
+ "SQLITE_CHECKPOINT_PASSIVE",
+ "SQLITE_CHECKPOINT_RESTART",
+ "SQLITE_CONFIG_COVERING_INDEX_SCAN",
+ "SQLITE_CONFIG_GETMALLOC",
+ "SQLITE_CONFIG_GETMUTEX",
+ "SQLITE_CONFIG_GETPCACHE",
+ "SQLITE_CONFIG_GETPCACHE2",
+ "SQLITE_CONFIG_HEAP",
+ "SQLITE_CONFIG_LOG",
+ "SQLITE_CONFIG_LOOKASIDE",
+ "SQLITE_CONFIG_MALLOC",
+ "SQLITE_CONFIG_MEMSTATUS",
+ "SQLITE_CONFIG_MMAP_SIZE",
+ "SQLITE_CONFIG_MULTITHREAD",
+ "SQLITE_CONFIG_MUTEX",
+ "SQLITE_CONFIG_PAGECACHE",
+ "SQLITE_CONFIG_PCACHE",
+ "SQLITE_CONFIG_PCACHE2",
+ "SQLITE_CONFIG_SCRATCH",
+ "SQLITE_CONFIG_SERIALIZED",
+ "SQLITE_CONFIG_SINGLETHREAD",
+ "SQLITE_CONFIG_SQLLOG",
+ "SQLITE_CONFIG_URI",
+ "SQLITE_CONFIG_WIN32_HEAPSIZE",
+ "SQLITE_CONSTRAINT",
+ "SQLITE_CONSTRAINT_CHECK",
+ "SQLITE_CONSTRAINT_COMMITHOOK",
+ "SQLITE_CONSTRAINT_FOREIGNKEY",
+ "SQLITE_CONSTRAINT_FUNCTION",
+ "SQLITE_CONSTRAINT_NOTNULL",
+ "SQLITE_CONSTRAINT_PRIMARYKEY",
+ "SQLITE_CONSTRAINT_ROWID",
+ "SQLITE_CONSTRAINT_TRIGGER",
+ "SQLITE_CONSTRAINT_UNIQUE",
+ "SQLITE_CONSTRAINT_VTAB",
+ "SQLITE_COPY",
+ "SQLITE_CORRUPT",
+ "SQLITE_CORRUPT_VTAB",
+ "SQLITE_CREATE_INDEX",
+ "SQLITE_CREATE_TABLE",
+ "SQLITE_CREATE_TEMP_INDEX",
+ "SQLITE_CREATE_TEMP_TABLE",
+ "SQLITE_CREATE_TEMP_TRIGGER",
+ "SQLITE_CREATE_TEMP_VIEW",
+ "SQLITE_CREATE_TRIGGER",
+ "SQLITE_CREATE_VIEW",
+ "SQLITE_CREATE_VTABLE",
+ "SQLITE_DBCONFIG_ENABLE_FKEY",
+ "SQLITE_DBCONFIG_ENABLE_TRIGGER",
+ "SQLITE_DBCONFIG_LOOKASIDE",
+ "SQLITE_DBSTATUS_CACHE_HIT",
+ "SQLITE_DBSTATUS_CACHE_MISS",
+ "SQLITE_DBSTATUS_CACHE_USED",
+ "SQLITE_DBSTATUS_CACHE_WRITE",
+ "SQLITE_DBSTATUS_DEFERRED_FKS",
+ "SQLITE_DBSTATUS_LOOKASIDE_HIT",
+ "SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL",
+ "SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE",
+ "SQLITE_DBSTATUS_LOOKASIDE_USED",
+ "SQLITE_DBSTATUS_MAX",
+ "SQLITE_DBSTATUS_SCHEMA_USED",
+ "SQLITE_DBSTATUS_STMT_USED",
+ "SQLITE_DELETE",
+ "SQLITE_DENY",
+ "SQLITE_DETACH",
+ "SQLITE_DETERMINISTIC",
+ "SQLITE_DONE",
+ "SQLITE_DROP_INDEX",
+ "SQLITE_DROP_TABLE",
+ "SQLITE_DROP_TEMP_INDEX",
+ "SQLITE_DROP_TEMP_TABLE",
+ "SQLITE_DROP_TEMP_TRIGGER",
+ "SQLITE_DROP_TEMP_VIEW",
+ "SQLITE_DROP_TRIGGER",
+ "SQLITE_DROP_VIEW",
+ "SQLITE_DROP_VTABLE",
+ "SQLITE_EMPTY",
+ "SQLITE_ERROR",
+ "SQLITE_FAIL",
+ "SQLITE_FCNTL_BUSYHANDLER",
+ "SQLITE_FCNTL_CHUNK_SIZE",
+ "SQLITE_FCNTL_COMMIT_PHASETWO",
+ "SQLITE_FCNTL_FILE_POINTER",
+ "SQLITE_FCNTL_HAS_MOVED",
+ "SQLITE_FCNTL_LOCKSTATE",
+ "SQLITE_FCNTL_MMAP_SIZE",
+ "SQLITE_FCNTL_OVERWRITE",
+ "SQLITE_FCNTL_PERSIST_WAL",
+ "SQLITE_FCNTL_POWERSAFE_OVERWRITE",
+ "SQLITE_FCNTL_PRAGMA",
+ "SQLITE_FCNTL_SIZE_HINT",
+ "SQLITE_FCNTL_SYNC",
+ "SQLITE_FCNTL_SYNC_OMITTED",
+ "SQLITE_FCNTL_TEMPFILENAME",
+ "SQLITE_FCNTL_TRACE",
+ "SQLITE_FCNTL_VFSNAME",
+ "SQLITE_FCNTL_WIN32_AV_RETRY",
+ "SQLITE_FCNTL_WIN32_SET_HANDLE",
+ "SQLITE_FLOAT",
+ "SQLITE_FORMAT",
+ "SQLITE_FULL",
+ "SQLITE_FUNCTION",
+ "SQLITE_GET_LOCKPROXYFILE",
+ "SQLITE_IGNORE",
+ "SQLITE_INDEX_CONSTRAINT_EQ",
+ "SQLITE_INDEX_CONSTRAINT_GE",
+ "SQLITE_INDEX_CONSTRAINT_GT",
+ "SQLITE_INDEX_CONSTRAINT_LE",
+ "SQLITE_INDEX_CONSTRAINT_LT",
+ "SQLITE_INDEX_CONSTRAINT_MATCH",
+ "SQLITE_INSERT",
+ "SQLITE_INTEGER",
+ "SQLITE_INTERNAL",
+ "SQLITE_INTERRUPT",
+ "SQLITE_IOCAP_ATOMIC",
+ "SQLITE_IOCAP_ATOMIC16K",
+ "SQLITE_IOCAP_ATOMIC1K",
+ "SQLITE_IOCAP_ATOMIC2K",
+ "SQLITE_IOCAP_ATOMIC32K",
+ "SQLITE_IOCAP_ATOMIC4K",
+ "SQLITE_IOCAP_ATOMIC512",
+ "SQLITE_IOCAP_ATOMIC64K",
+ "SQLITE_IOCAP_ATOMIC8K",
+ "SQLITE_IOCAP_IMMUTABLE",
+ "SQLITE_IOCAP_POWERSAFE_OVERWRITE",
+ "SQLITE_IOCAP_SAFE_APPEND",
+ "SQLITE_IOCAP_SEQUENTIAL",
+ "SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN",
+ "SQLITE_IOERR",
+ "SQLITE_IOERR_ACCESS",
+ "SQLITE_IOERR_BLOCKED",
+ "SQLITE_IOERR_CHECKRESERVEDLOCK",
+ "SQLITE_IOERR_CLOSE",
+ "SQLITE_IOERR_CONVPATH",
+ "SQLITE_IOERR_DELETE",
+ "SQLITE_IOERR_DELETE_NOENT",
+ "SQLITE_IOERR_DIR_CLOSE",
+ "SQLITE_IOERR_DIR_FSYNC",
+ "SQLITE_IOERR_FSTAT",
+ "SQLITE_IOERR_FSYNC",
+ "SQLITE_IOERR_GETTEMPPATH",
+ "SQLITE_IOERR_LOCK",
+ "SQLITE_IOERR_MMAP",
+ "SQLITE_IOERR_NOMEM",
+ "SQLITE_IOERR_RDLOCK",
+ "SQLITE_IOERR_READ",
+ "SQLITE_IOERR_SEEK",
+ "SQLITE_IOERR_SHMLOCK",
+ "SQLITE_IOERR_SHMMAP",
+ "SQLITE_IOERR_SHMOPEN",
+ "SQLITE_IOERR_SHMSIZE",
+ "SQLITE_IOERR_SHORT_READ",
+ "SQLITE_IOERR_TRUNCATE",
+ "SQLITE_IOERR_UNLOCK",
+ "SQLITE_IOERR_WRITE",
+ "SQLITE_LAST_ERRNO",
+ "SQLITE_LIMIT_ATTACHED",
+ "SQLITE_LIMIT_COLUMN",
+ "SQLITE_LIMIT_COMPOUND_SELECT",
+ "SQLITE_LIMIT_EXPR_DEPTH",
+ "SQLITE_LIMIT_FUNCTION_ARG",
+ "SQLITE_LIMIT_LENGTH",
+ "SQLITE_LIMIT_LIKE_PATTERN_LENGTH",
+ "SQLITE_LIMIT_SQL_LENGTH",
+ "SQLITE_LIMIT_TRIGGER_DEPTH",
+ "SQLITE_LIMIT_VARIABLE_NUMBER",
+ "SQLITE_LIMIT_VDBE_OP",
+ "SQLITE_LIMIT_WORKER_THREADS",
+ "SQLITE_LOCKED",
+ "SQLITE_LOCKED_SHAREDCACHE",
+ "SQLITE_LOCK_EXCLUSIVE",
+ "SQLITE_LOCK_NONE",
+ "SQLITE_LOCK_PENDING",
+ "SQLITE_LOCK_RESERVED",
+ "SQLITE_LOCK_SHARED",
+ "SQLITE_MISMATCH",
+ "SQLITE_MISUSE",
+ "SQLITE_MUTEX_FAST",
+ "SQLITE_MUTEX_RECURSIVE",
+ "SQLITE_MUTEX_STATIC_APP1",
+ "SQLITE_MUTEX_STATIC_APP2",
+ "SQLITE_MUTEX_STATIC_APP3",
+ "SQLITE_MUTEX_STATIC_LRU",
+ "SQLITE_MUTEX_STATIC_LRU2",
+ "SQLITE_MUTEX_STATIC_MASTER",
+ "SQLITE_MUTEX_STATIC_MEM",
+ "SQLITE_MUTEX_STATIC_MEM2",
+ "SQLITE_MUTEX_STATIC_OPEN",
+ "SQLITE_MUTEX_STATIC_PMEM",
+ "SQLITE_MUTEX_STATIC_PRNG",
+ "SQLITE_NOLFS",
+ "SQLITE_NOMEM",
+ "SQLITE_NOTADB",
+ "SQLITE_NOTFOUND",
+ "SQLITE_NOTICE",
+ "SQLITE_NOTICE_RECOVER_ROLLBACK",
+ "SQLITE_NOTICE_RECOVER_WAL",
+ "SQLITE_NULL",
+ "SQLITE_OK",
+ "SQLITE_OPEN_AUTOPROXY",
+ "SQLITE_OPEN_CREATE",
+ "SQLITE_OPEN_DELETEONCLOSE",
+ "SQLITE_OPEN_EXCLUSIVE",
+ "SQLITE_OPEN_FULLMUTEX",
+ "SQLITE_OPEN_MAIN_DB",
+ "SQLITE_OPEN_MAIN_JOURNAL",
+ "SQLITE_OPEN_MASTER_JOURNAL",
+ "SQLITE_OPEN_MEMORY",
+ "SQLITE_OPEN_NOMUTEX",
+ "SQLITE_OPEN_PRIVATECACHE",
+ "SQLITE_OPEN_READONLY",
+ "SQLITE_OPEN_READWRITE",
+ "SQLITE_OPEN_SHAREDCACHE",
+ "SQLITE_OPEN_SUBJOURNAL",
+ "SQLITE_OPEN_TEMP_DB",
+ "SQLITE_OPEN_TEMP_JOURNAL",
+ "SQLITE_OPEN_TRANSIENT_DB",
+ "SQLITE_OPEN_URI",
+ "SQLITE_OPEN_WAL",
+ "SQLITE_PERM",
+ "SQLITE_PRAGMA",
+ "SQLITE_PROTOCOL",
+ "SQLITE_RANGE",
+ "SQLITE_READ",
+ "SQLITE_READONLY",
+ "SQLITE_READONLY_CANTLOCK",
+ "SQLITE_READONLY_DBMOVED",
+ "SQLITE_READONLY_RECOVERY",
+ "SQLITE_READONLY_ROLLBACK",
+ "SQLITE_RECURSIVE",
+ "SQLITE_REINDEX",
+ "SQLITE_REPLACE",
+ "SQLITE_ROLLBACK",
+ "SQLITE_ROW",
+ "SQLITE_SAVEPOINT",
+ "SQLITE_SCHEMA",
+ "SQLITE_SELECT",
+ "SQLITE_SET_LOCKPROXYFILE",
+ "SQLITE_SHM_EXCLUSIVE",
+ "SQLITE_SHM_LOCK",
+ "SQLITE_SHM_NLOCK",
+ "SQLITE_SHM_SHARED",
+ "SQLITE_SHM_UNLOCK",
+ "SQLITE_SOURCE_ID",
+ "SQLITE_STATUS_MALLOC_COUNT",
+ "SQLITE_STATUS_MALLOC_SIZE",
+ "SQLITE_STATUS_MEMORY_USED",
+ "SQLITE_STATUS_PAGECACHE_OVERFLOW",
+ "SQLITE_STATUS_PAGECACHE_SIZE",
+ "SQLITE_STATUS_PAGECACHE_USED",
+ "SQLITE_STATUS_PARSER_STACK",
+ "SQLITE_STATUS_SCRATCH_OVERFLOW",
+ "SQLITE_STATUS_SCRATCH_SIZE",
+ "SQLITE_STATUS_SCRATCH_USED",
+ "SQLITE_STMTSTATUS_AUTOINDEX",
+ "SQLITE_STMTSTATUS_FULLSCAN_STEP",
+ "SQLITE_STMTSTATUS_SORT",
+ "SQLITE_STMTSTATUS_VM_STEP",
+ "SQLITE_SYNC_DATAONLY",
+ "SQLITE_SYNC_FULL",
+ "SQLITE_SYNC_NORMAL",
+ "SQLITE_TESTCTRL_ALWAYS",
+ "SQLITE_TESTCTRL_ASSERT",
+ "SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS",
+ "SQLITE_TESTCTRL_BITVEC_TEST",
+ "SQLITE_TESTCTRL_BYTEORDER",
+ "SQLITE_TESTCTRL_EXPLAIN_STMT",
+ "SQLITE_TESTCTRL_FAULT_INSTALL",
+ "SQLITE_TESTCTRL_FIRST",
+ "SQLITE_TESTCTRL_ISINIT",
+ "SQLITE_TESTCTRL_ISKEYWORD",
+ "SQLITE_TESTCTRL_LAST",
+ "SQLITE_TESTCTRL_LOCALTIME_FAULT",
+ "SQLITE_TESTCTRL_NEVER_CORRUPT",
+ "SQLITE_TESTCTRL_OPTIMIZATIONS",
+ "SQLITE_TESTCTRL_PENDING_BYTE",
+ "SQLITE_TESTCTRL_PRNG_RESET",
+ "SQLITE_TESTCTRL_PRNG_RESTORE",
+ "SQLITE_TESTCTRL_PRNG_SAVE",
+ "SQLITE_TESTCTRL_RESERVE",
+ "SQLITE_TESTCTRL_SCRATCHMALLOC",
+ "SQLITE_TESTCTRL_SORTER_MMAP",
+ "SQLITE_TESTCTRL_VDBE_COVERAGE",
+ "SQLITE_TEXT",
+ "SQLITE_TOOBIG",
+ "SQLITE_TRANSACTION",
+ "SQLITE_UPDATE",
+ "SQLITE_UTF16",
+ "SQLITE_UTF16BE",
+ "SQLITE_UTF16LE",
+ "SQLITE_UTF16_ALIGNED",
+ "SQLITE_UTF8",
+ "SQLITE_VERSION",
+ "SQLITE_VERSION_NUMBER",
+ "SQLITE_VTAB_CONSTRAINT_SUPPORT",
+ "SQLITE_WARNING",
+ "SQLITE_WARNING_AUTOINDEX",
+ "call_callback_sqlite3_create_collation_v2_1",
+ "call_callback_sqlite3_create_collation_v2_2",
+ "call_callback_sqlite3_create_function16_1",
+ "call_callback_sqlite3_create_function16_2",
+ "call_callback_sqlite3_create_function16_3",
+ "call_callback_sqlite3_create_function_1",
+ "call_callback_sqlite3_create_function_2",
+ "call_callback_sqlite3_create_function_3",
+ "call_callback_sqlite3_create_function_v2_1",
+ "call_callback_sqlite3_create_function_v2_2",
+ "call_callback_sqlite3_create_function_v2_3",
+ "call_callback_sqlite3_create_function_v2_4",
+ "call_callback_sqlite3_rtree_query_callback_1",
+ "call_callback_sqlite3_rtree_query_callback_2",
+ "char_p_array_getitem",
+ "char_p_array_setitem",
+ "delete_char_p_array",
+ "delete_sqlite3_p_array",
+ "delete_sqlite3_rtree_dbl_array",
+ "delete_sqlite3_stmt_p_array",
+ "delete_sqlite3_value_p_array",
+ "delete_sqlite3_vtab_cursor_p_array",
+ "delete_sqlite3_vtab_p_array",
+ "delete_void_p_array",
+ "new_char_p_array",
+ "new_sqlite3_p_array",
+ "new_sqlite3_rtree_dbl_array",
+ "new_sqlite3_stmt_p_array",
+ "new_sqlite3_value_p_array",
+ "new_sqlite3_vtab_cursor_p_array",
+ "new_sqlite3_vtab_p_array",
+ "new_void_p_array",
+ "sqlite3_aggregate_context",
+ "sqlite3_aggregate_count",
+ "sqlite3_auto_extension",
+ "sqlite3_auto_extension_lua_callback",
+ "sqlite3_backup_finish",
+ "sqlite3_backup_init",
+ "sqlite3_backup_pagecount",
+ "sqlite3_backup_remaining",
+ "sqlite3_backup_step",
+ "sqlite3_bind_blob",
+ "sqlite3_bind_blob64",
+ "sqlite3_bind_blob64_lua_callback",
+ "sqlite3_bind_blob_lua_callback",
+ "sqlite3_bind_double",
+ "sqlite3_bind_int",
+ "sqlite3_bind_int64",
+ "sqlite3_bind_null",
+ "sqlite3_bind_parameter_count",
+ "sqlite3_bind_parameter_index",
+ "sqlite3_bind_parameter_name",
+ "sqlite3_bind_text",
+ "sqlite3_bind_text16",
+ "sqlite3_bind_text16_lua_callback",
+ "sqlite3_bind_text64",
+ "sqlite3_bind_text64_lua_callback",
+ "sqlite3_bind_text_lua_callback",
+ "sqlite3_bind_value",
+ "sqlite3_bind_zeroblob",
+ "sqlite3_blob_bytes",
+ "sqlite3_blob_close",
+ "sqlite3_blob_open",
+ "sqlite3_blob_read",
+ "sqlite3_blob_reopen",
+ "sqlite3_blob_write",
+ "sqlite3_busy_handler",
+ "sqlite3_busy_handler_lua_callback",
+ "sqlite3_busy_timeout",
+ "sqlite3_cancel_auto_extension",
+ "sqlite3_cancel_auto_extension_lua_callback",
+ "sqlite3_changes",
+ "sqlite3_clear_bindings",
+ "sqlite3_close",
+ "sqlite3_close_v2",
+ "sqlite3_collation_needed",
+ "sqlite3_collation_needed16",
+ "sqlite3_collation_needed16_lua_callback",
+ "sqlite3_collation_needed_lua_callback",
+ "sqlite3_column_blob",
+ "sqlite3_column_bytes",
+ "sqlite3_column_bytes16",
+ "sqlite3_column_count",
+ "sqlite3_column_decltype",
+ "sqlite3_column_decltype16",
+ "sqlite3_column_double",
+ "sqlite3_column_int",
+ "sqlite3_column_int64",
+ "sqlite3_column_name",
+ "sqlite3_column_name16",
+ "sqlite3_column_text",
+ "sqlite3_column_text16",
+ "sqlite3_column_type",
+ "sqlite3_column_value",
+ "sqlite3_commit_hook",
+ "sqlite3_commit_hook_lua_callback",
+ "sqlite3_compileoption_get",
+ "sqlite3_compileoption_used",
+ "sqlite3_complete",
+ "sqlite3_complete16",
+ "sqlite3_config",
+ "sqlite3_context_db_handle",
+ "sqlite3_create_collation",
+ "sqlite3_create_collation16",
+ "sqlite3_create_collation16_lua_callback",
+ "sqlite3_create_collation_lua_callback",
+ "sqlite3_create_collation_v2",
+ "sqlite3_create_collation_v2_lua_callback",
+ "sqlite3_create_function",
+ "sqlite3_create_function16",
+ "sqlite3_create_function16_lua_callback",
+ "sqlite3_create_function_lua_callback",
+ "sqlite3_create_function_v2",
+ "sqlite3_create_function_v2_lua_callback",
+ "sqlite3_create_module",
+ "sqlite3_create_module_v2",
+ "sqlite3_create_module_v2_lua_callback",
+ "sqlite3_data_count",
+ "sqlite3_db_config",
+ "sqlite3_db_filename",
+ "sqlite3_db_handle",
+ "sqlite3_db_mutex",
+ "sqlite3_db_readonly",
+ "sqlite3_db_release_memory",
+ "sqlite3_db_status",
+ "sqlite3_declare_vtab",
+ "sqlite3_enable_load_extension",
+ "sqlite3_enable_shared_cache",
+ "sqlite3_errcode",
+ "sqlite3_errmsg",
+ "sqlite3_errmsg16",
+ "sqlite3_errstr",
+ "sqlite3_exec",
+ "sqlite3_exec_lua_callback",
+ "sqlite3_expired",
+ "sqlite3_extended_errcode",
+ "sqlite3_extended_result_codes",
+ "sqlite3_file",
+ "sqlite3_file_control",
+ "sqlite3_finalize",
+ "sqlite3_free",
+ "sqlite3_free_table",
+ "sqlite3_get_autocommit",
+ "sqlite3_get_auxdata",
+ "sqlite3_get_table",
+ "sqlite3_global_recover",
+ "sqlite3_index_info",
+ "sqlite3_index_info_aConstraint",
+ "sqlite3_index_info_aConstraintUsage",
+ "sqlite3_index_info_aOrderBy",
+ "sqlite3_initialize",
+ "sqlite3_interrupt",
+ "sqlite3_io_methods",
+ "sqlite3_last_insert_rowid",
+ "sqlite3_libversion",
+ "sqlite3_libversion_number",
+ "sqlite3_limit",
+ "sqlite3_load_extension",
+ "sqlite3_log",
+ "sqlite3_malloc",
+ "sqlite3_malloc64",
+ "sqlite3_mem_methods",
+ "sqlite3_memory_alarm",
+ "sqlite3_memory_highwater",
+ "sqlite3_memory_used",
+ "sqlite3_module",
+ "sqlite3_mprintf",
+ "sqlite3_msize",
+ "sqlite3_mutex_alloc",
+ "sqlite3_mutex_enter",
+ "sqlite3_mutex_free",
+ "sqlite3_mutex_leave",
+ "sqlite3_mutex_methods",
+ "sqlite3_mutex_try",
+ "sqlite3_next_stmt",
+ "sqlite3_open",
+ "sqlite3_open16",
+ "sqlite3_open_v2",
+ "sqlite3_os_end",
+ "sqlite3_os_init",
+ "sqlite3_overload_function",
+ "sqlite3_p_array_getitem",
+ "sqlite3_p_array_setitem",
+ "sqlite3_pcache_methods",
+ "sqlite3_pcache_methods2",
+ "sqlite3_pcache_page",
+ "sqlite3_prepare",
+ "sqlite3_prepare16",
+ "sqlite3_prepare16_v2",
+ "sqlite3_prepare_v2",
+ "sqlite3_profile",
+ "sqlite3_progress_handler",
+ "sqlite3_progress_handler_lua_callback",
+ "sqlite3_randomness",
+ "sqlite3_realloc",
+ "sqlite3_realloc64",
+ "sqlite3_release_memory",
+ "sqlite3_reset",
+ "sqlite3_reset_auto_extension",
+ "sqlite3_result_blob",
+ "sqlite3_result_blob64",
+ "sqlite3_result_blob64_lua_callback",
+ "sqlite3_result_blob_lua_callback",
+ "sqlite3_result_double",
+ "sqlite3_result_error",
+ "sqlite3_result_error16",
+ "sqlite3_result_error_code",
+ "sqlite3_result_error_nomem",
+ "sqlite3_result_error_toobig",
+ "sqlite3_result_int",
+ "sqlite3_result_int64",
+ "sqlite3_result_null",
+ "sqlite3_result_text",
+ "sqlite3_result_text16",
+ "sqlite3_result_text16_lua_callback",
+ "sqlite3_result_text16be",
+ "sqlite3_result_text16be_lua_callback",
+ "sqlite3_result_text16le",
+ "sqlite3_result_text16le_lua_callback",
+ "sqlite3_result_text64",
+ "sqlite3_result_text64_lua_callback",
+ "sqlite3_result_text_lua_callback",
+ "sqlite3_result_value",
+ "sqlite3_result_zeroblob",
+ "sqlite3_rollback_hook",
+ "sqlite3_rollback_hook_lua_callback",
+ "sqlite3_rtree_dbl_array_getitem",
+ "sqlite3_rtree_dbl_array_setitem",
+ "sqlite3_rtree_geometry",
+ "sqlite3_rtree_geometry_callback",
+ "sqlite3_rtree_geometry_callback_lua_callback",
+ "sqlite3_rtree_query_callback",
+ "sqlite3_rtree_query_callback_lua_callback",
+ "sqlite3_rtree_query_info",
+ "sqlite3_set_authorizer",
+ "sqlite3_set_authorizer_lua_callback",
+ "sqlite3_set_auxdata",
+ "sqlite3_set_auxdata_lua_callback",
+ "sqlite3_shutdown",
+ "sqlite3_sleep",
+ "sqlite3_snprintf",
+ "sqlite3_soft_heap_limit",
+ "sqlite3_soft_heap_limit64",
+ "sqlite3_sourceid",
+ "sqlite3_sql",
+ "sqlite3_status",
+ "sqlite3_step",
+ "sqlite3_stmt_busy",
+ "sqlite3_stmt_p_array_getitem",
+ "sqlite3_stmt_p_array_setitem",
+ "sqlite3_stmt_readonly",
+ "sqlite3_stmt_status",
+ "sqlite3_strglob",
+ "sqlite3_stricmp",
+ "sqlite3_strnicmp",
+ "sqlite3_test_control",
+ "sqlite3_thread_cleanup",
+ "sqlite3_threadsafe",
+ "sqlite3_total_changes",
+ "sqlite3_trace",
+ "sqlite3_trace_lua_callback",
+ "sqlite3_transfer_bindings",
+ "sqlite3_update_hook",
+ "sqlite3_update_hook_lua_callback",
+ "sqlite3_uri_boolean",
+ "sqlite3_uri_int64",
+ "sqlite3_uri_parameter",
+ "sqlite3_user_data",
+ "sqlite3_value_blob",
+ "sqlite3_value_bytes",
+ "sqlite3_value_bytes16",
+ "sqlite3_value_double",
+ "sqlite3_value_int",
+ "sqlite3_value_int64",
+ "sqlite3_value_numeric_type",
+ "sqlite3_value_p_array_getitem",
+ "sqlite3_value_p_array_setitem",
+ "sqlite3_value_text",
+ "sqlite3_value_text16",
+ "sqlite3_value_text16be",
+ "sqlite3_value_text16le",
+ "sqlite3_value_type",
+ "sqlite3_vfs",
+ "sqlite3_vfs_find",
+ "sqlite3_vfs_register",
+ "sqlite3_vfs_unregister",
+ "sqlite3_vtab",
+ "sqlite3_vtab_config",
+ "sqlite3_vtab_cursor",
+ "sqlite3_vtab_cursor_p_array_getitem",
+ "sqlite3_vtab_cursor_p_array_setitem",
+ "sqlite3_vtab_on_conflict",
+ "sqlite3_vtab_p_array_getitem",
+ "sqlite3_vtab_p_array_setitem",
+ "sqlite3_wal_autocheckpoint",
+ "sqlite3_wal_checkpoint",
+ "sqlite3_wal_checkpoint_v2",
+ "sqlite3_wal_hook",
+ "sqlite3_wal_hook_lua_callback",
+ "void_p_array_getitem",
+ "void_p_array_setitem",
+}
diff --git a/src/fontloader/misc/fontloader-swiglib.lua b/src/fontloader/misc/fontloader-swiglib.lua
index 7ffcdc3..3108dd4 100644
--- a/src/fontloader/misc/fontloader-swiglib.lua
+++ b/src/fontloader/misc/fontloader-swiglib.lua
@@ -8,7 +8,8 @@ if not modules then modules = { } end modules ['luatex-swiglib'] = {
local savedrequire = require
-local libsuffix = os.type == "windows" and ".dll" or ".so"
+local libsuffix = os.type == "windows" and ".dll" or ".so"
+local pathsplit = "([^" .. io.pathseparator .. "]+)"
function requireswiglib(required,version)
local library = package.loaded[required]
@@ -17,7 +18,7 @@ function requireswiglib(required,version)
else
local name = string.gsub(required,"%.","/") .. libsuffix
local list = kpse.show_path("clua")
- for root in string.gmatch(list,"([^;]+)") do
+ for root in string.gmatch(list,pathsplit) do
local full = false
if type(version) == "string" and version ~= "" then
full = root .. "/" .. version .. "/" .. name
diff --git a/src/fontloader/misc/fontloader-util-str.lua b/src/fontloader/misc/fontloader-util-str.lua
index 42dbf16..fb51025 100644
--- a/src/fontloader/misc/fontloader-util-str.lua
+++ b/src/fontloader/misc/fontloader-util-str.lua
@@ -826,7 +826,8 @@ local format_extension = function(extensions,f,name)
local t = { }
for i=1,f do
n = n + 1
- t[#t+1] = "a" .. n
+ -- t[#t+1] = "a" .. n
+ t[i] = "a" .. n
end
return format(extension,unpack(t))
end
diff --git a/src/fontloader/runtime/fontloader-basics-gen.lua b/src/fontloader/runtime/fontloader-basics-gen.lua
index 8ea93cc..2be55cc 100644
--- a/src/fontloader/runtime/fontloader-basics-gen.lua
+++ b/src/fontloader/runtime/fontloader-basics-gen.lua
@@ -305,6 +305,7 @@ function caches.loaddata(readables,name,writable)
local loader = false
local luaname, lucname = makefullname(path,name)
if lfs.isfile(lucname) then
+ texio.write(string.format("(load luc: %s)",lucname))
loader = loadfile(lucname)
end
if not loader and lfs.isfile(luaname) then
diff --git a/src/fontloader/runtime/fontloader-reference.lua b/src/fontloader/runtime/fontloader-reference.lua
index 6b899a1..7738118 100644
--- a/src/fontloader/runtime/fontloader-reference.lua
+++ b/src/fontloader/runtime/fontloader-reference.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 08/27/16 13:35:36
+-- merge date : 09/12/16 18:27:00
do -- begin closure to overcome local limits and interference
@@ -3953,7 +3953,7 @@ local format_extension=function(extensions,f,name)
local t={}
for i=1,f do
n=n+1
- t[#t+1]="a"..n
+ t[i]="a"..n
end
return format(extension,unpack(t))
end
@@ -4487,6 +4487,7 @@ function caches.loaddata(readables,name,writable)
local loader=false
local luaname,lucname=makefullname(path,name)
if lfs.isfile(lucname) then
+ texio.write(string.format("(load luc: %s)",lucname))
loader=loadfile(lucname)
end
if not loader and lfs.isfile(luaname) then
@@ -5797,7 +5798,9 @@ end
local unscaled={
ScriptPercentScaleDown=true,
ScriptScriptPercentScaleDown=true,
- RadicalDegreeBottomRaisePercent=true
+ RadicalDegreeBottomRaisePercent=true,
+ NoLimitSupFactor=true,
+ NoLimitSubFactor=true,
}
function constructors.assignmathparameters(target,original)
local mathparameters=original.mathparameters
@@ -7165,6 +7168,7 @@ local match,format,find,concat,gsub,lower=string.match,string.format,string.find
local P,R,S,C,Ct,Cc,lpegmatch=lpeg.P,lpeg.R,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cc,lpeg.match
local floor=math.floor
local formatters=string.formatters
+local sortedhash,sortedkeys=table.sortedhash,table.sortedkeys
local trace_loading=false trackers.register("fonts.loading",function(v) trace_loading=v end)
local trace_mapping=false trackers.register("fonts.mapping",function(v) trace_mapping=v end)
local report_fonts=logs.reporter("fonts","loading")
@@ -7256,28 +7260,32 @@ mappings.fromunicode16=fromunicode16
local ligseparator=P("_")
local varseparator=P(".")
local namesplitter=Ct(C((1-ligseparator-varseparator)^1)*(ligseparator*C((1-ligseparator-varseparator)^1))^0)
-local overloads=allocate {
- IJ={ name="I_J",unicode={ 0x49,0x4A },mess=0x0132 },
- ij={ name="i_j",unicode={ 0x69,0x6A },mess=0x0133 },
- ff={ name="f_f",unicode={ 0x66,0x66 },mess=0xFB00 },
- fi={ name="f_i",unicode={ 0x66,0x69 },mess=0xFB01 },
- fl={ name="f_l",unicode={ 0x66,0x6C },mess=0xFB02 },
- ffi={ name="f_f_i",unicode={ 0x66,0x66,0x69 },mess=0xFB03 },
- ffl={ name="f_f_l",unicode={ 0x66,0x66,0x6C },mess=0xFB04 },
- fj={ name="f_j",unicode={ 0x66,0x6A } },
- fk={ name="f_k",unicode={ 0x66,0x6B } },
-}
-for k,v in next,overloads do
- local name=v.name
- local mess=v.mess
- if name then
- overloads[name]=v
- end
- if mess then
- overloads[mess]=v
+do
+ local overloads=allocate {
+ IJ={ name="I_J",unicode={ 0x49,0x4A },mess=0x0132 },
+ ij={ name="i_j",unicode={ 0x69,0x6A },mess=0x0133 },
+ ff={ name="f_f",unicode={ 0x66,0x66 },mess=0xFB00 },
+ fi={ name="f_i",unicode={ 0x66,0x69 },mess=0xFB01 },
+ fl={ name="f_l",unicode={ 0x66,0x6C },mess=0xFB02 },
+ ffi={ name="f_f_i",unicode={ 0x66,0x66,0x69 },mess=0xFB03 },
+ ffl={ name="f_f_l",unicode={ 0x66,0x66,0x6C },mess=0xFB04 },
+ fj={ name="f_j",unicode={ 0x66,0x6A } },
+ fk={ name="f_k",unicode={ 0x66,0x6B } },
+ }
+ local o={}
+ for k,v in next,overloads do
+ local name=v.name
+ local mess=v.mess
+ if name then
+ o[name]=v
+ end
+ if mess then
+ o[mess]=v
+ end
+ o[k]=v
end
+ mappings.overloads=o
end
-mappings.overloads=overloads
function mappings.addtounicode(data,filename,checklookups)
local resources=data.resources
local unicodes=resources.unicodes
@@ -7289,6 +7297,7 @@ function mappings.addtounicode(data,filename,checklookups)
end
local properties=data.properties
local descriptions=data.descriptions
+ local overloads=mappings.overloads
unicodes['space']=unicodes['space'] or 32
unicodes['hyphen']=unicodes['hyphen'] or 45
unicodes['zwj']=unicodes['zwj'] or 0x200D
@@ -7311,10 +7320,13 @@ function mappings.addtounicode(data,filename,checklookups)
end
local ns=0
local nl=0
- for du,glyph in next,descriptions do
+ local dlist=sortedkeys(descriptions)
+ for i=1,#dlist do
+ local du=dlist[i]
+ local glyph=descriptions[du]
local name=glyph.name
if name then
- local overload=overloads[name]
+ local overload=overloads[name] or overloads[du]
if overload then
glyph.unicode=overload.unicode
else
@@ -7433,6 +7445,11 @@ function mappings.addtounicode(data,filename,checklookups)
end
end
end
+ else
+ local overload=overloads[du]
+ if overload then
+ glyph.unicode=overload.unicode
+ end
end
end
if type(checklookups)=="function" then
@@ -7440,7 +7457,9 @@ function mappings.addtounicode(data,filename,checklookups)
end
local collected=false
local unicoded=0
- for unicode,glyph in next,descriptions do
+ for i=1,#dlist do
+ local du=dlist[i]
+ local glyph=descriptions[du]
if glyph.class=="ligature" and (force_ligatures or not glyph.unicode) then
if not collected then
collected=fonts.handlers.otf.readers.getcomponents(data)
@@ -7448,7 +7467,7 @@ function mappings.addtounicode(data,filename,checklookups)
break
end
end
- local u=collected[unicode]
+ local u=collected[du]
if u then
local n=#u
for i=1,n do
@@ -7472,7 +7491,9 @@ function mappings.addtounicode(data,filename,checklookups)
report_fonts("%n ligature tounicode mappings deduced from gsub ligature features",unicoded)
end
if trace_mapping then
- for unic,glyph in table.sortedhash(descriptions) do
+ for i=1,#dlist do
+ local du=dlist[i]
+ local glyph=descriptions[du]
local name=glyph.name or "-"
local index=glyph.index or 0
local unicode=glyph.unicode
@@ -7482,12 +7503,12 @@ function mappings.addtounicode(data,filename,checklookups)
for i=1,#unicode do
unicodes[i]=formatters("%U",unicode[i])
end
- report_fonts("internal slot %U, name %a, unicode %U, tounicode % t",index,name,unic,unicodes)
+ report_fonts("internal slot %U, name %a, unicode %U, tounicode % t",index,name,du,unicodes)
else
- report_fonts("internal slot %U, name %a, unicode %U, tounicode %U",index,name,unic,unicode)
+ report_fonts("internal slot %U, name %a, unicode %U, tounicode %U",index,name,du,unicode)
end
else
- report_fonts("internal slot %U, name %a, unicode %U",index,name,unic)
+ report_fonts("internal slot %U, name %a, unicode %U",index,name,du)
end
end
end
@@ -12820,7 +12841,7 @@ function readers.gdef(f,fontdata,specification)
end
end
end
- if marksetsoffset then
+ if marksetsoffset and marksetsoffset>tableoffset then
setposition(f,marksetsoffset)
local format=readushort(f)
if format==1 then
@@ -15320,7 +15341,7 @@ local trace_defining=false registertracker("fonts.defining",function(v) trace_de
local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
-otf.version=3.026
+otf.version=3.027
otf.cache=containers.define("fonts","otl",otf.version,true)
otf.svgcache=containers.define("fonts","svg",otf.version,true)
otf.pdfcache=containers.define("fonts","pdf",otf.version,true)
@@ -26611,6 +26632,19 @@ otffeatures.register {
node=reencode,
}
}
+local function ignore(tfmdata,key,value)
+ if value then
+ tfmdata.mathparameters=nil
+ end
+end
+otffeatures.register {
+ name="ignoremathconstants",
+ description="ignore math constants table",
+ initializers={
+ base=ignore,
+ node=ignore,
+ }
+}
end -- closure
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 3688c3a..41080cf 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -3506,6 +3506,49 @@ local show_cache = function ( )
end
-----------------------------------------------------------------------
+--- API assumptions of the fontloader
+-----------------------------------------------------------------------
+--- PHG: we need to investigate these, maybe they’re useful as early
+--- hooks
+
+local ignoredfile = function () return false end
+
+local reportmissingbase = function ()
+ logreport ("info", 0, "db", --> bug‽
+ "Font name database not found but expected by fontloader.")
+ fonts.names.reportmissingbase = nil
+end
+
+local reportmissingname = function ()
+ logreport ("info", 0, "db", --> bug‽
+ "Fontloader attempted to lookup name before Luaotfload \z
+ was initialized.")
+ fonts.names.reportmissingname = nil
+end
+
+local getfilename = function (a1, a2)
+ logreport ("info", 6, "db", --> bug‽
+ "Fontloader looked up font file (%s, %s) before Luaotfload \z
+ was initialized.", tostring(a1), tostring(a2))
+ return lookup_fullpath (a1, a2)
+end
+
+local resolve = function (name, subfont)
+ logreport ("info", 6, "db", --> bug‽
+ "Fontloader attempted to resolve name (%s, %s) before \z
+ Luaotfload was initialized.", tostring(name), tostring(subfont))
+ return lookup_font_name { name = name, sub = subfont }
+end
+
+local api = {
+ ignoredfile = ignoredfile,
+ reportmissingbase = reportmissingbase,
+ reportmissingname = reportmissingname,
+ getfilename = getfilename,
+ resolve = resolve,
+}
+
+-----------------------------------------------------------------------
--- export functionality to the namespace “fonts.names”
-----------------------------------------------------------------------
@@ -3557,6 +3600,7 @@ return {
names.lookups = nil --- contains the lookup cache
for sym, ref in next, export do names[sym] = ref end
+ for sym, ref in next, api do names[sym] = names[sym] or ref end
return true
end
}