mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-10 04:11:23 +00:00
The reference app's Character panel has an anti-aliasing method for type, with the options None, Sharp, Crisp and Strong. VectorCraft had no such control or attribute. The Character panel has an Anti-aliasing Method dropdown under Character Rotation, and text.setFormat takes antiAlias. The method belongs to the whole type object and to every frame of its thread. It sets how the edges of the characters are drawn as pixels: on the canvas, in raster exports and when the type is rasterized. VectorCraft defines the methods. Sharp, the default, draws the edges as before. None paints a pixel only where the type covers at least half of it. Crisp shows a pixel that the type covers by a share c at 2c - 0.5, and Strong shows it at 2c, each kept between 0 and 1. The opacity of the type's paints is kept. In an export that supersamples its art, the type is drawn at the export's own resolution, and the averaging keeps its edges as the method draws them. Type is drawn as Sharp when it holds inline graphics, when its own fills or strokes include a brush stroke or a blend mode other than Normal, when it overprints while Overprint Preview is on, and on the canvas while it shows a substitution highlight. SVG, PDF and EPS export are unchanged. The method is saved only when it is not Sharp. Reset Panel sets Sharp, and it is now one undo step (it was two). Docs: docs/mcp.md, docs/target-app-parity.md.