View Full Version : core text and CALayer: improve text quality
Jun 5, 2011, 06:50 AM I recently found out about core text. So I
am playing around with this API.  I use core text to draw text
in a CALayer subclass. This is similar to CATextLayer, but
should (eventually) give more flexibility on how and where the
text is drawn.  Text is displayed but the quality is not very
good. A common problem according to google. One requirement for
decent looking text is not to have a transparent background.
(This is already the case in my code). Another suggestion
somewhere was to set CGContextSetAllowsAntialiasing,
CGContextSetAllowsFontSubpixelQuantization, etc. I assumed these
had to be set to YES, but this did not improve the text drawing.
I then found a message that CGContextSetShouldSmoothFonts should
be set to NO. This did improve the quality. There are (at least)
7 of these type of functions. With 2 possibilities (yes,no) that
gives (at least) 2^7 possible combinations. A bit too much to
try out.  So, my questio