summaryrefslogtreecommitdiff
path: root/mktests
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-08-26 10:44:12 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-08-26 10:44:12 +0200
commitcaad88140539bdabee6783f7b5aa718723412322 (patch)
tree48f6fba70562ef699526895ba3c2c2bb33707399 /mktests
parent9ca67ff9abd08240bb452938d063a3ac89ead381 (diff)
downloadluaotfload-caad88140539bdabee6783f7b5aa718723412322.tar.gz
[tests] add tests for type1 name resolving (very fragile due to multiple fonts with identical names ...)
Diffstat (limited to 'mktests')
-rwxr-xr-xmktests28
1 files changed, 23 insertions, 5 deletions
diff --git a/mktests b/mktests
index f2d6a06..96ed92a 100755
--- a/mktests
+++ b/mktests
@@ -5,8 +5,8 @@
-- DESCRIPTION: test the behavior of Luaotfload
-- REQUIREMENTS: Luatex > 0.76, Luaotfload
-- AUTHOR: Philipp Gesang (Phg), <phg42.2a@gmail.com>
--- VERSION: 2.3
--- CREATED: 2013-07-11 11:32:24+0200
+-- VERSION: 2.4
+-- MODIFIED: 2013-08-26 09:31:22+0200
-----------------------------------------------------------------------
--
--===================================================================--
@@ -58,9 +58,10 @@ local pprint_result = function (name, failed, total)
end
local pprint_spec = function (spec)
- return string.format ("%s*%.2fpt",
+ return string.format ("%s/%s*%.2fpt",
spec.specification,
- spec.optsize)
+ spec.style or "regular",
+ spec.optsize or 0)
end
-----------------------------------------------------------------------
@@ -93,9 +94,27 @@ local choose_optical_size = {
{ { name = "Garamond Premier Pro", optsize = 42 }, "GaramondPremrPro-Disp.otf" },
}
+--- 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" },
+}
+
local font_name_tests = {
infer_regular_style,
choose_optical_size,
+ resolve_t1_font,
}
local default_spec = {
@@ -132,7 +151,6 @@ local resolve_font_name = function ()
or default_spec.lookup)
.. ":" .. input_spec.name
input_spec.optsize = input_spec.optsize or default_spec.optsize
- --print( resolve_name (nil, nil, input_spec) )
local result = resolve_name (nil, nil, input_spec) == output
total = total + 1
if not result then