| 1 | // Copyright 2014 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 | //go:build linux || darwin |
| 6 | |
| 7 | package font |
| 8 | |
| 9 | // Default returns the default system font. |
| 10 | // The font is encoded as a TTF. |
| 11 | func Default() []byte { |
| 12 | b, err := buildDefault() |
| 13 | if err != nil { |
| 14 | panic(err) |
| 15 | } |
| 16 | return b |
| 17 | } |
| 18 | |
| 19 | // Monospace returns the default system fixed-pitch font. |
| 20 | // The font is encoded as a TTF. |
| 21 | func Monospace() []byte { |
| 22 | b, err := buildMonospace() |
| 23 | if err != nil { |
| 24 | panic(err) |
| 25 | } |
| 26 | return b |
| 27 | } |