Commit Graph

3775 Commits

Author SHA1 Message Date
Emil A Eklund (eae) 91770e1c56 Fix signed/unsigned warning (#522)
Change hb_buffer_diff to explicitly cast result of abs to unsigned when
comparing with position_fuzz to avoid unsafe signed/unsigned comparions
warnings on windows.
2017-08-15 16:25:18 -07:00
Behdad Esfahbod 587f15ece3 Minor 2017-08-14 15:23:10 -07:00
Behdad Esfahbod 338e61ad1b Fix typo 2017-08-14 12:36:38 -07:00
Jonathan Kew 331d66c7fe Add function to compare two buffers
Based on patch from Jonathan Kew.

Needs more cleaning up and documentation.

New API:
hb_buffer_diff_flags_t
hb_buffer_diff()
2017-08-14 11:44:12 -07:00
Behdad Esfahbod 219af509ef [graphite2] Fix warning 2017-08-13 15:10:26 -07:00
Behdad Esfahbod 239119a631 [unsafe-to-break] Mark all positions as unsafe in alternative shapers 2017-08-13 15:08:34 -07:00
Behdad Esfahbod 05fabbd03e [unsafe-to-break] Towards verifying unsafe-to-break in --verify
We break and shape fragments and reconstruct shape result from them.
Remains to compare to original buffer.  Going to add some buffer
comparison API and use here, instead of open-coding.
2017-08-11 20:00:55 -07:00
Behdad Esfahbod 6ce25f57c6 Fix hb_buffer_append()
Ouch!
2017-08-11 19:31:05 -07:00
Behdad Esfahbod 1c17c2bde5 [unsafe-to-break] Copy flag to all glyphs in a cluster
Makes consumption easier.
2017-08-11 19:06:07 -07:00
Behdad Esfahbod ec104e5912 [unsafe-to-break] Mark unsafe is cluster merging is disabled
We were relying on cluster merges not requiring unsafe flagging because
they get merged.  If cluster level requests no merging, then we flag
unsafe when merge would have happened.
2017-08-11 18:24:27 -07:00
Behdad Esfahbod 39a9749430 New API: hb_buffer_append() 2017-08-11 15:52:06 -07:00
Behdad Esfahbod 14a639ea59 [unsafe-to-break] Fix Use-of-uninitialized-value in unsafe_to_break_set_mask
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3011
2017-08-11 11:30:39 -07:00
Behdad Esfahbod e43aad5552 [unsafe-to-break] Flag in Thai PUA shaping 2017-08-10 20:54:15 -07:00
Behdad Esfahbod eae009602b [unsafe-to-break] Flag in Hangul shaper 2017-08-10 20:50:48 -07:00
Behdad Esfahbod b65aa1cd47 [unsafe-to-break] Flag during mark attachment 2017-08-10 20:32:02 -07:00
Behdad Esfahbod 882ebdadd6 [unsafe-to-break] Flag during cursive positioning 2017-08-10 20:23:17 -07:00
Behdad Esfahbod 2d158ca376 [unsafe-to-break] Flag during kerning 2017-08-10 20:20:30 -07:00
Behdad Esfahbod a7c4972cce [unsafe-to-break] Flag during fallback positioning 2017-08-10 20:16:15 -07:00
Behdad Esfahbod e2a2b5b229 [unsafe-to-break] Be careful with flag propagation when merging clusters 2017-08-10 20:11:35 -07:00
Behdad Esfahbod f2868c2008 Set mask to 0, instead of 1, by default
This shouldn't matter.
2017-08-10 20:10:53 -07:00
Behdad Esfahbod 9e005c5d86 [unsafe-to-break] Mark Indic-like clusters as unsafe-to-break 2017-08-10 20:10:53 -07:00
Behdad Esfahbod 5287ccc935 [unsafe-to-break] Allocate public bits from 0 2017-08-10 15:02:34 -07:00
Behdad Esfahbod 91ce0c45d6 [safe-to-break] Fix logic when there is no out-buffer 2017-08-10 15:02:34 -07:00
Behdad Esfahbod a043c99f77 [unsafe-to-break] Simplify logic
Always use the algorithm for non-monotone case.  It's more robust.
2017-08-10 15:02:34 -07:00
Behdad Esfahbod 40bd7e9a1c [unsafe-to-break] Add UNSAFE_TO_BREAK flag
Not all shapers code is updated to set this properly.
GSUB and Arabic shaper are updated.
GPOS and other shapers are NOT.

Fixes https://github.com/behdad/harfbuzz/issues/224
2017-08-10 15:02:28 -07:00
Behdad Esfahbod ac8c4e56d8 [ft] Fix theoretical leak 2017-08-09 22:05:08 -07:00
Behdad Esfahbod 5a33057576 Treat HAMZA ABOVE similar to SHADD for sorting purposes
Part of https://github.com/behdad/harfbuzz/issues/509
2017-08-09 17:23:28 -07:00
Behdad Esfahbod 68af14d5cc Protect against div-by-zero in CBDT extent code
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1452#c5

CC https://github.com/behdad/harfbuzz/issues/139
2017-08-09 17:09:21 -07:00
Behdad Esfahbod 5dc30451b8 Two fixes to avar mapping
1. Handle segment with two entries correctly,

2. Fix rounding math.  Ouch!

Fixes https://github.com/behdad/harfbuzz/issues/521
2017-08-07 21:37:07 -07:00
Behdad Esfahbod dc2c418e39 [check-defs/symbols.sh] Drop empty-symbol lines
Fixes https://github.com/behdad/harfbuzz/issues/510
2017-08-03 12:34:15 +01:00
Ebrahim Byagowi 65f64d1400 Unbreak arm-none-eabi build again (#514) 2017-07-19 02:42:53 +04:30
Behdad Esfahbod c1432bce3c [arabic] Adjust feature order again
Fixes https://github.com/behdad/harfbuzz/issues/505
2017-07-14 17:35:17 +01:00
Cosimo Lupo 9813be3d12 [coretext] Allow to disable kern (#508)
* Minor

* [coretext] Fix leak

* [coretext] Do not reset num_features

* [coretext] allow to disable kern; re-enabling doesn't seem to be working
2017-07-14 17:11:46 +01:00
Behdad Esfahbod 9dd29c681e [use] Allow up to two medial-below letters
Fixes https://github.com/behdad/harfbuzz/issues/376
2017-07-14 17:01:27 +01:00
Behdad Esfahbod 216b003c91 [use] Fix shaping of U+AA29 CHAM VOWEL SIGN AA
Part of https://github.com/behdad/harfbuzz/issues/376
Also see https://github.com/roozbehp/unicode-data/issues/6

Test added, using NotoSansCham built from Noto Phase III sources.
2017-07-14 16:38:51 +01:00
Behdad Esfahbod f1cd7ca893 [indic] Add github URL 2017-07-14 15:59:40 +01:00
Behdad Esfahbod 3cc84f45b9 [indic] Fix https://github.com/behdad/harfbuzz/issues/478 2017-07-14 15:50:22 +01:00
Behdad Esfahbod e359a4b8f5 [indic] Disable automatic ZWNJ handling for Indic features
Fixes https://github.com/behdad/harfbuzz/issues/294

Also fixes a bunch of other Indic issues.  Test results after:

BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%)
GUJARATI: 366355 out of 366457 tests passed. 102 failed (0.0278341%)
GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%)
KANNADA: 951201 out of 951913 tests passed. 712 failed (0.0747968%)
KHMER: 299071 out of 299124 tests passed. 53 failed (0.0177184%)
MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%)
TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)

