golang-image/font/basicfont/basicfont_test.go
Elias Naur 991ec62608 image/font: expose caret slope
Change-Id: I775224dd3fc7e5b6c2fc5c4a7d3db83bb36d047d
Reviewed-on: https://go-review.googlesource.com/136255
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-09-26 01:56:37 +00:00

20 lines
510 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 (
"image"
"testing"
"golang.org/x/image/font"
)
func TestMetrics(t *testing.T) {
want := font.Metrics{Height: 832, Ascent: 704, Descent: 128, XHeight: 704, CapHeight: 704, CaretSlope: image.Point{X: 0, Y: 1}}
if got := Face7x13.Metrics(); got != want {
t.Errorf("Face7x13: Metrics: got %v want %v", got, want)
}
}