Michiharu Ariza
e75e7224c9
include curve control points in extents
...
this makes results consistent with FT
also optimized handling of path end points
2018-09-17 15:34:39 -07:00
Michiharu Ariza
98b94f8ba5
fix static_assert failure in OffsetTo<TopDict>
2018-09-17 13:56:39 -07:00
Michiharu Ariza
d050ab8d3e
Merge branch 'master' into cff-subset
2018-09-17 13:07:29 -07:00
Michiharu Ariza
f0a4e0c2ca
fix build attempt ^3
2018-09-17 12:11:56 -07:00
Michiharu Ariza
f0d74971ae
fix attempt ^2: unuse INT32_MAX/MIN
2018-09-17 12:02:12 -07:00
Michiharu Ariza
4d963a2711
fix build attempt
2018-09-17 11:28:33 -07:00
Behdad Esfahbod
388ab91642
[morx] Implement InsertionChain
2018-09-17 20:28:32 +02:00
Michiharu Ariza
c0c85b852d
implemented get_glyph_extents with CFF1
...
Implemented path operators in a new struct PathProc hooked up to CSOpSet
Added current point to CSInterpEnv
2018-09-17 11:14:56 -07:00
David Corbett
d8d1e7df00
Don't enforce a native direction for Old Hungarian
2018-09-17 18:53:25 +02:00
Simon Hausmann
6a97d0f3d3
Fix installation of cmake config when building with cmake ( #1161 )
...
When building with the auto tools, the manually mantained
harfbuzz-config.cmake is installed. When building with cmake, we can use
cmake to generate the correct config files for us and install them.
2018-09-17 13:03:34 +04:30
Behdad Esfahbod
606bf57430
Revert forcing use of single-parameter static_assert()
...
Some clang versions define static_assert as a macro apparently, so we cannot
redefine it...
This reverts commit 94bfea0ce6
.
This reverts commit 4e62627831
.
2018-09-16 19:34:39 +02:00
Behdad Esfahbod
cbcaba6ffd
One more bot fix
2018-09-16 19:25:19 +02:00
Behdad Esfahbod
94bfea0ce6
Fix build, another try
2018-09-16 19:12:19 +02:00
Behdad Esfahbod
89dd4b9597
Fix bots
...
"Unused private member" warning turned error. ugh.
2018-09-16 18:11:46 +02:00
Behdad Esfahbod
4e62627831
Enforce single-param static_assert() only
...
So we don't accidentally break it again.
2018-09-16 18:09:36 +02:00
Behdad Esfahbod
f1a86e1e6f
Remove unused try
2018-09-16 18:01:32 +02:00
Behdad Esfahbod
ebd50b3c83
Fix static_assert
2018-09-16 17:57:12 +02:00
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.
2018-09-15 19:43:33 +02:00
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