This initially supports reading two common system fonts. At some point there should be a more general Open function, but first I need to work out how to to turn font names into android file names. Fixes golang/go#9419. Change-Id: I8321df873315a5222c39dccf961f742f2e2a7a4c Reviewed-on: https://go-review.googlesource.com/2059 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
16 lines
391 B
Go
16 lines
391 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.
|
|
|
|
package font
|
|
|
|
import "io/ioutil"
|
|
|
|
func buildDefault() ([]byte, error) {
|
|
return ioutil.ReadFile("/system/fonts/DroidSans.ttf")
|
|
}
|
|
|
|
func buildMonospace() ([]byte, error) {
|
|
return ioutil.ReadFile("/system/fonts/DroidSansMono.ttf")
|
|
}
|