diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-01-09 00:35:42 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-01-09 00:35:42 +0100 |
| commit | 2411336e8443ebe483b8023b16f1f9a37b84374b (patch) | |
| tree | db1452a8f2dfd720f7f3997e0259e454fac32c2c /src | |
| parent | 2df013931bbb57f00b66cbaa115a846327ac2aea (diff) | |
Fix X11 RTL text clipping (STR 2798) - part 2
Yet another fix for RTL text...
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx index 26d624b8d..a2c0b420c 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx @@ -873,6 +873,11 @@ void Fl_Xlib_Graphics_Driver::drawUCS4(const void *str, int n, int x, int y) { void Fl_Xlib_Graphics_Driver::rtl_draw_unscaled(const char* c, int n, int x, int y) { + // clip if outside 16-bit space (STR 2798) + + if (x < clip_min() || x > clip_max()) return; + if (y < clip_min() || y > clip_max()) return; + #if defined(__GNUC__) // FIXME: warning Need to improve this XFT right to left draw function #endif /*__GNUC__*/ |
