2
0
mirror of synced 2025-02-23 14:58:12 +00:00
mobile/font/font_android.go
David Crawshaw a5177c8172 mobile/font: access to system fonts
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>
2015-01-10 22:16:05 +00:00

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")
}