Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/image/font/opentype: fail to parse arcade_n.ttf #41658

Closed
hajimehoshi opened this issue Sep 27, 2020 · 5 comments
Closed

x/image/font/opentype: fail to parse arcade_n.ttf #41658

hajimehoshi opened this issue Sep 27, 2020 · 5 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@hajimehoshi
Copy link
Member

hajimehoshi commented Sep 27, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hajimehoshi/Library/Caches/go-build"
GOENV="/Users/hajimehoshi/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/hajimehoshi/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/hajimehoshi/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/60/khbk2xqn1c5bml1byjn89dwc0000gn/T/go-build345053018=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. Download arcade_n.ttf from http://9031.com/fonts/#arcade https://www.dafont.com/arcade-ya.font
  2. Parse it with opentype.Parse

What did you expect to see?

No error

What did you see instead?

Error sfnt: invalid OS/2 table from opentype.Parse

At lease, this can be parsed with github.com/golang/freetype/truetype. I'm not sure which the font or the opentype library is to blame.

CC @nigeltao

@gopherbot gopherbot added this to the Unreleased milestone Sep 27, 2020
@hajimehoshi hajimehoshi changed the title x/image/font/opentype: fail to parse arcade_n.ttf at 9031.com x/image/font/opentype: fail to parse Arcade-Regular.ttf at 9031.com Sep 27, 2020
@hajimehoshi
Copy link
Member Author

Sorry but Arcade-Regular.ttf was an old version and seems no longer available in the website. Let me close this.

@hajimehoshi hajimehoshi changed the title x/image/font/opentype: fail to parse Arcade-Regular.ttf at 9031.com x/image/font/opentype: fail to parse arcade_n.ttf at 9031.com Sep 27, 2020
@hajimehoshi hajimehoshi changed the title x/image/font/opentype: fail to parse arcade_n.ttf at 9031.com x/image/font/opentype: fail to parse arcade_n.ttf Sep 27, 2020
@hajimehoshi
Copy link
Member Author

Refound the font file at https://www.dafont.com/arcade-ya.font

@hajimehoshi hajimehoshi reopened this Sep 27, 2020
@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 29, 2020
@andybons
Copy link
Member

@nigeltao

@gopherbot
Copy link

Change https://go.dev/cl/510055 mentions this issue: Fix parsing of early version 0 OS/2 tables.

@gopherbot
Copy link

Change https://go.dev/cl/533495 mentions this issue: font/sfnt: support early version 0 OS/2 tables

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants