From 791b6153280abd50454e9b95e0fb6987d46c138c Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Fri, 17 Feb 2017 21:41:52 +1100 Subject: [PATCH] font/sfnt: update test for adobe/SourceSansPro-Regular.ttf. The latest version of that TTF file fixes the inconsistency between the TTF and OTF versions. Change-Id: I0b86f6ddc3f0326e538bdd18fe097be9ad8533ae Reviewed-on: https://go-review.googlesource.com/37173 Reviewed-by: David Crawshaw --- font/sfnt/proprietary_test.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/font/sfnt/proprietary_test.go b/font/sfnt/proprietary_test.go index 71911e3..f4f803e 100644 --- a/font/sfnt/proprietary_test.go +++ b/font/sfnt/proprietary_test.go @@ -80,11 +80,7 @@ func TestProprietaryAdobeSourceSansProOTF(t *testing.T) { } func TestProprietaryAdobeSourceSansProTTF(t *testing.T) { - // The 1000 here is smaller than the 1800 above. For some reason, the TTF - // version of the file has fewer glyphs than the (presumably canonical) OTF - // version. The number of glyphs in the .otf and .ttf files can be verified - // with the ttx tool. - testProprietary(t, "adobe", "SourceSansPro-Regular.ttf", 1000, 56) + testProprietary(t, "adobe", "SourceSansPro-Regular.ttf", 1800, 54) } func TestProprietaryMicrosoftArial(t *testing.T) { @@ -212,10 +208,10 @@ var proprietaryGlyphIndexTestCases = map[string]map[rune]GlyphIndex{ '\u2030': 1728, // U+2030 PER MILLE SIGN }, "adobe/SourceSansPro-Regular.ttf": { - '\u0041': 4, // U+0041 LATIN CAPITAL LETTER A - '\u03a3': 0, // U+03A3 GREEK CAPITAL LETTER SIGMA - '\u0435': 0, // U+0435 CYRILLIC SMALL LETTER IE - '\u2030': 675, // U+2030 PER MILLE SIGN + '\u0041': 2, // U+0041 LATIN CAPITAL LETTER A + '\u03a3': 592, // U+03A3 GREEK CAPITAL LETTER SIGMA + '\u0435': 999, // U+0435 CYRILLIC SMALL LETTER IE + '\u2030': 1728, // U+2030 PER MILLE SIGN }, "microsoft/Arial.ttf": {