diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-09-19 10:52:07 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-09-19 10:52:07 +0200 |
| commit | 9b56da5753c21d223971d653dce413ee751d752d (patch) | |
| tree | 4d23b42deb58e6144460ff646ff4749289f522e7 /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx | |
| parent | 6160673bbff4d213894a357a43206742f56d54cc (diff) | |
Underline does not appear in some fonts and scales (X11-noCairo) (#1308)
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx')
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx | 9 |
1 files changed, 9 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 8c9e392e6..a7f8ae4d9 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx @@ -118,6 +118,15 @@ static void correct_extents (float s, int &dx, int &dy, int &w, int &h) { } } +void Fl_Xlib_Graphics_Driver::draw(const char *str, int n, int x, int y) { + if (!size_ || !font_descriptor()) font(FL_HELVETICA, FL_NORMAL_SIZE); + Fl_Region r2 = scale_clip(scale()); + int offset = (scale() == 1 ? 0 : -1); // for issue #1308 + draw_unscaled(str, n, floor(x), floor(y + offset)); + unscale_clip(r2); +} + + #if ! USE_PANGO /////////////////////////////////////////////////////////// |
