summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fl_font_win32.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx
index 63d51686a..bfbd1f349 100644
--- a/src/fl_font_win32.cxx
+++ b/src/fl_font_win32.cxx
@@ -388,8 +388,6 @@ void Fl_GDI_Graphics_Driver::draw(int angle, const char* str, int n, int x, int
void Fl_GDI_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
int wn;
- int i = 0;
- int lx = 0;
wn = fl_utf8toUtf16(c, n, (unsigned short*)wstr, wstr_len);
if(wn >= wstr_len) {
wstr = (xchar*) realloc(wstr, sizeof(xchar) * (wn + 1));
@@ -400,6 +398,8 @@ void Fl_GDI_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
COLORREF oldColor = SetTextColor(fl_gc, fl_RGB());
SelectObject(fl_gc, fl_fontsize->fid);
#ifdef RTL_CHAR_BY_CHAR
+ int i = 0;
+ int lx = 0;
while (i < wn) { // output char by char is very bad for Arabic but coherent with fl_width()
lx = (int) fl_width(wstr[i]);
x -= lx;