Before:

BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%)
GUJARATI: 366349 out of 366457 tests passed. 108 failed (0.0294714%)
GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%)
KANNADA: 951190 out of 951913 tests passed. 723 failed (0.0759523%)
KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%)
MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%)
TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
2017-07-14 14:22:52 +01:00
Behdad Esfahbod cdf1fd0627 [indic] Add infrastructure to disable ZWNJ-skipping in context-matching
Not used yet.
2017-07-14 12:43:34 +01:00
Dominik Schlösser 4e21ec5469 Fix for reordering of Tibetan vowel u (#443)
* Undone change for Tibetan vowel u

* removed comment on reordering that became invalid with roll-back

* Support for Dzongkha contractions with multiple vowel-signs

* Removed non-functional and unnecessary defines for HB_MODIFIED_COMBINING_CLASS_CCC138,140
2017-07-14 12:14:23 +01:00
Ebrahim Byagowi 3b0e47ca00 Fix arm-none-eabi build (fixes #451) (#496) 2017-06-19 14:47:09 +04:30
Ebrahim Byagowi 76c4873e8c Support branch prediction helpers on clang compiles (#491) 2017-06-02 13:23:10 -04:00
Behdad Esfahbod 7dba30639a Handle allocation failure in hb-language code 2017-06-01 11:44:42 -04:00
Sebastian Rasmussen 92e2c4baaf Avoid using strdup inside library. (#488)
If an application provides a malloc replacement through
hb_malloc_impl() it is important that it is used to allocate
everything, but the use of strdup() circumvents this and
causes system malloc() to be called instead. This pairs
badly with the custom hb_free_impl() being called later.
2017-05-29 10:53:30 -07:00
Khaled Hosny 06cfe3f736 Do not skip TAG characters in glyph substitution (#487)
Hide them like Mongolian Free Variation Selectors instead.

Fixes https://github.com/behdad/harfbuzz/issues/463
2017-05-17 11:32:47 -07:00
Behdad Esfahbod 1817221620 Minor 2017-05-16 14:26:28 -07:00
mhosken 74b99ef224 Fix graphite2 rtl conversion (#475) 2017-04-20 11:13:22 -07:00
Chris Peterson aacca37590 Fix clang -Wcomma warnings (#471) (#472)
clang's new -Wcomma compiler option warns about possible misuse of the
comma operator such as between two statements.

hb-common.cc:190:9 [-Wcomma] possible misuse of comma operator here
hb-ot-layout-gsubgpos-private.hh:345:30 [-Wcomma] possible misuse of
comma operator here
hb-shape-plan.cc:438:26 [-Wcomma] possible misuse of comma operator here
2017-04-17 23:25:24 -07:00
William Hua 5ecf96e3a2 Use absolute paths of ragel generated headers (#467)
https://github.com/behdad/harfbuzz/issues/455
2017-04-16 22:33:42 -07:00
jfkthame c04c1fe86e Blacklist GDEF table in additional Tahoma versions. (#459)
There are more broken versions of Tahoma out there on various Windows releases,
so we need to add them to our blacklist to avoid broken rendering.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 for details.
2017-04-11 14:29:13 -07:00