BurntSushi / xgbutil

A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)
Do What The F*ck You Want To Public License
194 stars 46 forks source link

Image.Text and non-English chars. #25

Closed KenjiTakahashi closed 10 years ago

KenjiTakahashi commented 10 years ago

The Text helper function seems to be rendering foreign chars incorrectly. For example (should be śledź): sledz

It's using a slightly modified _examples/draw-text code (changed the text to be rendered, of course). Tried with different fonts, all the same.

By the looking of this, I think it might be calculating the extents wrong. Which will make it a freetype-go bug, I guess. In such case, feel free to close this one.

KenjiTakahashi commented 10 years ago

OK, I've found some time to look at this in more depth. It is indeed a freetype-go bug or, precisely, it was, because it appears to be fixed upstream. I have rebased your fork locally and there seems to be only one minor change required (and compiler told me about it :-)). Cannot push it, though, because... I don't know, it just hangs halfway through...

To summarize, a freetype-go rebase fixes the problem. @BurntSushi, could you please have a look at this?

In the meanwhile, I'm closing this as not relevant.