Garret Rieger
1cfe650f02
Add a basic sketch of hb-subset-plan.
2018-02-07 12:41:21 -05:00
Behdad Esfahbod
126ffdbe95
[aat] Fix debug compile
2018-02-07 12:26:57 -05:00
Behdad Esfahbod
2971e9da49
[aat] Adjust unsafe-to-break logic some more
...
I believe I'm happy with it now.
2018-02-06 11:48:04 -05:00
Behdad Esfahbod
f49256d80f
[aat] Simplify unsafe-to-break logic
2018-02-06 11:39:36 -05:00
Behdad Esfahbod
cc1e0840ba
[buffer] Tweak diff re glyph_flags again
...
We expect the buffer to have no flags that the reference doesn't...
Meh. Makes MORX tests pass now. Need to better define the behavior.
2018-02-06 10:20:48 -05:00
Ebrahim Byagowi
d49ae5154e
Fix hb-buffer logic error
2018-02-06 10:13:11 -05:00
Behdad Esfahbod
f41b92134a
Fix fallthrough compiler warning with gcc >= 7
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/755
2018-02-05 19:51:09 -05:00
Behdad Esfahbod
0ff007daaa
[subset] Minor
2018-02-05 19:36:38 -05:00
Behdad Esfahbod
ae39fc8171
[subset] Build hb-subset into separate libharfbuzz-subset.so
2018-02-04 20:18:52 -05:00
Behdad Esfahbod
257022b178
Merge pull request #745 from googlefonts/master
...
Interface for hb_subset, skeleton for the hb-subset cli, and basic testing rigging.
2018-02-04 20:01:35 -05:00
Behdad Esfahbod
54e6efadd6
[aat] Fix unsafe-to-break
...
At any position, if state is not zero, mark unsafe-to-break before,
unless we can reason it safe.
At any position, if there's an action entry for end-of-text, mark
unsafe to break.
Also changes buffer diff impl to allow for flag differences as long
as the buffer glyph flags are superset of reference glyph flags.
With this, all MORX tests pass.
2018-02-04 17:18:54 -05:00
Garret Rieger
f83a43b561
Add CMake configuration for all of the new subsetting code.
2018-02-04 12:57:34 -08:00
Garret Rieger
34fa7b3ad2
Whitespace
2018-02-04 12:57:34 -08:00
Garret Rieger
8c3a672737
Get test-subset to pass.
2018-02-04 12:57:34 -08:00
Garret Rieger
74d39ed263
Attach add a hb_face_t to hb_subset_face_t.
2018-02-04 12:57:34 -08:00
Garret Rieger
a2965f2ea5
Add a basic implementation of hb-subset to enable compilation of test-subset.
2018-02-04 12:57:33 -08:00
Garret Rieger
cf403e1a53
Add hb-subset.h to hb.h
2018-02-04 12:57:33 -08:00
Garret Rieger
c02573516c
Fix typo in hb-subset.h
2018-02-04 12:57:33 -08:00
Rod Sheeter
9ccb8366f6
Start to sketch APIs for subsetting
2018-02-04 12:57:33 -08:00
Behdad Esfahbod
89b1906d99
[aat] More adjustment to ContextualSubtable
...
See comment.
With this, MORX-20 passes if I turn --verify off. Our unsafe-to-break
logic is currently broken in presence of end-of-text actions. That's,
ugh, extra work to fix. Let me try...
2018-02-04 14:45:02 -05:00
Behdad Esfahbod
8be596f0b7
[aat] In ContextualSubstitute, apply end-of-text action to last glyph
2018-02-04 14:40:17 -05:00
Behdad Esfahbod
c0b1c7eb2e
[aat] Remove unneeded check
2018-02-04 14:19:41 -05:00
Behdad Esfahbod
aed32589af
[aat] In ContextualSubtable, mark mark after substituting mark
...
Fixes MORX-21.
2018-02-04 12:36:54 -05:00
Behdad Esfahbod
fe5f9b1ae3
[aat] Fix ContextualSubtable sanitization
...
Fixes MORX-18, MORX-19, and MORX-22.
2018-02-04 12:36:54 -05:00
Bruce Mitchener
e8859fca3e
Enable use of atexit() on macOS and related platforms.
...
The atexit() man page indicates that this is expected to behave
in the expected way on unloading of shared libraries.
2018-02-03 19:20:40 -08:00
Bruce Mitchener
a89573770b
Use nullptr, not NULL.
2018-02-03 21:26:58 +02:00
David Corbett
ccb0367dae
Let VS1 follow U+1031 MYANMAR VOWEL SIGN E
2018-02-02 12:41:07 -08:00
punchcutter
c6dbf6e77c
Allow optional ZWJ in virama terminated cluster
2018-01-31 14:16:25 -08:00
Bruce Mitchener
dae20fb5a7
Use nullptr instead of 0.
2018-01-31 08:18:48 -08:00
Bruce Mitchener
90218fa93c
Fix typos.
2018-01-31 08:18:15 -08:00
Bruce Mitchener
148ca61075
[ot-layout] Fix nullptr dereference.
...
If the `calloc` for `gsub_accels` or `gpos_accels` fails, then the
unlikely branch afterwards can be taken, which frees up the
`hb_ot_layout_t`, but since those fields can now be `nullptr`, then
we don't want to dereference them.
2018-01-31 08:05:25 -08:00
Bruce Mitchener
0c66043a92
[coretext] Fix memory leaks.
...
In `reference_table`, if the data is empty and we return early,
we still need to release the data object.
In `hb_coretext_shape`, there two edge cases where an early
return should release the attributed string.
2018-01-31 08:04:15 -08:00
Behdad Esfahbod
e89df6e1ae
[aat] Limit number of DontAdvance transitions
...
Remove the faulty loop-detection logic. Use max-ops for breaking
out of infinite loops or heavy work.
https://twitter.com/behdadesfahbod/status/958065026262183936
2018-01-30 11:01:18 -08:00
Ebrahim Byagowi
55cae0d72e
[test] Use 'otool -L' where ldd doesn't exist (macOS) ( #732 )
2018-01-29 18:05:24 +03:30
David Corbett
2ec7dd1f6c
Fix Travis build on macOS ( #731 )
2018-01-29 02:18:28 +03:30
Behdad Esfahbod
12757b6929
Misc warning fixes
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/712
2018-01-26 18:14:05 -08:00
bungeman
85be365ed9
Use KernSubTableFormat2::rightClassTable
...
Issue originally reported at http://cppfiles.com/chromium.txt .
This fixes what appears to be a copy - paste issue which causes both
KernSubTableFormat2::rightClassTable and the 'right' argument to
KernSubTableFormat2::get_kerning to go unused.
2018-01-26 15:20:18 -08:00
Bruce Mitchener
19a93fcf19
Fix typos.
2018-01-21 10:33:54 -08:00
Behdad Esfahbod
51ce3828e6
[aat] Fix Ligature matching
...
I hope... Makes "ffi" work with Zapfino. I'm not sure if doing it correctly though...
2018-01-19 18:37:58 -08:00
Behdad Esfahbod
bef509855c
[aat] Add TODO
2018-01-19 18:24:00 -08:00
Behdad Esfahbod
e6f283ed7d
[aat] Implement LigatureSubtable
...
We form the Zapfino ligature now. Yay! No further testing done.
2018-01-19 18:09:48 -08:00
Behdad Esfahbod
f07ce661a2
[aat] Embed a sanitizer context in hb_aat_apply_context_t
...
For run-time checking.
2018-01-19 16:52:01 -08:00
Behdad Esfahbod
046690a4df
[aat] Add hb_aat_apply_context_t
2018-01-19 16:40:13 -08:00
Behdad Esfahbod
fd03449094
Rename hb_apply_context_t to hb_ot_apply_context_t
2018-01-19 16:40:13 -08:00
Behdad Esfahbod
94b49beee9
Whitespace
2018-01-19 16:40:13 -08:00
Cosimo Lupo
c8f2a4f5b9
hb-common.cc: Hatran script is right-to-left ( #714 )
...
"Hatran is written from right to left horizontally"
http://www.unicode.org/L2/L2012/12312-n4324-hatran.pdf
This ancient script was added with Unicode 8.0.
Also this spreadsheet (referenced in an inline comment in the
source code) has it as RTL: http://goo.gl/x9ilM
2018-01-19 01:19:40 +03:30
Ebrahim Byagowi
00806149b9
Improve avoiding C++ linkage, definition creation and cmake tests ( #710 )
2018-01-19 01:12:31 +03:30
Behdad Esfahbod
461a605fde
[aat] Allocate set dynamically
2018-01-17 10:02:48 -08:00
Behdad Esfahbod
949f6af289
Disallow sanitize recursing into Extension subtables multiple times
...
Fixes https://oss-fuzz.com/v2/testcase-detail/5216838347653120
which is a stack overflow, not by way of infinite recursion, just
being deep. That's disallowed anyway, so catch it as it happens,
not afterwards.
2018-01-15 20:44:10 -05:00
Behdad Esfahbod
bcb6f1ae0a
Whitespace
2018-01-15 20:34:05 -05:00