File tree Expand file tree Collapse file tree 2 files changed +22
-24
lines changed
Expand file tree Collapse file tree 2 files changed +22
-24
lines changed Original file line number Diff line number Diff line change 1111
1212jobs :
1313
14- build :
14+ build-mac :
15+ name : MacOS
16+ runs-on : macos-latest
17+ steps :
18+ - uses : actions/checkout@v3
19+
20+ - name : Setup GPU drivers
21+ run : sudo brew install mesa
22+
23+ - name : Set up Go
24+ uses : actions/setup-go@v3
25+ with :
26+ go-version : 1.22
27+
28+ - name : Build
29+ run : go build -v ./...
30+
31+ - name : Test
32+ run : go test -v ./...
33+
34+ build-linux :
35+ name : Linux
1536 runs-on : ubuntu-latest
1637 steps :
1738 - uses : actions/checkout@v3
1839
1940 - name : Setup GPU drivers
2041 run : sudo apt install libgl1-mesa-dev xorg-dev
2142
22- - name : Env disable Cgo
23- run : echo "CGO_ENABLED=0" >> $GITHUB_ENV
24-
2543 - name : Set up Go
2644 uses : actions/setup-go@v3
2745 with :
Original file line number Diff line number Diff line change 11package textsdf
22
33import (
4- "fmt"
54 "testing"
65
76 _ "embed"
87
9- "github.com/golang/freetype/truetype"
108 "github.com/soypat/gsdf/gleval"
119 "github.com/soypat/gsdf/gsdfaux"
12- "golang.org/x/image/math/fixed"
1310)
1411
1512func TestABC (t * testing.T ) {
@@ -33,20 +30,3 @@ func TestABC(t *testing.T) {
3330 t .Fatal (err )
3431 }
3532}
36-
37- func Test (t * testing.T ) {
38- ttf , err := truetype .Parse (_iso3098TTF )
39- if err != nil {
40- panic (err )
41- }
42- scale := fixed .Int26_6 (ttf .FUnitsPerEm ())
43- hm := ttf .HMetric (scale , 'E' )
44- fmt .Println (hm .AdvanceWidth , int (hm .AdvanceWidth ))
45- t .Error (hm )
46- // var g truetype.GlyphBuf
47- // err = g.Load(ttf, , 'B', font.HintingFull)
48- // if err != nil {
49- // panic(err)
50- // }
51-
52- }
You can’t perform that action at this time.
0 commit comments