This commit is contained in:
Kovid Goyal 2017-11-02 08:25:36 +05:30
commit d900811a7b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -245,6 +245,8 @@ render_char(Face *self, PyObject *args) {
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);