Files
harfbuzz/test/draw/data/expected/basic/cff1.svg
T
Behdad EsfahbodandClaude Opus 4.6 1c32b69fe3 [hb-draw] Fix color font scaling by creating upem_font from face directly
Creating upem_font as a sub-font of the main font (which has scale =
upem * 64 due to subpixel bits) caused the paint API to emit spurious
parent→child scale transforms. With precision=2 rounding, 1/64 rounds
to 0.02 and 0.02*64 = 1.28, destroying the mathematical cancellation
and making color glyphs ~1.6x too large.

Fix by creating upem_font directly from the face, eliminating the
parent-child relationship. Update expected test outputs accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:26:19 -07:00

11 lines
1.1 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 -984 1513 1257" width="1513" height="1257">
<defs>
<path id="p1" d="M194,-12C255,-12 309,20 355,58L358,58L365,0L433,0L433,298C433,419 383,498 264,498C186,498 118,464 73,435L105,378C143,404 194,430 250,430C330,430 350,370 350,308C143,285 52,232 52,126C52,39 113,-12 194,-12ZM218,54C170,54 132,77 132,132C132,194 188,234 350,254L350,119C303,77 265,54 218,54Z"/>
<path id="p2" d="M297,-12C408,-12 507,85 507,251C507,401 440,498 314,498C260,498 206,469 162,430L164,518L164,712L82,712L82,0L148,0L155,50L158,50C201,11 252,-12 297,-12ZM283,57C251,57 207,71 164,108L164,363C210,406 253,429 294,429C386,429 422,357 422,250C422,130 363,57 283,57Z"/>
<path id="p3" d="M274,-12C332,-12 387,11 431,50L395,105C365,78 326,56 281,56C192,56 131,131 131,242C131,354 195,430 283,430C322,430 352,412 380,387L422,441C388,472 344,498 280,498C155,498 46,405 46,242C46,81 145,-12 274,-12Z"/>
</defs>
<use href="#p1" transform="translate(0 0) scale(1,-1)"/>
<use href="#p2" transform="translate(504 0) scale(1,-1)"/>
<use href="#p3" transform="translate(1057 0) scale(1,-1)"/>
</svg>