From caad88140539bdabee6783f7b5aa718723412322 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 26 Aug 2013 10:44:12 +0200 Subject: [tests] add tests for type1 name resolving (very fragile due to multiple fonts with identical names ...) --- mktests | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'mktests') 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), --- 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 -- cgit v1.2.3