Enable subpixel quantization and positioning
This commit is contained in:
parent
f04fbde6ca
commit
81f14edb49
1 changed files with 2 additions and 0 deletions
|
|
@ -245,6 +245,8 @@
|
|||
if (ctx == NULL) { PyErr_SetString(PyExc_ValueError, "Failed to create bitmap context"); goto end; }
|
||||
CGContextSetShouldAntialias(ctx, true);
|
||||
CGContextSetShouldSmoothFonts(ctx, true); // sub-pixel antialias
|
||||
CGContextSetShouldSubpixelQuantizeFonts(ctx, true);
|
||||
CGContextSetShouldSubpixelPositionFonts(ctx, true);
|
||||
CGContextSetRGBFillColor(ctx, 1, 1, 1, 1); // white glyphs
|
||||
CGAffineTransform transform = CGAffineTransformIdentity;
|
||||
CGContextSetTextDrawingMode(ctx, kCGTextFill);
|
||||
|
|
|
|||
Loading…
Reference in a new issue