From 48aa06dc7a144e12a7874b041b86f267c159027e Mon Sep 17 00:00:00 2001 From: Olivier Couet <olivier.couet@cern.ch> Date: Fri, 10 Mar 2017 13:10:04 +0100 Subject: [PATCH] Do not draw text with a size less than 1.5 pixel. Spell check --- graf2d/cocoa/src/TGQuartz.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graf2d/cocoa/src/TGQuartz.mm b/graf2d/cocoa/src/TGQuartz.mm index c81ed74f2c1..38028331450 100644 --- a/graf2d/cocoa/src/TGQuartz.mm +++ b/graf2d/cocoa/src/TGQuartz.mm @@ -355,7 +355,7 @@ void TGQuartz::DrawText(Int_t x, Int_t y, Float_t /*angle*/, Float_t /*mgn*/, if (!text || !text[0])//Can this ever happen? TPad::PaintText does not check this. return; - if (!GetTextSize())//Do not draw anything, or CoreText will create some small (but not of size 0 font). + if (GetTextSize()<1.5)//Do not draw anything, or CoreText will create some small (but not of size 0 font). return; NSObject<X11Drawable> * const drawable = @@ -700,7 +700,7 @@ void TGQuartz::AlignTTFString() //End of comment. //This code is from TGX11TTF (with my fixes). - //It looks like align can not be both X and Y aling? + //It looks like align can not be both X and Y align? const EAlign align = EAlign(fTextAlign); @@ -920,7 +920,7 @@ void TGQuartz::DrawFTGlyphIntoPixmap(void *pHack, FT_Bitmap *source, ULong_t for } // if fore or background have changed from previous character - // recalculate the 3 smooting colors (interpolation between fore- + // recalculate the 3 smoothing colors (interpolation between fore- // and background colors) if (fore != col[4].fPixel || back != col[0].fPixel) { col[4].fPixel = fore; @@ -930,7 +930,7 @@ void TGQuartz::DrawFTGlyphIntoPixmap(void *pHack, FT_Bitmap *source, ULong_t for TGCocoa::QueryColor(kNone, col[0]); } - // interpolate between fore and backgound colors + // interpolate between fore and background colors for (int x = 3; x > 0; --x) { col[x].fRed = (col[4].fRed * x + col[0].fRed * (4 - x)) / 4; col[x].fGreen = (col[4].fGreen * x + col[0].fGreen * (4 - x)) / 4; -- GitLab