diff --git a/font/plan9font/example_test.go b/font/plan9font/example_test.go index c1eacb2..c3e8f89 100644 --- a/font/plan9font/example_test.go +++ b/font/plan9font/example_test.go @@ -30,8 +30,7 @@ func ExampleParseFont() { if err != nil { log.Fatal(err) } - // TODO: derive the ascent from the face's metrics. - const ascent = 11 + ascent := face.Metrics().Ascent.Ceil() dst := image.NewRGBA(image.Rect(0, 0, 4*7, 13)) draw.Draw(dst, dst.Bounds(), image.Black, image.Point{}, draw.Src) diff --git a/font/testdata/fixed/unicode.7x13.font b/font/testdata/fixed/unicode.7x13.font index 337b428..f1dc0e5 100644 --- a/font/testdata/fixed/unicode.7x13.font +++ b/font/testdata/fixed/unicode.7x13.font @@ -1,4 +1,4 @@ -13 10 +13 11 0x0000 0x001F 7x13.2400 0x0000 0x00FF 7x13.0000 0x0100 0x01FF 7x13.0100