From 074355a0d96d204d92307a4066c231cb89b2d8bf Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 10 Nov 2013 19:22:13 +0100 Subject: [db] call fontloader.close() for some minor gain --- luaotfload-database.lua | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 5198b16..0b9f1f8 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -6,10 +6,35 @@ if not modules then modules = { } end modules ['luaotfload-database'] = { license = "GNU GPL v2" } ---- TODO: if the specification is an absolute filename with a font not in the ---- database, add the font to the database and load it. There is a small ---- difficulty with the filenames of the TEXMF tree that are referenced as ---- relative paths... +--[[doc-- + + Some statistics: + + a) TL 2012, mkluatexfontdb --force + b) v2.4, luaotfload-tool --update --force + c) v2.4, luaotfload-tool --update --force --formats=+afm,pfa,pfb + d) Context, mtxrun --script fonts --reload --force + + (Keep in mind that Context does index fewer fonts since it + considers only the contents of the minimals tree, not the + tex live one!) + + time (m:s) peak VmSize (B) + a 1:19 386 018 + b 0:37 715 797 + c 2:27 1 017 674 + d 0:44 1 082 313 + + Most of the increase in memory consumption from version 1.x to 2.2+ + can be attributed to the move from single-pass to a multi-pass + approach to building the index: Information is first gathered from + all reachable fonts and only afterwards processed, classified and + discarded. Also, there is a good deal of additional stuff kept in + the database now: two extra tables for file names and font families + have been added, making font lookups more efficient while improving + maintainability of the code. + +--doc]]-- local lpeg = require "lpeg" @@ -1481,7 +1506,7 @@ ot_fullinfo = function (filename, english_names, info) - return { + local res = { file = { base = basename, full = filename, subfont = subfont, @@ -1491,6 +1516,10 @@ ot_fullinfo = function (filename, style = style, version = metadata.version, } + --- Closing the file manually is a tad faster and more memory + --- efficient than having it closed by the gc + fontloaderclose (metadata) + return res end --[[doc-- -- cgit v1.2.3 From 1ad4aec62a0cdc6eaf12f17126eeb346e86d3146 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 10 Nov 2013 19:28:55 +0100 Subject: [*] bump version globally --- luaotfload-auxiliary.lua | 4 ++-- luaotfload-colors.lua | 2 +- luaotfload-database.lua | 2 +- luaotfload-diagnostics.lua | 2 +- luaotfload-extralibs.lua | 2 +- luaotfload-features.lua | 2 +- luaotfload-override.lua | 2 +- mkcharacters | 2 +- mkglyphlist | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/luaotfload-auxiliary.lua b/luaotfload-auxiliary.lua index 7daf367..d3de731 100644 --- a/luaotfload-auxiliary.lua +++ b/luaotfload-auxiliary.lua @@ -2,9 +2,9 @@ ----------------------------------------------------------------------- -- FILE: luaotfload-auxiliary.lua -- DESCRIPTION: part of luaotfload --- REQUIREMENTS: luaotfload 2.3 +-- REQUIREMENTS: luaotfload 2.4 -- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang --- VERSION: 2.3a +-- VERSION: 2.4 -- CREATED: 2013-05-01 14:40:50+0200 ----------------------------------------------------------------------- -- diff --git a/luaotfload-colors.lua b/luaotfload-colors.lua index ac9291d..b5c1fb9 100644 --- a/luaotfload-colors.lua +++ b/luaotfload-colors.lua @@ -1,5 +1,5 @@ if not modules then modules = { } end modules ['luaotfload-colors'] = { - version = "2.3a", + version = "2.4", comment = "companion to luaotfload.lua (font color)", author = "Khaled Hosny, Elie Roux, Philipp Gesang", copyright = "Luaotfload Development Team", diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 0b9f1f8..a2535fa 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -1,5 +1,5 @@ if not modules then modules = { } end modules ['luaotfload-database'] = { - version = "2.3b", + version = "2.4", comment = "companion to luaotfload.lua", author = "Khaled Hosny, Elie Roux, Philipp Gesang", copyright = "Luaotfload Development Team", diff --git a/luaotfload-diagnostics.lua b/luaotfload-diagnostics.lua index a11f9ea..f191913 100644 --- a/luaotfload-diagnostics.lua +++ b/luaotfload-diagnostics.lua @@ -4,7 +4,7 @@ -- DESCRIPTION: functionality accessible by the --diagnose option -- REQUIREMENTS: luaotfload-tool.lua -- AUTHOR: Philipp Gesang (Phg), --- VERSION: 1.0 +-- VERSION: 2.4 -- CREATED: 2013-07-28 10:01:18+0200 ----------------------------------------------------------------------- -- diff --git a/luaotfload-extralibs.lua b/luaotfload-extralibs.lua index d04ba5b..6d486b2 100644 --- a/luaotfload-extralibs.lua +++ b/luaotfload-extralibs.lua @@ -1,5 +1,5 @@ if not modules then modules = { } end modules ["extralibs"] = { - version = "2.3a", + version = "2.4", comment = "companion to luaotfload.lua", author = "Hans Hagen, Philipp Gesang", copyright = "PRAGMA ADE / ConTeXt Development Team", diff --git a/luaotfload-features.lua b/luaotfload-features.lua index 83f5a99..4b2f206 100644 --- a/luaotfload-features.lua +++ b/luaotfload-features.lua @@ -1,5 +1,5 @@ if not modules then modules = { } end modules ["features"] = { - version = "2.3a", + version = "2.4", comment = "companion to luaotfload.lua", author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang", copyright = "PRAGMA ADE / ConTeXt Development Team", diff --git a/luaotfload-override.lua b/luaotfload-override.lua index ea6af9a..0e17f05 100644 --- a/luaotfload-override.lua +++ b/luaotfload-override.lua @@ -1,5 +1,5 @@ if not modules then modules = { } end modules ['luat-ovr'] = { - version = "2.3a", + version = "2.4", comment = "companion to luatex-*.tex", author = "Khaled Hosny, Elie Roux, Philipp Gesang", copyright = "Luaotfload Development Team", diff --git a/mkcharacters b/mkcharacters index 69201fb..5d4a2f4 100755 --- a/mkcharacters +++ b/mkcharacters @@ -5,7 +5,7 @@ -- DESCRIPTION: import parts of char-def.lua -- REQUIREMENTS: lua, ConTeXt, the lualibs package -- AUTHOR: Philipp Gesang (Phg), --- VERSION: 1.1 +-- VERSION: 2.4 -- CREATED: 2013-05-17 12:41:39+0200 ----------------------------------------------------------------------- -- we create a stripped-down version of char-def.lua diff --git a/mkglyphlist b/mkglyphlist index e476eca..f7a1cb9 100755 --- a/mkglyphlist +++ b/mkglyphlist @@ -5,7 +5,7 @@ -- DESCRIPTION: part of the luaotfload package -- REQUIREMENTS: lua, lpeg, luasocket, the lualibs package -- AUTHOR: Philipp Gesang (Phg), --- VERSION: 1.0 +-- VERSION: 2.4 -- CREATED: 04/23/2013 12:42:17 PM CEST ----------------------------------------------------------------------- -- interesting thread on the Context list: @@ -96,7 +96,7 @@ end local file_header = [==[ if not modules then modules = { } end modules ["font-age"] = { - version = 2.300, + version = 2.400, comment = "part of the luaotfload package", author = "luaotfload team / mkglyphlist", copyright = "derived from %s", -- cgit v1.2.3 From a59d8dc80df1e9359938f0fc2e2b1d335f863bbf Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 12 Nov 2013 23:21:11 +0100 Subject: [db,tool] default to compressed plaintext index --- luaotfload-database.lua | 11 +++++------ luaotfload-tool.lua | 10 ++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index a2535fa..a12cdd1 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -19,7 +19,7 @@ if not modules then modules = { } end modules ['luaotfload-database'] = { considers only the contents of the minimals tree, not the tex live one!) - time (m:s) peak VmSize (B) + time (m:s) peak VmSize (kB) a 1:19 386 018 b 0:37 715 797 c 2:27 1 017 674 @@ -124,11 +124,10 @@ luaotfloadconfig.resolver = luaotfloadconfig.resolver or "normal" luaotfloadconfig.formats = luaotfloadconfig.formats or "otf,ttf,ttc,dfont" luaotfloadconfig.strip = luaotfloadconfig.strip == true -if luaotfloadconfig.update_live ~= false then - --- this option allows for disabling updates - --- during a TeX run - luaotfloadconfig.update_live = true -end +--- this option allows for disabling updates +--- during a TeX run +luaotfloadconfig.update_live = luaotfloadconfig.update_live ~= false +luaotfloadconfig.compress = luaotfloadconfig.compress ~= false local names = fonts.names local name_index = nil --> upvalue for names.data diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 0cc26d2..f1e4808 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -183,6 +183,7 @@ local sanitize_fontname = names.sanitize_fontname local pathdata = names.path local names_plain = pathdata.index.lua +local names_gzip = names_plain .. ".gz" local names_bin = pathdata.index.luc local help_messages = { @@ -219,7 +220,7 @@ This tool is part of the luaotfload package. Valid options are: -n --no-reload suppress db update --no-strip keep redundant information in db -f --force force re-indexing all fonts - -c --compress gzip index file (text version only) + -c --no-compress do not gzip index file (text version only) -l --flush-lookups empty lookup cache of font requests -D --dry-run skip loading of fonts, just scan --formats=[+|-]EXTENSIONS set, add, or subtract formats to index @@ -293,7 +294,8 @@ local help_msg = function (version) local template = help_messages[version] iowrite(stringformat(template, luaotfloadconfig.self, - names_plain, +-- names_plain, + names_gzip, names_bin, caches.getwritablepath ( luaotfloadconfig.cache_dir))) @@ -1097,7 +1099,7 @@ local process_cmdline = function ( ) -- unit -> jobspec local long_options = { alias = 1, cache = 1, - compress = "c", + ["no-compress"] = "c", diagnose = 1, ["dry-run"] = "D", ["flush-lookups"] = "l", @@ -1214,7 +1216,7 @@ local process_cmdline = function ( ) -- unit -> jobspec --- dev only, undocumented luaotfloadconfig.skip_read = true elseif v == "c" then - luaotfloadconfig.compress = true + luaotfloadconfig.compress = false elseif v == "no-strip" then luaotfloadconfig.strip = false end -- cgit v1.2.3 From f564f346e2a1b200fe27174011070adc7a527b28 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 12 Nov 2013 23:25:28 +0100 Subject: [man] update references to db compression --- NEWS | 5 +++-- luaotfload-tool.rst | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index c72b943..3825605 100644 --- a/NEWS +++ b/NEWS @@ -9,8 +9,9 @@ Change History * Test runner (script mktests) * New luaotfload-tool option: ``--no-reload`` * ``luaotfload-tool --find`` now understands request syntax - * option ``--compress`` filters text (Lua script) version of the font - index through gzip + * text (Lua script) version of the font index is filtered through gzip by + default, the ``--no-compress`` option of luaotfload-tool will prevent + this * rename ``luaotfload-merged.lua`` (the fontloader package from Context) to ``luaotfload-fontloader.lua`` diff --git a/luaotfload-tool.rst b/luaotfload-tool.rst index 37ef779..26f830b 100644 --- a/luaotfload-tool.rst +++ b/luaotfload-tool.rst @@ -20,7 +20,7 @@ SYNOPSIS **luaotfload-tool** --update [ --force ] [ --quiet ] [ --verbose ] [ --prefer-texmf ] [ --dry-run ] [ --formats=[+|-]EXTENSIONS ] - [ --compress ] [ --no-strip ] + [ --no-compress ] [ --no-strip ] **luaotfload-tool** --find=FONTNAME [ --fuzzy ] [ --info ] [ --inspect ] [ --no-reload ] @@ -67,8 +67,9 @@ update mode building the database. Warning: this will inflate the index to about two to three times the normal size. ---compress Filter plain text version of font index through - gzip. +--no-compress, -c Do not filter the plain text version of the + font index through gzip. Useful for debugging + if your editor is built without zlib. --prefer-texmf, -p Organize the file name database in a way so that it prefer fonts in the *TEXMF* tree over -- cgit v1.2.3 From 14834c9ea172588cc6cd4f111cdb16ce88ce2c2f Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 12 Nov 2013 23:32:57 +0100 Subject: [man,doc] adapt references to luaotfload-names.lua --- filegraph.dot | 2 +- luaotfload-tool.rst | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/filegraph.dot b/filegraph.dot index f70ef87..0c64e58 100644 --- a/filegraph.dot +++ b/filegraph.dot @@ -182,7 +182,7 @@ strict digraph luaotfload_files { //looks weird with circo ... fillcolor = "#01012222", color = grey40, style = "filled,dotted,rounded", - label = "luaotfload-names.lua\nluaotfload-names.luc"] + label = "luaotfload-names.lua.gz\nluaotfload-names.luc"] status [style = "filled,dashed", shape = rect, diff --git a/luaotfload-tool.rst b/luaotfload-tool.rst index 26f830b..abe5ed7 100644 --- a/luaotfload-tool.rst +++ b/luaotfload-tool.rst @@ -221,11 +221,17 @@ FILES The font name database is usually located in the directory ``texmf-var/luatex-cache/generic/names/`` (``$TEXMFCACHE`` as set in -``texmf.cnf``) of your *TeX Live* distribution as -``luaotfload-names.lua``. The experimental lookup cache will be -created as ``luaotfload-lookup-cache.lua`` in the same directory. -Both files are safe to delete, at the cost of regenerating them with -the next run of *LuaTeX*. +``texmf.cnf``) of your *TeX Live* distribution as a zlib-compressed +file ``luaotfload-names.lua.gz``. +The experimental lookup cache will be created as +``luaotfload-lookup-cache.lua`` in the same directory. +These Lua tables are not used directly by Luaotfload, though. +Instead, they are compiled to Lua bytecode which is written to +corresponding files with the extension ``.luc`` in the same directory. +When modifying the files by hand keep in mind that only if the bytecode +files are missing will Luaotfload use the plain version instead. +Both kinds of files are safe to delete, at the cost of regenerating +them with the next run of *LuaTeX*. SEE ALSO ======================================================================= -- cgit v1.2.3 From a914c23b674ff6bacb85a9701a828e03ec24cbc0 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 13 Nov 2013 00:32:35 +0100 Subject: [tool,man,db] add --max-fonts option to restrict db size --- luaotfload-database.lua | 24 +++++++++++++++--------- luaotfload-tool.lua | 10 ++++++++++ luaotfload-tool.rst | 2 ++ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index a12cdd1..4ee07f4 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -533,6 +533,7 @@ local set_font_filter --- state of the database local fonts_reloaded = false +local fonts_read = 0 --- limit output when approximate font matching (luaotfload-tool -F) local fuzzy_limit = 1 --- display closest only @@ -2112,15 +2113,20 @@ local scan_dir = function (dirname, currentnames, targetnames, local fullname = found[j] fullname = path_normalize(fullname) local new - if dry_run == true then - report_status ("both", "db", - "Would have been loading %q", fullname) - else - report_status ("both", "db", "Loading font %q", fullname) - local new = read_font_names (fullname, currentnames, - targetnames, texmf) - if new == true then - n_new = n_new + 1 + if not luaotfloadconfig.max_fonts + or luaotfloadconfig.max_fonts and fonts_read < luaotfloadconfig.max_fonts + then + if dry_run == true then + report_status ("both", "db", + "Would have been loading %q", fullname) + else + report_status ("both", "db", "Loading font %q", fullname) + local new = read_font_names (fullname, currentnames, + targetnames, texmf) + if new == true then + fonts_read = fonts_read + 1 + n_new = n_new + 1 + end end end end diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index f1e4808..41ac4d7 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -225,6 +225,7 @@ This tool is part of the luaotfload package. Valid options are: -D --dry-run skip loading of fonts, just scan --formats=[+|-]EXTENSIONS set, add, or subtract formats to index -p --prefer-texmf prefer fonts in the TEXMF over system fonts + --max-fonts=N process at most N font files --find="font name" query the database for a font name -F --fuzzy look for approximate matches if --find fails @@ -1114,6 +1115,7 @@ local process_cmdline = function ( ) -- unit -> jobspec limit = 1, list = 1, log = 1, + ["max-fonts"] = 1, ["no-reload"] = "n", ["no-strip"] = 0, ["skip-read"] = "R", @@ -1219,6 +1221,14 @@ local process_cmdline = function ( ) -- unit -> jobspec luaotfloadconfig.compress = false elseif v == "no-strip" then luaotfloadconfig.strip = false + elseif v == "max-fonts" then + local n = optarg[n] + if n then + n = tonumber(lvl) + if n and n > 0 then + luaotfloadconfig.max_fonts = n + end + end end end diff --git a/luaotfload-tool.rst b/luaotfload-tool.rst index abe5ed7..957ec85 100644 --- a/luaotfload-tool.rst +++ b/luaotfload-tool.rst @@ -74,6 +74,8 @@ update mode --prefer-texmf, -p Organize the file name database in a way so that it prefer fonts in the *TEXMF* tree over system fonts if they are installed in both. +--max-fonts=N Process at most *N* font files, including fonts + already indexed in the count. --formats=EXTENSIONS Extensions of the font files to index. Where *EXTENSIONS* is a comma-separated list of supported file extensions (otf, ttf, ttc, -- cgit v1.2.3 From 32a5a40a2f99bf82436bfec8926fe7bfeaa1194d Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 13 Nov 2013 00:38:07 +0100 Subject: [db] simplify loop exit condition --- luaotfload-database.lua | 35 +++++++++++++++++++---------------- luaotfload-tool.lua | 2 +- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 4ee07f4..638f1c3 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -2106,27 +2106,30 @@ local scan_dir = function (dirname, currentnames, targetnames, end report ("both", 4, "db", "Scanning directory %s", dirname) - local n_new = 0 --- total of fonts collected - local n_found = #found + local n_new = 0 --- total of fonts collected + local n_found = #found + local max_fonts = luaotfloadconfig.max_fonts + report ("both", 4, "db", "%d font files detected", n_found) for j=1, n_found do + if max_fonts and fonts_read >= max_fonts then + break + end + local fullname = found[j] fullname = path_normalize(fullname) local new - if not luaotfloadconfig.max_fonts - or luaotfloadconfig.max_fonts and fonts_read < luaotfloadconfig.max_fonts - then - if dry_run == true then - report_status ("both", "db", - "Would have been loading %q", fullname) - else - report_status ("both", "db", "Loading font %q", fullname) - local new = read_font_names (fullname, currentnames, - targetnames, texmf) - if new == true then - fonts_read = fonts_read + 1 - n_new = n_new + 1 - end + + if dry_run == true then + report_status ("both", "db", + "Would have been loading %q", fullname) + else + report_status ("both", "db", "Loading font %q", fullname) + local new = read_font_names (fullname, currentnames, + targetnames, texmf) + if new == true then + fonts_read = fonts_read + 1 + n_new = n_new + 1 end end end diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 41ac4d7..a945ee2 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -1224,7 +1224,7 @@ local process_cmdline = function ( ) -- unit -> jobspec elseif v == "max-fonts" then local n = optarg[n] if n then - n = tonumber(lvl) + n = tonumber(n) if n and n > 0 then luaotfloadconfig.max_fonts = n end -- cgit v1.2.3 From 7c0629c2c2748e3ba32d0fc92f6a425629f1c4b9 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 13 Nov 2013 00:43:33 +0100 Subject: [db] prefer split style with Type1 fonts --- luaotfload-database.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 638f1c3..c15cd60 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -1543,6 +1543,7 @@ t1_fullinfo = function (filename, _subfont, location, basename, format) local familyname = metadata.familyname local italicangle = metadata.italicangle local weight = metadata.weight --- string identifier + local splitstyle = split_fontname (fontname) sanitized = sanitize_fontnames ({ fontname = fontname, @@ -1567,8 +1568,8 @@ t1_fullinfo = function (filename, _subfont, location, basename, format) psname = sanitized.fontname, version = metadata.version, size = false, - splitstyle = split_fontname (fontname), - fontstyle_name = sanitized.subfamily, + splitstyle = splitstyle, + fontstyle_name = splitstyle or sanitized.subfamily, weight = { metadata.pfminfo.weight, sanitized.subfamily }, italicangle = italicangle, -- cgit v1.2.3 From 346d218c26f96764414def46d829ab841daabfbc Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 13 Nov 2013 02:04:03 +0100 Subject: [db] infer style for Type1 fonts --- luaotfload-database.lua | 22 ++++++++++++++++------ mktests | 24 ++++++++++++------------ 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index c15cd60..fba01cc 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -1536,14 +1536,14 @@ end t1_fullinfo = function (filename, _subfont, location, basename, format) local sanitized - local metadata = load_font_file (filename) - + local metadata = load_font_file (filename) local fontname = metadata.fontname local fullname = metadata.fullname local familyname = metadata.familyname local italicangle = metadata.italicangle - local weight = metadata.weight --- string identifier local splitstyle = split_fontname (fontname) + local style = "" + local weight sanitized = sanitize_fontnames ({ fontname = fontname, @@ -1551,10 +1551,20 @@ t1_fullinfo = function (filename, _subfont, location, basename, format) pfullname = fullname, metafamily = family, familyname = familyname, - subfamily = weight, + weight = metadata.weight, --- string identifier prefmodifiers = style, }) + weight = sanitized.weight + + if weight == "bold" then + style = weight + end + + if italicangle ~= 0 then + style = style .. "italic" + end + return { basename = basename, fullpath = filename, @@ -1569,9 +1579,9 @@ t1_fullinfo = function (filename, _subfont, location, basename, format) version = metadata.version, size = false, splitstyle = splitstyle, - fontstyle_name = splitstyle or sanitized.subfamily, + fontstyle_name = style ~= "" and style or weight, weight = { metadata.pfminfo.weight, - sanitized.subfamily }, + weight }, italicangle = italicangle, } end diff --git a/mktests b/mktests index eaf931f..d496896 100755 --- a/mktests +++ b/mktests @@ -119,18 +119,18 @@ local choose_style = { --- this needs a database built with --formats=+pfa,pfb,afm local resolve_t1_font = { - { { name = "URW Gothic L", style = "regular" }, "uagk8a.pfb" }, - { { name = "URW Gothic L", style = "italic" }, "uagko8a.pfb" }, - { { name = "URW Gothic L", style = "bold" }, "uagd8a.pfb" }, - { { name = "URW Gothic L", style = "bolditalic" }, "uagdo8a.pfb" }, - { { name = "Century Schoolbook L", style = "regular" }, "uncr8a.pfb" }, - { { name = "Century Schoolbook L", style = "italic" }, "uncri8a.pfb" }, - { { name = "Century Schoolbook L", style = "bold" }, "uncb8a.pfb" }, - { { name = "Century Schoolbook L", style = "bolditalic" }, "uncbi8a.pfb" }, - { { name = "Nimbus Roman No9 L", style = "regular" }, "utmr8a.pfb" }, - { { name = "Nimbus Roman No9 L", style = "italic" }, "utmri8a.pfb" }, - { { name = "Nimbus Roman No9 L", style = "bold" }, "utmb8a.pfb" }, --- medium, actually - { { name = "Nimbus Roman No9 L", style = "bolditalic" }, "utmbi8a.pfb" }, + { { name = "URW Gothic L", style = "regular" }, "a010013l.pfb" }, --> “book” +-- { { name = "URW Gothic L", style = "italic" }, "a010033l.pfb" }, --> “book oblique” +-- { { name = "URW Gothic L", style = "bold" }, "a010015l.pfb" }, --> “demi” +-- { { name = "URW Gothic L", style = "bolditalic" }, "a010035l.pfb" }, --> “demi oblique” + { { name = "Century Schoolbook L", style = "regular" }, "c059013l.pfb" }, + { { name = "Century Schoolbook L", style = "italic" }, "c059033l.pfb" }, + { { name = "Century Schoolbook L", style = "bold" }, "c059016l.pfb" }, + { { name = "Century Schoolbook L", style = "bolditalic" }, "c059036l.pfb" }, + { { name = "Nimbus Roman No9 L", style = "regular" }, "n021003l.pfb" }, + { { name = "Nimbus Roman No9 L", style = "italic" }, "n021023l.pfb" }, + { { name = "Nimbus Roman No9 L", style = "bold" }, "n021004l.pfb" }, --- medium, actually + { { name = "Nimbus Roman No9 L", style = "bolditalic" }, "n021024l.pfb" }, } local translate_style = { -- cgit v1.2.3 From 581b68bbbc02f8497df63dcf87f4b091f83890e1 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 14 Nov 2013 14:06:30 +0100 Subject: [fontloader] sync with Context as of 2013-11-14 --- luaotfload-fontloader.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/luaotfload-fontloader.lua b/luaotfload-fontloader.lua index 2bfa775..e187979 100644 --- a/luaotfload-fontloader.lua +++ b/luaotfload-fontloader.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 11/09/13 20:21:53 +-- merge date : 11/14/13 13:48:28 do -- begin closure to overcome local limits and interference @@ -6354,7 +6354,7 @@ local utfbyte=utf.byte local format,gmatch,gsub,find,match,lower,strip=string.format,string.gmatch,string.gsub,string.find,string.match,string.lower,string.strip local type,next,tonumber,tostring=type,next,tonumber,tostring local abs=math.abs -local getn=table.getn +local insert=table.insert local lpegmatch=lpeg.match local reversed,concat,remove=table.reversed,table.concat,table.remove local ioflush=io.flush @@ -6378,7 +6378,7 @@ local report_otf=logs.reporter("fonts","otf loading") local fonts=fonts local otf=fonts.handlers.otf otf.glists={ "gsub","gpos" } -otf.version=2.747 +otf.version=2.748 otf.cache=containers.define("fonts","otf",otf.version,true) local fontdata=fonts.hashes.identifiers local chardata=characters and characters.data @@ -7032,20 +7032,20 @@ actions["check encoding"]=function(data,filename,raw) if parentdescription then local altuni=parentdescription.altuni if not altuni then - altuni={ { unicode=parent } } + altuni={ { unicode=unicode } } parentdescription.altuni=altuni duplicates[parent]={ unicode } else local done=false for i=1,#altuni do - if altuni[i].unicode==parent then + if altuni[i].unicode==unicode then done=true break end end if not done then - altuni[#altuni+1]={ unicode=parent } - table.insert(duplicates[parent],unicode) + insert(altuni,{ unicode=unicode }) + insert(duplicates[parent],unicode) end end if trace_loading then -- cgit v1.2.3