File: basicfont_test.go

package info (click to toggle)
golang-golang-x-image 0.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 18,044 kB
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 510 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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)
	}
}