golang-image/font/basicfont/basicfont_test.go
Elias Naur e1a1ede689 font,font/sfnt: expose font x-Height and capHeight
Change-Id: I6e3e6e51c7e270e16413c23990f6df5e22cbfeb6
Reviewed-on: https://go-review.googlesource.com/135555
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-09-20 23:51:50 +00:00

19 lines
464 B
Go

// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package basicfont
import (
"testing"
"golang.org/x/image/font"
)
func TestMetrics(t *testing.T) {
want := font.Metrics{Height: 832, Ascent: 704, Descent: 128, XHeight: 704, CapHeight: 704}
if got := Face7x13.Metrics(); got != want {
t.Errorf("Face7x13: Metrics: got %v want %v", got, want)
}
}