golang/freetype

Failing to rasterize non-latin character correctly

andresperezl opened this issue · 1 comments

Go 1.17.6
Windows 11 amd64
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0

I'm trying to use the library to draw some text in transparent background, but it doesn't matter what font I use, it fails to correctly rasterize non-latin characters:

out

Here is a screenshot of Notepad using the same font:

image

Notepad using the same font

Be aware that Notepad would be using font fallbacks. If "the same font" didn't actually have Chinese, Japanese or Korean characters, Notepad (or something in the Win32 UI stack) would find another font that did.

Freetype (whether the C or Go flavors) does not do font fallback. You'd need (the Go equivalent) of font-config (on Linux) or something similar (on Windows).

Can you attach the font?