summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-04-20 07:47:30 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-04-20 07:47:33 +0200
commitc4c250414a83cc8c4ae99d286ed69a3763510609 (patch)
tree14da44c8cc22c3a322d30c4936dc16d21b046d83
parente14f3c50eedcd2652125177db0deacd8079cc048 (diff)
downloadluaotfload-c4c250414a83cc8c4ae99d286ed69a3763510609.tar.gz
[db,conf] drop support for PS fonts
The “AFM” code stays since PFB accompanied by an AFM file is still supported by the fontloader.
-rw-r--r--src/luaotfload-configuration.lua2
-rw-r--r--src/luaotfload-database.lua71
2 files changed, 6 insertions, 67 deletions
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!