1 // Copyright 2018 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package basicfont 6 7 import ( 8 "image" 9 "testing" 10 11 "golang.org/x/image/font" 12 ) 13 14 func TestMetrics(t *testing.T) { 15 want := font.Metrics{Height: 832, Ascent: 704, Descent: 128, XHeight: 704, CapHeight: 704, CaretSlope: image.Point{X: 0, Y: 1}} 16 if got := Face7x13.Metrics(); got != want { 17 t.Errorf("Face7x13: Metrics: got %v want %v", got, want) 18 } 19 } 20