Font#text_width
(or the underlying library) might be incorrectly calculating the width by adding the "width" of the combining characters, giving you a too wide result."\u00F6"
in a string literal instead of typing ö directly? What about "o\u0308"
? These are equivalent in Unicode, but one is precomposed and the other is not.
"ö"
and "\u00F6"
display and calculate correctly on OS X; the decomposed form, "o\u0308"
, renders an o followed by a blank space and calculates the width "correctly" for that incorrect rendering. Your problem with Font#text_width
might be a Windows specific bug at any rate.-KUTF-8
, otherwise you get that invalid multibyte sequence error.Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill