Commit Graph
18267 Commits
Author SHA1 Message Date
Behdad Esfahbod ba9a61597f [hvgl] Fix MINI build
HVF disabling to be configured better. But fix build for now.
2025-03-02 17:03:51 -07:00
Behdad Esfahbod 758ee5cff9 [COLR] Regain speed if all (normalized) coords are 0 2025-03-02 17:03:51 -07:00
Behdad Esfahbod da1fba8863 [cff] Regain speed re skipping applying variations 2025-03-02 17:03:51 -07:00
Behdad Esfahbod f883d370af [glyf] Regain speed if variations are all zero
We always have coords array populated now... Check for non-zero.
2025-03-02 17:03:49 -07:00
Behdad Esfahbod d4bf8a7734 [glyf] Regain speed if variations are all zero
We always have coords array populated now... Check for non-zero.
2025-03-02 17:03:15 -07:00
Behdad Esfahbod 181b2ed946 [hb-draw-compare] Two small fixes 2025-03-02 17:00:17 -07:00
Behdad Esfahbod c42e6e741d [hb-draw-compare] Remove --face-loader=auto as well
No need to change all kinds of parameters under the hood.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod 67d005f660 [hb-draw-compare] Default to ot shaper
Since there's no 'ft' shaper, hence --font-funcs2=ft was failing.

Still using auto for --face-loader, since we support ot, ft, and coretext
there.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod d3e7f916e1 [hb-draw-compare] Compare glyphs, not Unicodes
Unicodes can still be specified using --unicodes; but default to all glyphs
in the font.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod cf7f5ad0ed [font] Remove avar->is_biased() short-circuit
That was not considering avar2 fonts. Let the has_nonzero_coords
magic take care of optimizing for default instance. A couple extra
allocations during hb_font_create(), but no big deal.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod 5f93435d01 [ot-font/hvgl] Guard include 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 68bc56f62c [hb-draw-compare] Wording 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 72a1c49798 [hb-draw-compare] Add --shaper=auto and --face-loader=auto 2025-03-02 17:00:17 -07:00
Behdad Esfahbod ddf23adf43 [hb-draw-compare] Wording 2025-03-02 17:00:17 -07:00
Behdad Esfahbod aa3d37e8df [avar] Rewrite the "extended" logic more robustly 2025-03-02 17:00:17 -07:00
Behdad Esfahbod a0dcca6719 [avar] Non-change 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 0ce046953d [hb-draw-compare] Allow skipping one funcs or other
To just generate caches... E.g --font-funcs1 ''

And a couple other fixes.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod e049666552 [avar] Fix bug introduced ... 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 4bfa3a84e7 [hb-draw-compare] Rename a couple of options 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 0383495dbb [hb-draw-compare] Add --clean1 and --clean2 2025-03-02 17:00:17 -07:00
Behdad Esfahbod e83ec2800e [hb-draw-compare] Cache actual instance 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 994c7048a2 [hb-darw-compare] Minor; in anticipation of next change 2025-03-02 17:00:17 -07:00
Behdad Esfahbod e6e68f4671 [hb-draw-compare] Speed up cached case 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 919ae83b93 [hb-svg-compare] Short-circuit if contents are exactly the same 2025-03-02 17:00:17 -07:00
Behdad Esfahbod dd69cc5715 [hb-draw-compare] Change tolerance to 0
Now we always match CoreText. So, drop tolerance to 0.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod 19b4c6e559 [subset] "Fix" subset tests after recent fvar/avar precision changes 2025-03-02 17:00:17 -07:00
Behdad Esfahbod d7b15b0e21 [font/fvar/avar] Increase axis coordinate normalization precision
Spec requires 16.16; we were doing 2.14. Fix up.
Now we do math in float, but do the 16.16 and final 2.14 rounding
as required by the spec.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod bfcbb439cb [avar] Remove some unused code
Unfortunately subsetter doesn't support avar2 yet. So, more
cruft still left in there.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod 29991730c6 [fvar] Remove unused code 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 9ccb714217 [font] Return NAN for design coords, if normalized coords were set 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 117b79fd92 [font] Change docs to match recent behavior change
We always allocate coords vectors full-sized.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod feb899bb93 [ft] Fix rounding of normalized coords
According to spec...
https://learn.microsoft.com/en-us/typography/opentype/spec/otvaroverview#coordinate-scales-and-normalization
2025-03-02 17:00:17 -07:00
Behdad Esfahbod 3caf3b2f0d [hb-svg-compare] Report 5 digits of float precision 2025-03-02 17:00:17 -07:00
Behdad Esfahbod 91c0fb3ff7 [hb-draw-compare] Drop down tolerance from .5 to .05
With all the avar fixes, we now match CoreText for tested fonts down
to ~.02 font units. The rest is probably just because of the 2.14
quantization of normalized axis values.
2025-03-02 17:00:17 -07:00
Behdad Esfahbod 3a489fd7c0 [avar] Another hack, to match CoreText
Until further notice, this mess remains...
2025-03-02 17:00:17 -07:00
Behdad Esfahbod 9b6da29971 [font/var] Try to regain performance of all-normalized-coords=0 2025-03-02 17:00:14 -07:00
Behdad Esfahbod 1f0aae5280 [font/var] Try to allow "biased" avar's
That map 0 to non-0!
2025-03-02 16:59:24 -07:00
Behdad Esfahbod 04be808886 [font/var] Always allocate coords vector the length of fvar axes
In prep for black magic.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod 74b0455e34 [avar] Bend to some weirdo font's wght mapping 2025-03-02 16:59:23 -07:00
Behdad Esfahbod f3a1ec291c [open-type] Minor float math 2025-03-02 16:59:23 -07:00
Behdad Esfahbod f3500cb3b4 [hvgl] I *think* I got transforms right this time! 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 7bf8ce5834 [hvgl] Fixup
Oops. Still buggy.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod c6ec6eb194 [geometry] Whitespace 2025-03-02 16:59:23 -07:00
Behdad Esfahbod f286d33d67 [hvgl] Back to composing transforms the way the paper says
...
2025-03-02 16:59:23 -07:00
Behdad Esfahbod 2bcbfd35ea [hvgl] Indent 2025-03-02 16:59:23 -07:00
Behdad Esfahbod fc0966d90a [hvgl] Fix the complex-number transform code path
Tested by U+9DAD at wght=900 of PingFangUI.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod d4511648db [draw] Simplify quadratic-to-cubic conversion
Hopefully introduces less error.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod b2cdebeb64 [hb-draw-compare] Change tolerance from 1 to .5 2025-03-02 16:59:23 -07:00
Behdad Esfahbod 9685d39315 [hvgl] Another clamp
Huh. Errors down to just 1!
2025-03-02 16:59:23 -07:00
Behdad Esfahbod 40b9930c97 [hvgl] Minor move condition
Previous code was safe but was taking address of an out-of-range
array member if end was 0. Was never dereferenced though.
2025-03-02 16:59:23 -07:00