2018-09-15 11:34:11 +02:00
|
|
|
// 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 (
|
2018-09-19 13:48:13 +02:00
|
|
|
"image"
|
2018-09-15 11:34:11 +02:00
|
|
|
"testing"
|
|
|
|
|
2023-09-21 21:38:15 +02:00
|
|
|
"git.fireandbrimst.one/aw/golang-image/font"
|
2018-09-15 11:34:11 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMetrics(t *testing.T) {
|
2018-09-19 13:48:13 +02:00
|
|
|
want := font.Metrics{Height: 832, Ascent: 704, Descent: 128, XHeight: 704, CapHeight: 704, CaretSlope: image.Point{X: 0, Y: 1}}
|
2018-09-15 11:34:11 +02:00
|
|
|
if got := Face7x13.Metrics(); got != want {
|
|
|
|
t.Errorf("Face7x13: Metrics: got %v want %v", got, want)
|
|
|
|
}
|
|
|
|
}
|