Behdad Esfahbod
cbcaba6ffd
One more bot fix
6 years ago
Behdad Esfahbod
94bfea0ce6
Fix build, another try
6 years ago
Behdad Esfahbod
89dd4b9597
Fix bots
...
"Unused private member" warning turned error. ugh.
6 years ago
Behdad Esfahbod
4e62627831
Enforce single-param static_assert() only
...
So we don't accidentally break it again.
6 years ago
Behdad Esfahbod
f1a86e1e6f
Remove unused try
6 years ago
Behdad Esfahbod
ebd50b3c83
Fix static_assert
6 years ago
Behdad Esfahbod
10642b3fbf
Disallow null-enabled offsets to unsized structures...
...
...like UnsizedArrayOf<>.
This fixes a class of crasher bugs, mostly with color and AAT tables. We
cannot use nullable offsets to varsized data that does not declare min_size,
because it's nost safe to use our fixed-size null pool for types that have
their size external. So, use non_null'able offsets for these.
A further enhancement would be to make use of min_size in Null<> itself.
Will try that after.
6 years ago
Behdad Esfahbod
9ff76c6025
[morx] Respect default feature settings
...
Does NOT apply user-selected features. But at least now enables
correct subtables.
6 years ago
Behdad Esfahbod
2f97da6e2d
[aat] Change version field
6 years ago
Behdad Esfahbod
29c2bd1795
[morx] Add stub for InsertionChain
6 years ago
Behdad Esfahbod
f8ccb545c4
[dfont] Disable null-processsing for offsets
...
An offset to unsized arrayis not safe to be redirected to our fixed-sized
null pool. Plus, we want to reject, not repair, bad-looking dfonts.
6 years ago
Behdad Esfahbod
01b9148d9a
[unicode] Move Fitzpatrick hack from ot-layout into unicode.hh
6 years ago
Behdad Esfahbod
6ebbf514ac
Minor
6 years ago
Behdad Esfahbod
957dbed388
Fix builds
6 years ago
Behdad Esfahbod
4653e6cf3c
[aat] Add enums for pre-defined state and classes
...
Not sure how I didn't add before...
6 years ago
Behdad Esfahbod
67449c3933
Don't dereference offset before check_struct()
6 years ago
Behdad Esfahbod
ca746f261e
[dfont] Also check dataLen range in sanitize
...
Just to disagree with myself re being done with this code...
6 years ago
Behdad Esfahbod
3789c557ca
[dfont] Solve the mystery +2 offset thing!
...
Previously, ResourceForkHeader was defined as 30 bytes, having the typeCountM1 as last member.
There was a mysterious offset-by-2 in the code, derived from FontTools and JDK code this was
ported from.
In testing, I observed that typeListZ offset is actually 28. Suggesting that the typeCountM1
does NOT actually belong to ResourceForkHeader, but belongs to the array itself. Adjusting for
that resolves the mystery +2 offset hack, so everything is clean and good now.
This, concludes my dfont hacking. The code looks great now, and I'm happy to leave it.
Fuzzers might disagree though, we will see!
6 years ago
Behdad Esfahbod
effc7ced72
Rename HeadlessArrayOf::len to lenP1
...
So it doesn't accidentally match our templates, etc.
6 years ago
Behdad Esfahbod
180a88a96c
[dfont] Some more
6 years ago
Behdad Esfahbod
0ab0f1e5ac
[dfont] Push methods further down
6 years ago
Behdad Esfahbod
8c9bdcc1fe
[dfont] Minor
6 years ago
Behdad Esfahbod
4479d3a2ed
[dfon]t Sanitize OpenTypeFontFace
6 years ago
Behdad Esfahbod
3fba41906f
[dfont] Minor
6 years ago
Behdad Esfahbod
bf852f0e62
[dfont] Make test pass
...
Offset 0 is not null in this context.
6 years ago
Behdad Esfahbod
29faebe911
Allow Offset<>'s that have no 0==null
6 years ago
Behdad Esfahbod
82f4d776c2
[dfont] Minor
6 years ago
Behdad Esfahbod
07e0ca930c
[bytes] Rename content to arrayZ
6 years ago
Behdad Esfahbod
dbb764dceb
[dfont] Clean up sanitize()
...
I don't think I broke anything. Fuzzers will let me know..
6 years ago
Behdad Esfahbod
361fc26861
Fix OffsetTo::sanitize() after reshuffling
6 years ago
Behdad Esfahbod
4c6b0fb5f6
OffsetTo::sanitize() Add version with three user_data
6 years ago
Behdad Esfahbod
a73bea69c5
OffsetTo::sanitize() more shuffling
6 years ago
Behdad Esfahbod
b482e5231c
OffsetTo::sanitize() reshuffling
6 years ago
Behdad Esfahbod
bd75fd45cd
[dfont] Some renaming, plus add link to reference doc
6 years ago
Behdad Esfahbod
4134ec1307
[dfont] Sanitize only sfnt resources as OpenTypeFontFile
6 years ago
Behdad Esfahbod
6b5e4d07ad
[dfont] Minor
6 years ago
Behdad Esfahbod
d5c509272f
[dfont] Fix test expecatation and minor touch up
...
I have no way to authoritatively know, but looks like test font only has one
face. So, adjust test expectation instead.
6 years ago
Ebrahim Byagowi
2b2ed1e536
[dfont] Add test
6 years ago
Behdad Esfahbod
9479ffefbf
[dfont] Re-enable and fix offset handling
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/1085
6 years ago
Behdad Esfahbod
a1814e2bec
Whitespace
6 years ago
Behdad Esfahbod
383060cc33
[ft] Invalidate advance cache if font size changed
6 years ago
Behdad Esfahbod
54998befc4
[ft] Cache advances
...
I decided to always use the cache, instead of my previous sketch direction
that was to only allocate and use cache if fast advances are not available.
The cache is a mere 1kb, so just use it...
TODO: Invalidate cache on font size change.
Fixes https://github.com/harfbuzz/harfbuzz/issues/651
Fixes https://github.com/harfbuzz/harfbuzz/pull/1082
6 years ago
Behdad Esfahbod
f90bab8560
[util] Add --ft-load-flags
...
Useful for performance testing.
Not hooked to cairo yet. Just changes shaping, not rasterization.
6 years ago
Behdad Esfahbod
93f7596254
[util] Add -n shorthand for --num-iterations
...
Meh.
6 years ago
Behdad Esfahbod
047a84c5dd
[ft] Towards caching slow get_h_advance results
...
Related to https://github.com/harfbuzz/harfbuzz/pull/1082
6 years ago
Behdad Esfahbod
237f215378
[ft] Add advances() callback
6 years ago
Behdad Esfahbod
cbea7d49ab
[ot-font] Rename
6 years ago
Behdad Esfahbod
d8a67dac2a
[ot-font] Add advances() callbacks
6 years ago
Behdad Esfahbod
0ea42e117b
[cache] Minor
6 years ago
Behdad Esfahbod
0f520adaac
Revert "Remove unused hb_cache_t"
...
This reverts commit 473b17af4d
.
Updates to recent changes.
6 years ago