mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 18:32:23 +00:00
Retype: a near glyph whose size and turn would draw it past the tolerance ends the line
A near-matched glyph joins a line when its size and turn are each within the tolerance of the line's, and the line's type then draws it at the line's size and turn. Together with the glyph's own leftover distance, that change could put the drawn glyph further from its shape than the tolerance: an m 4% larger and turned 0.04 radians stayed on its line at tolerance 0.05. The layout check now also measures, for each near-matched glyph (and each glyph of a line whose first glyph is one), how far the change from its matched size and turn moves the drawn outline relative to its spread, combined with its own leftover distance, and splits the line before it when that passes the tolerance, or when the glyph's center sits further away than its origin may.
This commit is contained in:
+3
-1
@@ -11322,7 +11322,9 @@ mean square distance of its sampled outline points from their center), is at mos
|
||||
tolerance: an outline simplified, a curve split in two, or contours in another order, start or direction. The tolerance
|
||||
and this measure are VectorCraft's own. A near-matched glyph may differ from its line by the tolerance in size, turn
|
||||
and place; an exact glyph keeps the exact limits unless the line's first glyph, whose size and turn the line takes, is
|
||||
a near match. Each entry of `fonts` in the result has a `score`, from 1 when every glyph of the line is exact down to 0
|
||||
a near match. The line also splits before a near-matched glyph, or a glyph of a line whose first glyph is one, that
|
||||
the type would draw further from its shape than the tolerance by the same measure (its own leftover distance together
|
||||
with the change of size and turn) or with its center further away than its origin may be. Each entry of `fonts` in the result has a `score`, from 1 when every glyph of the line is exact down to 0
|
||||
at a leftover distance of 0.05. A compound path that holds several
|
||||
glyphs, such as a word made into one compound path, is split into groups of contours (a contour with the contours
|
||||
inside it) in path order, and runs of up to three groups are matched, the longest first among those after which the
|
||||
|
||||
Reference in New Issue
Block a user