El dibujo de texto de CGContext no se escala en el iPhone 4
Estoy tratando de crear una aplicación que se amplíe bien en el iPhone 4. Actualmente, la mayor parte se escala perfectamente, excepto por una pieza crucial: el texto que dibujo dentro de un CALayer, dentro de su método drawInContext:. Aquí está mi código:
- (void)drawInContext:(CGContextRef)context {
UIGraphicsPushContext(context);
CGContextSetGrayFillColor(context, 1.0f, 1.0f);
CGContextFillRect(context, self.bounds);
CGContextSetAllowsAntialiasing(context, true);
CGContextSetShouldAntialias(context, true);
CGContextSetAllowsFontSmoothing(context, true);
CGContextSetShouldSmoothFonts(context, true);
CGContextSetAllowsFontSubpixelQuantization(context, true);
CGContextSetShouldSubpixelQuantizeFonts(context, true);
CGContextTranslateCTM(context, 0.0f, self.frame.size.height);
CGContextScaleCTM(context, 1.0f, -1.0f);
CGContextSetFillColorWithColor(context, [[UIColor blackColor] CGColor]);
CGContextSelectFont(context, "CardKit", 30.0f, kCGEncodingMacRoman);
CGContextSetTextDrawingMode(context, kCGTextFill);
CGContextShowText(context, "A", sizeof("A"));
UIGraphicsPopContext();
}
Este corto produce texto nítido en ambos dispositivos, pero desafortunadamente, produce texto borroso en ambos. Así es como aparece:
Esa imagen se toma al 100% de zoom en el iPhone 4. ¿Qué hay en el mundo? ¿Alguna idea de cómo puedo solucionar esto?