mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
Sync and the variant switch can take a copy text's family from one side and its weight from the other. The variant id goes with the weight, so it can name a variant of the other family: the WASM renderer then picks the closest variant, but the SVG renderer falls back to the regular one. The frontend now gives each text content that a sync or a component swap commits variants of its own families: a run whose variant is not one of its family's takes the family's closest to its weight and style (cttx/update-font-variants, fonts/find-closest-variant). The pure runner has no fonts, so case BA leaves variant ids out of its comparison. The merge also leaves alone a run that already shows the placed style, so a main edit no longer rewrites the variant ids of a copy whose family is its own; with a new family, the run still takes the placed variant id. Benchmark (lower quantile, ms; baseline / now / ratio): deepest-edit-through-three-levels 35.2 / 35.7 / 1.01 edit-through-a-chain-of-dependents 68.9 / 65.2 / 0.95 library-update-into-copies 83.1 / 75.1 / 0.90 main-edit-into-10-copies 1.8 / 1.5 / 0.86 main-edit-into-100-copies 15.4 / 15.1 / 0.98 main-edit-into-1000-copies 153.1 / 151.4 / 0.99 variant-switch-into-copies 32.1 / 30.4 / 0.95 AI-assisted-by: claude-opus-5-5