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
Behdad Esfahbod
a71ad88629
[hvgl] Rename a variable
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
32a6940df6
[hvgl] Minor const
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
76d4e5e0db
[hb-draw-compare] Always create diff file
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
3c84aa52f2
[hvgl] Move transforms around
...
This doesn't seem to quite match the spec. But produces fewer wrong
shapes. Down to 834 out of 34485 characters.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
3e1e2ab393
[hvgl] Another transform fix
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
ee9d7e5392
[hb-draw-compare] Speed up by removing cmp
...
It was gatekeeping only 5 glyphs, but 2x slowing down comparison.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
7e84cf811f
[hvgl] Simplify transform
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
d5174c41ae
[hvgl] Fix transform order
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
76dbae15e7
[hvgl] Minor
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
dcd73915f9
[draw-compare] Add --face-index
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
65d453a032
[hb-draw-compare] Tweak
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
96c7f6a7a7
[hb-svg-compare] Report exact diff
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
f14eb54a23
[hb-draw-compare] Trying to speed up
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
9625933535
[hb-draw-compare] Remove svgo; add custom SVG comparator
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
a703e34ced
[hb-draw-compare] Change default precision to 1
...
0 was producing faulty optinized shapes. Sigh..
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
00cb38b9e5
[hb-draw-compare] Remove svgo config
...
Was producing faulty results :(.
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
9fc1ac18c0
[hb-draw-compare] Rewrite...
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
4008b79c31
[hb-draw-compare] Reuse existing SVGs
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
37b7ab6a5c
[hb-draw-compare] Use find instead of ls
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
5672191426
[hb-draw-compare] Try making ls work
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
3d68517c38
[hb-draw-compare] Spoonfeed svgo
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
c86e0fcd3b
[hb-draw-compare] "Improve"
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
835d9ce0f8
[hb-draw-compare] Use batching hb-view
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
2c8e862c0e
[hb-draw-compare] Work on Unicodes, not glyphs
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
52534c6f4c
[test] Add hb-draw-compare
2025-03-02 16:59:23 -07:00
Behdad Esfahbod
453aea05b0
[hvgl] Use double instead of float for coords & transforms
...
As "spec" requires.
2025-03-02 16:59:19 -07:00
Behdad Esfahbod
00bc3ecf25
[geometry] Use int literals instead of float ones
...
In anticipation of templatizing on float type.
2025-03-02 16:58:37 -07:00