diff options
| author | Manolo Gouy <Manolo> | 2016-04-01 15:37:19 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-01 15:37:19 +0000 |
| commit | d756822c2b4ae18fff37dc6f7d364b917694bfee (patch) | |
| tree | 60b13ec7884f5555fed40becdb076e2c4f5998b8 /src/Fl_Text_Display.cxx | |
| parent | a53297ebab1828aaa93a54a7b627586fbe3bbd10 (diff) | |
Complete removal of platform-dependent code from Fl_Text_Display.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11499 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index d3967b70d..dc86319aa 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -33,12 +33,6 @@ #include <FL/Fl_Window.H> #include <FL/Fl_Screen_Driver.H> -#if defined(WIN32) || defined(__APPLE__) // PORTME: Fl_Screen_Driver - platform editor feel -#elif defined(FL_PORTING) -# pragma message "FL_PORTING: look out for some code that visualizes character composing" -#else -#endif - #undef min #undef max @@ -2206,18 +2200,16 @@ void Fl_Text_Display::draw_string(int style, if (!(style & BG_ONLY_MASK)) { fl_color( foreground ); fl_font( font, fsize ); -#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT // PORTME: Fl_Graphics_Driver - platform editor feel (fix this: fonts should not leak!) - // makes sure antialiased ÄÖÜ do not leak on line above - fl_push_clip(X, Y, toX - X, mMaxsize); -#endif + // Make sure antialiased ÄÖÜ do not leak on line above: + // on X11+Xft the antialiased part of characters such as ÄÖÜ leak on the bottom pixel of the line above + static int can_leak = Fl::screen_driver()->text_display_can_leak(); + if (can_leak) fl_push_clip(X, Y, toX - X, mMaxsize); fl_draw( string, nChars, X, Y + mMaxsize - fl_descent()); if (Fl::screen_driver()->has_marked_text() && Fl::compose_state && (style & PRIMARY_MASK)) { fl_color( fl_color_average(foreground, background, 0.6) ); fl_line(X, Y + mMaxsize - 1, X + fl_width(string, nChars), Y + mMaxsize - 1); } -#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT // PORTME: platform editor feel - fl_pop_clip(); -#endif + if (can_leak) fl_pop_clip(); } // CET - FIXME |
