Skip to content

Commit

Permalink
add MacOS to build
Browse files Browse the repository at this point in the history
  • Loading branch information
soypat committed Nov 24, 2024
1 parent 1b6005d commit 012f841
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,34 @@ on:
jobs:

build:
name: MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Setup GPU drivers
run: sudo brew install mesa

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

build:
name: Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup GPU drivers
run: sudo apt install libgl1-mesa-dev xorg-dev

- name: Env disable Cgo
run: echo "CGO_ENABLED=0" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
20 changes: 0 additions & 20 deletions forge/textsdf/glyph_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package textsdf

import (
"fmt"
"testing"

_ "embed"

"github.com/golang/freetype/truetype"
"github.com/soypat/gsdf/gleval"
"github.com/soypat/gsdf/gsdfaux"
"golang.org/x/image/math/fixed"
)

func TestABC(t *testing.T) {
Expand All @@ -33,20 +30,3 @@ func TestABC(t *testing.T) {
t.Fatal(err)
}
}

func Test(t *testing.T) {
ttf, err := truetype.Parse(_iso3098TTF)
if err != nil {
panic(err)
}
scale := fixed.Int26_6(ttf.FUnitsPerEm())
hm := ttf.HMetric(scale, 'E')
fmt.Println(hm.AdvanceWidth, int(hm.AdvanceWidth))
t.Error(hm)
// var g truetype.GlyphBuf
// err = g.Load(ttf, , 'B', font.HintingFull)
// if err != nil {
// panic(err)
// }

}

0 comments on commit 012f841

Please sign in to comment.