diff options
| author | Manolo Gouy <Manolo> | 2016-03-30 16:27:41 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-30 16:27:41 +0000 |
| commit | 730f2d12b275552cc142970f4f8a6a21e1beb5f0 (patch) | |
| tree | 99c1ff41911cfeb6001e8c830ef18f9271db7fbc /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx | |
| parent | 4a633d2aefd5fd538a3b446beaad17ce9a9caa6d (diff) | |
Continue removing platform-dependent code from Fl_PostScript.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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 | 12 |
1 files changed, 11 insertions, 1 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 c419b4fd6..fd6d24b47 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx @@ -1087,7 +1087,17 @@ void Fl_Xlib_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) { delete[] ucs_txt; } -#endif + +float Fl_Xlib_Graphics_Driver::scale_font_for_PostScript(Fl_Font_Descriptor *desc, int s) { + // Xft font height is sometimes larger than the required size (see STR 2566). + // Increase the PostScript font size by 15% without exceeding the display font height + int max = desc->font->height; + float ps_size = s * 1.15; + if (ps_size > max) ps_size = max; + return ps_size; +} + +#endif // FL_DOXYGEN // // End of "$Id$" |
