Make all our package sources use Go 1.17 gofmt format (adding //go:build lines). Not strictly necessary but will avoid spurious changes as files are edited. Part of //go:build change (#41184). See https://golang.org/design/draft-gobuild Change-Id: I30822eb504168b037ed3ec0f7759da1f41251f52 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/294374 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
29 lines
588 B
Go
29 lines
588 B
Go
// Copyright 2014 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.
|
|
|
|
//go:build linux || darwin
|
|
// +build linux darwin
|
|
|
|
package font
|
|
|
|
// Default returns the default system font.
|
|
// The font is encoded as a TTF.
|
|
func Default() []byte {
|
|
b, err := buildDefault()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return b
|
|
}
|
|
|
|
// Monospace returns the default system fixed-pitch font.
|
|
// The font is encoded as a TTF.
|
|
func Monospace() []byte {
|
|
b, err := buildMonospace()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return b
|
|
}
|