diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d46cce7..44208b4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,14 +11,50 @@ on: jobs: - build: - runs-on: ubuntu-latest + build-windows: + name: Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + - 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-mac: + name: MacOS + runs-on: macos-latest-xlarge steps: - uses: actions/checkout@v3 - name: Setup GPU drivers - run: sudo apt install libgl1-mesa-dev xorg-dev + run: 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-linux: + name: Linux + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # ubuntu-latest runner has no GPU. - name: Env disable Cgo run: echo "CGO_ENABLED=0" >> $GITHUB_ENV diff --git a/forge/textsdf/glyph_test.go b/forge/textsdf/glyph_test.go index 046e7a8..3c80738 100644 --- a/forge/textsdf/glyph_test.go +++ b/forge/textsdf/glyph_test.go @@ -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) { @@ -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) - // } - -}