typemytype / drawbot

http://www.drawbot.com
Other
401 stars 62 forks source link

set CGContextSetAllowsFontSubpixelQuantization to False #541

Open typemytype opened 1 year ago

typemytype commented 1 year ago

during animation with text and textBox minimal changes in the formattedString (pointSize, variable settings, ...) influences the pixel output heavily

https://github.com/typemytype/drawbot/assets/1190358/ba71ba1e-9474-473e-9f91-8116c5a7fa8f

setting Quartz.CGContextSetAllowsFontSubpixelQuantization(context, False) disables subpixel rendering, see

https://github.com/typemytype/drawbot/assets/1190358/aa85da13-0e45-4e14-8123-d02c1658ea13

proposal:

add saveImage argument: subpixelRendering=False the default would be True so nothing changes

justvanrossum commented 1 year ago

Great find! No longer we have to render text as BezierPaths to avoid this effect!