Skip to content

Commit 0323cc1

Browse files
committed
add MacOS to build
1 parent 1b6005d commit 0323cc1

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

.github/workflows/go.yml

+22-4
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,35 @@ on:
1111

1212
jobs:
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:

forge/textsdf/glyph_test.go

-20
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
package textsdf
22

33
import (
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

1512
func 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-
}

0 commit comments

Comments
 (0)