Ebrahim Byagowi
669ac81ac5
Fix test-set leak issue
...
See also https://github.com/harfbuzz/harfbuzz/pull/1169
2018-09-22 16:49:23 +03:30
Ebrahim Byagowi
ef9307fd22
Fix test-font leak issue
...
See also https://github.com/harfbuzz/harfbuzz/pull/1169
2018-09-22 16:45:31 +03:30
Michiharu Ariza
76e54d2bd8
fixed subroutinized CFF2 flattening
...
and some code cleanup
2018-09-21 12:16:36 -07:00
Michiharu Ariza
321e592333
Added desubroutinize option to generate-expected-outputs.py
...
Currently hb-subset always desubroutinizes CFF fonts.
Note that even with this option fonttools won't generate the expected subset CFF fonts. They were manually created & tweaked to match hb-subset output.
2018-09-20 10:31:06 -07:00
Michiharu Ariza
f212c050ad
Added VORG struct and its subsetter
...
new file: hb-ot-vorg-table.hh
2018-09-20 09:45:43 -07:00
Behdad Esfahbod
5fd8bce945
[morx] Fix mark_set check
2018-09-19 22:34:09 -04:00
Michiharu Ariza
1377adc8a8
Added SourceHanSans-Regular for CFF subset test
...
Disabled FDSelect serialization to format 0 for compatibility with fonttools
2018-09-19 17:00:10 -07:00
Behdad Esfahbod
0739b28169
[aat] Minor
2018-09-19 17:32:21 -04:00
Behdad Esfahbod
7671cb9b04
[coretext] Minor
2018-09-19 17:10:26 -04:00
Behdad Esfahbod
dc8ed45292
[morx] Implement forward/backward processing
...
We reverse too many times. Can be optimized. But I doubt many fonts
use reverse lookups, so doesn't matter.
Other than not applying user features, this completes morx table
implementation.
2018-09-19 16:47:25 -04:00
Behdad Esfahbod
3bccd62196
[morx] Implement horiz-only/vert-only subtables
2018-09-19 16:24:34 -04:00
Behdad Esfahbod
041a08de3d
[morx] Improve buffer position in Insertion w DontAdvance and wo
...
Just speculation. Needs tests to determine which is correct behavior.
2018-09-19 16:02:56 -04:00
Michiharu Ariza
ebeccf3e63
fixed char widths & standard Encoding in subset CFF
...
also merged flush_n_args to flush_args into one
takes start index of the arguments on stack instead of count
2018-09-18 17:24:30 -07:00
Michiharu Ariza
bf4eb2e4cf
Added SourceSansPro-Regular along as CFF full-font test case
...
derived "expected" subset fonts from fonttools then manually tweaked further so they resemble hb-subset output
2018-09-18 15:53:37 -07:00
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