Closed sago35 closed 2 years ago
I tested your fix on a classic font, it generated properly the Go file! 🎉 With the feather font, it does not work and I have the following error:
./tinyfontgen-tt --package bfeather --fontname FontsFree-Net-bfeather FontsFree-Net-bfeather.ttf --output birds.go --verbose
2022/08/07 09:47:26 sfnt: invalid OS/2 table
I will not keep digging into the problem for this font and will try another one. Thanks @sago35
I have tried with easter eggs and did not work either
❯ ./tinyfontgen-tt --package easter --fontname easter ./test-fonts/Easter_art.ttf --output easter.go --verbose 09:49:07
2022/08/07 09:57:33 sfnt: invalid cmap table
At the moment we are unable to handle fonts that would cause golang.org/x/image/font/opentype to return an error. These are know issues, but the situation has not changed for a long time.
https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+sfnt
The following two fonts can be rendered by github.com/golang/freetype/example/freetype, but I don't think I can support them for a while.
https://github.com/golang/freetype/tree/master/example/freetype
Thanks @sago35 for your pointers! That's fine it was not a critical need :)
Thank you for the fix @sago35 now merging.
When the following font was used for generation, NULL characters were generated in the comments and the build failed.
This is not only TinyGo, but also Go cannot be built. Therefore, it has been corrected so that the NULL character is not included in the comment.
After modification, it works well as follows.
https://fontsfree.net/arfelick-feather-font-download.html