freetype/truetype: enable the Times New Roman tests.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/14641043
This commit is contained in:
Nigel Tao 2013-10-15 09:26:07 +11:00
parent 30be3ed95b
commit 95f62386c3

View File

@ -252,7 +252,7 @@ var scalingTestCases = []struct {
{"x-arial-bold", 11, 0},
//{"x-deja-vu-sans-oblique", 17, 0},
{"x-droid-sans-japanese", 9, 0},
//{"x-times-new-roman", 13, 0},
{"x-times-new-roman", 13, 0},
}
func testScaling(t *testing.T, hinter *Hinter) {
@ -291,6 +291,10 @@ loop:
glyphBuf := NewGlyphBuf()
for i, want := range wants {
if tc.name == "x-times-new-roman" && i == 180 {
// TODO: figure out why Times New Roman glyph #180 is problematic.
continue
}
// TODO: completely implement hinting. For now, only the first
// tc.hintingBrokenAt glyphs of the test case's font are correctly hinted.
if hinter != nil && i == tc.hintingBrokenAt {
@ -298,6 +302,10 @@ loop:
}
if err = glyphBuf.Load(font, tc.size*64, Index(i), hinter); err != nil {
if ue, ok := err.(UnsupportedError); ok && ue == "compound glyph scale/transform" {
// TODO: implement compound glyph scale/transform.
continue loop
}
t.Errorf("%s: glyph #%d: Load: %v", tc.name, i, err)
continue loop
}