Skip to content

Commit ea1af1e

Browse files
committed
rename apl385
1 parent 2d35edb commit ea1af1e

4 files changed

Lines changed: 9 additions & 11 deletions

File tree

aplextra/p/set.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/golang/freetype/truetype"
1010
"github.com/ktye/iv/apl"
1111
"github.com/ktye/iv/apl/domain"
12-
aplfont "github.com/ktye/iv/cmd/lui/font"
12+
"github.com/ktye/iv/cmd/lui/apl385"
1313
"github.com/ktye/plot"
1414
"github.com/ktye/plot/color"
1515
)
@@ -84,7 +84,7 @@ func setFontSizes(a *apl.Apl, _, R apl.Value) (apl.Value, error) {
8484
sizes[0] = float64(big)
8585
sizes[1] = float64(small)
8686

87-
ttf := aplfont.APL385()
87+
ttf := apl385.TTF()
8888
f, err := truetype.Parse(ttf)
8989
if err != nil {
9090
return nil, err

aplextra/u/ui.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/ktye/iv/apl"
99
"github.com/ktye/iv/apl/xgo"
10-
"github.com/ktye/iv/cmd/lui/font"
10+
"github.com/ktye/iv/cmd/lui/apl385"
1111
"github.com/ktye/ui"
1212
)
1313

@@ -18,7 +18,7 @@ var window *ui.Window
1818
func Loop(top ui.Widget) {
1919
w := ui.New(nil)
2020
w.SetKeyTranslator(ui.AplKeyboard{})
21-
w.SetFont(font.APL385(), 20)
21+
w.SetFont(apl385.TTF(), 20)
2222
w.Top.W = top
2323
w.Render()
2424
window = w
Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
// Package font embedds APL385 unicode.
2-
package font
1+
// Package apl385 embedds APL385 unicode truetype font.
2+
package apl385
33

44
import (
55
"archive/zip"
66
"io/ioutil"
77
"strings"
88
)
99

10-
// APL385 returns the font in ttf format.
11-
func APL385() []byte {
12-
10+
// TTF returns the APL385-Unicode font in trutype format.
11+
func TTF() []byte {
1312
r := strings.NewReader(data)
1413
zr, err := zip.NewReader(r, r.Size())
1514
if err != nil {
1615
panic(err)
1716
}
18-
1917
for _, f := range zr.File {
2018
if f.Name == "APL385.ttf" {
2119
rc, err := f.Open()

0 commit comments

Comments
 (0)