Behdad Esfahbod
9ff76c6025
[morx] Respect default feature settings
...
Does NOT apply user-selected features. But at least now enables
correct subtables.
2018-09-15 18:31:14 +02:00
Behdad Esfahbod
2f97da6e2d
[aat] Change version field
2018-09-15 14:51:50 +02:00
Behdad Esfahbod
29c2bd1795
[morx] Add stub for InsertionChain
2018-09-15 14:47:18 +02:00
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.
2018-09-14 18:59:53 +02:00
Behdad Esfahbod
01b9148d9a
[unicode] Move Fitzpatrick hack from ot-layout into unicode.hh
2018-09-14 14:23:09 +02:00
Behdad Esfahbod
6ebbf514ac
Minor
2018-09-14 12:15:53 +02:00
Behdad Esfahbod
957dbed388
Fix builds
2018-09-14 12:14:42 +02:00
Behdad Esfahbod
4653e6cf3c
[aat] Add enums for pre-defined state and classes
...
Not sure how I didn't add before...
2018-09-14 11:31:33 +02:00
Behdad Esfahbod
67449c3933
Don't dereference offset before check_struct()
2018-09-14 10:58:00 +02:00
Michiharu Ariza
f2c4720ae6
Merge branch 'master' into cff-subset
2018-09-13 12:44:00 -07:00
Behdad Esfahbod
ca746f261e
[dfont] Also check dataLen range in sanitize
...
Just to disagree with myself re being done with this code...
2018-09-13 20:35:21 +02:00
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!
2018-09-13 20:32:13 +02:00
Behdad Esfahbod
effc7ced72
Rename HeadlessArrayOf::len to lenP1
...
So it doesn't accidentally match our templates, etc.
2018-09-13 20:21:54 +02:00
Michiharu Ariza
1234a81368
add head table to CFF/CFF2
2018-09-13 10:55:56 -07:00
Behdad Esfahbod
180a88a96c
[dfont] Some more
2018-09-13 19:26:44 +02:00
Behdad Esfahbod
0ab0f1e5ac
[dfont] Push methods further down
2018-09-13 19:13:01 +02:00
Behdad Esfahbod
8c9bdcc1fe
[dfont] Minor
2018-09-13 19:08:22 +02:00
Behdad Esfahbod
4479d3a2ed
[dfon]t Sanitize OpenTypeFontFace
2018-09-13 19:06:50 +02:00
Behdad Esfahbod
3fba41906f
[dfont] Minor
2018-09-13 18:49:16 +02:00
Behdad Esfahbod
bf852f0e62
[dfont] Make test pass
...
Offset 0 is not null in this context.
2018-09-13 18:47:53 +02:00
Behdad Esfahbod
29faebe911
Allow Offset<>'s that have no 0==null
2018-09-13 18:47:25 +02:00
Behdad Esfahbod
82f4d776c2
[dfont] Minor
2018-09-13 18:27:20 +02:00
Behdad Esfahbod
07e0ca930c
[bytes] Rename content to arrayZ
2018-09-13 17:39:51 +02:00
Behdad Esfahbod
dbb764dceb
[dfont] Clean up sanitize()
...
I don't think I broke anything. Fuzzers will let me know..
2018-09-13 17:21:00 +02:00
Behdad Esfahbod
361fc26861
Fix OffsetTo::sanitize() after reshuffling
2018-09-13 16:47:33 +02:00
Behdad Esfahbod
4c6b0fb5f6
OffsetTo::sanitize() Add version with three user_data
2018-09-13 16:39:30 +02:00
Behdad Esfahbod
a73bea69c5
OffsetTo::sanitize() more shuffling
2018-09-13 16:31:31 +02:00
Behdad Esfahbod
b482e5231c
OffsetTo::sanitize() reshuffling
2018-09-13 16:29:49 +02:00
Michiharu Ariza
3cae9c7515
fixed hb_plan_subset_cff_fdselect
...
FDSelect3/4 sentinel size wasn't taken into account
2018-09-12 17:23:08 -07:00
Michiharu Ariza
0f159a38a6
fixed serialize_fdselect_3_4
2018-09-12 16:08:54 -07:00
Michiharu Ariza
1608481d88
fixed bugs in Charset serialization
...
also some code cleanup
2018-09-12 13:22:19 -07:00
Michiharu Ariza
f45ac6296a
fixed name mixup in Remap::reset
...
it was causing inconsistent Strings Index subset results
2018-09-11 22:41:50 -07:00
Michiharu Ariza
497e7fb264
misc bug fixes
...
Added OpCode_FontMatrix to TopDictOpSet (yet to parse values)
fixed a wrong assert in encode_int
2018-09-11 16:47:55 -07:00
Michiharu Ariza
5b453f77f8
fixed off-by-one error with offSize
2018-09-11 16:20:39 -07:00
Michiharu Ariza
1499029a96
fixed a bug
2018-09-11 13:56:52 -07:00
Michiharu Ariza
0bd5912a08
make parse_bcd locale free
2018-09-11 13:24:27 -07:00
Michiharu Ariza
bb38d0f663
Implement parse_bcd
2018-09-11 10:43:15 -07:00
Michiharu Ariza
45e564a519
Merge branch 'master' into cff-subset
2018-09-11 09:46:37 -07:00
Behdad Esfahbod
bd75fd45cd
[dfont] Some renaming, plus add link to reference doc
2018-09-11 18:32:25 +02:00
Behdad Esfahbod
4134ec1307
[dfont] Sanitize only sfnt resources as OpenTypeFontFile
2018-09-11 17:56:03 +02:00
Behdad Esfahbod
6b5e4d07ad
[dfont] Minor
2018-09-11 17:26:24 +02:00
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.
2018-09-11 17:18:21 +02:00
Ebrahim Byagowi
2b2ed1e536
[dfont] Add test
2018-09-11 16:47:21 +02:00
Behdad Esfahbod
9479ffefbf
[dfont] Re-enable and fix offset handling
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/1085
2018-09-11 16:41:26 +02:00
Behdad Esfahbod
a1814e2bec
Whitespace
2018-09-11 14:45:23 +02:00
Behdad Esfahbod
383060cc33
[ft] Invalidate advance cache if font size changed
2018-09-11 14:41:19 +02:00
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
2018-09-11 14:36:14 +02:00
Behdad Esfahbod
f90bab8560
[util] Add --ft-load-flags
...
Useful for performance testing.
Not hooked to cairo yet. Just changes shaping, not rasterization.
2018-09-11 14:23:35 +02:00
Behdad Esfahbod
93f7596254
[util] Add -n shorthand for --num-iterations
...
Meh.
2018-09-11 14:11:10 +02:00
Behdad Esfahbod
047a84c5dd
[ft] Towards caching slow get_h_advance results
...
Related to https://github.com/harfbuzz/harfbuzz/pull/1082
2018-09-11 14:05:16 +02:00