diff options
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 43e754130..547526ed3 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -575,7 +575,10 @@ Fl_Fontsize Fl_Graphics_Driver::size() {return size_; } double Fl_Graphics_Driver::width(const char *str, int nChars) { return 0; } /** Compute the width of Unicode character \p c if drawn with current font */ -double Fl_Graphics_Driver::width(unsigned int c) { char ch = (char)c; return width(&ch, 1); } +double Fl_Graphics_Driver::width(unsigned int c) { + char buf[4]; + return width(buf, fl_utf8encode (c, buf)); +} /** Return the current line height */ int Fl_Graphics_Driver::height() { return size(); } |
