From c4c250414a83cc8c4ae99d286ed69a3763510609 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 20 Apr 2016 07:47:30 +0200 Subject: [db,conf] drop support for PS fonts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The “AFM” code stays since PFB accompanied by an AFM file is still supported by the fontloader. --- src/luaotfload-configuration.lua | 2 +- src/luaotfload-database.lua | 71 +++------------------------------------- 2 files changed, 6 insertions(+), 67 deletions(-) (limited to 'src') diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua index b901824..701f7b2 100644 --- a/src/luaotfload-configuration.lua +++ b/src/luaotfload-configuration.lua @@ -89,7 +89,7 @@ local config_paths = { } local valid_formats = tabletohash { - "otf", "ttc", "ttf", "dfont", "afm", "pfb", "pfa", + "otf", "ttc", "ttf", "dfont", "afm", --"pfb", "pfa", } local feature_presets = { diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua index b06f3d5..6fe01ba 100644 --- a/src/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -208,8 +208,8 @@ end local format_precedence = { "otf", "ttc", "ttf", - "dfont", "afm", "pfb", - "pfa", + "dfont", "afm", + --- "pfb", "pfa", } local location_precedence = { @@ -360,7 +360,7 @@ This is a sketch of the luaotfload db: conflicts : { barename : int; basename : int }; // filename conflict with font at index; happens with subfonts familyname : string; // sanitized name of the font family the font belongs to, usually from the names table fontname : string; // sanitized name of the font - format : string; // "otf" | "ttf" | "dfont" | "pfa" | "pfb" | "afm" + format : string; // "otf" | "ttf" | "dfont" | "afm" fullname : string; // sanitized full name of the font including style modifiers fullpath : string; // path to font in filesystem index : int; // index in the mappings table @@ -496,7 +496,6 @@ local lookup_fullpath local save_lookups local save_names local set_font_filter -local t1_fullinfo local update_names --- state of the database @@ -1619,74 +1618,14 @@ ot_fullinfo = function (filename, return res end ---[[doc-- - - Type1 font inspector. In comparison with OTF, PFB’s contain a good - deal less name fields which makes it tricky in some parts to find a - meaningful representation for the database. - - Good read: http://www.adobe.com/devnet/font/pdfs/5004.AFM_Spec.pdf - ---doc]]-- - ---- string -> int -> bool -> string -> fontentry - -t1_fullinfo = function (filename, _subfont, location, basename, format) - local sanitized - local metadata = load_font_file (filename) - local fontname = metadata.fontname - local fullname = metadata.fullname - local familyname = metadata.familyname - local italicangle = metadata.italicangle - local style = "" - local weight - - sanitized = sanitize_fontnames ({ - fontname = fontname, - psname = fullname, - metafamily = familyname, - familyname = familyname, - 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, - subfont = false, - location = location or "system", - format = format, - fullname = sanitized.fullname, - fontname = sanitized.fontname, - familyname = sanitized.familyname, - plainname = fullname, - psname = sanitized.fontname, - version = metadata.version, - size = false, - fontstyle_name = style ~= "" and style or weight, - weight = metadata.pfminfo and pfminfo.weight or 400, - italicangle = italicangle, - } -end - local loaders = { dfont = ot_fullinfo, otf = ot_fullinfo, ttc = ot_fullinfo, ttf = ot_fullinfo, - pfb = t1_fullinfo, - pfa = t1_fullinfo, +----pfb = t1_fullinfo, --> may come back one day, so +----pfa = t1_fullinfo, --> we keep the indirection } --- not side-effect free! -- cgit v1.2.3 From 4c2b3301e98ac3075cc3d93a47fd497b8f9b6d52 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 20 Apr 2016 23:46:32 +0200 Subject: [*] remove references to obsolete formats (PF{A,B}, DFONT, FEA) Thanks to @dohyunkim for reminding me to be thorough! At least in our own files. A patch has been sent upstream to apply the same change to the generic loader. --- src/luaotfload-configuration.lua | 4 ++-- src/luaotfload-database.lua | 8 +++----- src/luaotfload-loaders.lua | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua index 701f7b2..8faf3d1 100644 --- a/src/luaotfload-configuration.lua +++ b/src/luaotfload-configuration.lua @@ -89,7 +89,7 @@ local config_paths = { } local valid_formats = tabletohash { - "otf", "ttc", "ttf", "dfont", "afm", --"pfb", "pfa", + "otf", "ttc", "ttf", "afm", --"pfb", "pfa", } local feature_presets = { @@ -188,7 +188,7 @@ local permissible_color_callbacks = { local default_config = { db = { - formats = "otf,ttf,ttc,dfont", + formats = "otf,ttf,ttc", scan_local = false, skip_read = false, strip = true, diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua index 6fe01ba..135ab0e 100644 --- a/src/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -207,8 +207,7 @@ local make_luanames = function (path) end local format_precedence = { - "otf", "ttc", "ttf", - "dfont", "afm", + "otf", "ttc", "ttf", "afm", --- "pfb", "pfa", } @@ -336,7 +335,7 @@ This is a sketch of the luaotfload db: } and metadata = { created : string // creation time - formats : string list; // { "otf", "ttf", "ttc", "dfont" } + formats : string list; // { "otf", "ttf", "ttc" } local : bool; (* set if local fonts were added to the db *) modified : string // modification time statistics : TODO; // created when built with "--stats" @@ -360,7 +359,7 @@ This is a sketch of the luaotfload db: conflicts : { barename : int; basename : int }; // filename conflict with font at index; happens with subfonts familyname : string; // sanitized name of the font family the font belongs to, usually from the names table fontname : string; // sanitized name of the font - format : string; // "otf" | "ttf" | "dfont" | "afm" + format : string; // "otf" | "ttf" | "afm" fullname : string; // sanitized full name of the font including style modifiers fullpath : string; // path to font in filesystem index : int; // index in the mappings table @@ -1619,7 +1618,6 @@ ot_fullinfo = function (filename, end local loaders = { - dfont = ot_fullinfo, otf = ot_fullinfo, ttc = ot_fullinfo, ttf = ot_fullinfo, diff --git a/src/luaotfload-loaders.lua b/src/luaotfload-loaders.lua index d3828aa..f0c1913 100644 --- a/src/luaotfload-loaders.lua +++ b/src/luaotfload-loaders.lua @@ -83,6 +83,7 @@ local install_formats = function () and aux ("pfa", unsupported_reader "pfa") and aux ("pfb", unsupported_reader "pfb") and aux ("ofm", readers.tfm) + and aux ("dfont", unsupported_reader "dfont") end --[[doc-- -- cgit v1.2.3 From b1a1ee5d1ec8002acee2702e6dd070073e0ee0ee Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 21 Apr 2016 07:47:18 +0200 Subject: [*] bump version --- src/luaotfload-main.lua | 6 +++--- src/luaotfload.sty | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index 92c1ff1..51a0657 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -1,7 +1,7 @@ ----------------------------------------------------------------------- -- FILE: luaotfload-main.lua -- DESCRIPTION: Luaotfload entry point --- REQUIREMENTS: luatex v.0.80 or later; packages lualibs +-- REQUIREMENTS: luatex v.0.95 or later; packages lualibs -- AUTHOR: Élie Roux, Khaled Hosny, Philipp Gesang ----------------------------------------------------------------------- -- @@ -29,8 +29,8 @@ local authors = "\z luaotfload.module = { name = "luaotfload-main", - version = 2.70001, - date = "2016/04/19", + version = 2.70002, + date = "2016/04/21", description = "OpenType layout system.", author = authors, copyright = authors, diff --git a/src/luaotfload.sty b/src/luaotfload.sty index b6f03af..8e061c2 100644 --- a/src/luaotfload.sty +++ b/src/luaotfload.sty @@ -41,10 +41,10 @@ \ProvidesPackage{luaotfload}% %% FIXME The date is meaningless, we need to find a way to %% use the git revision instead. - [2016/04/07 v2.7 OpenType layout system] + [2016/04/21 v2.7 OpenType layout system] \fi \directlua{ -require('luaotfload-main') -local _void = luaotfload.main () + require('luaotfload-main') + local _void = luaotfload.main () } -- cgit v1.2.3