Commit Graph

528 Commits

Author SHA1 Message Date
Behdad Esfahbod c4712f8e37 Fix test 2017-08-10 20:27:21 -07:00
Behdad Esfahbod 3b54d0337e Add tests for 'avar' fix 5dc30451b8 2017-08-08 18:37:03 -07:00
Behdad Esfahbod c1432bce3c [arabic] Adjust feature order again
Fixes https://github.com/behdad/harfbuzz/issues/505
2017-07-14 17:35:17 +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 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
Dominik Schlösser 3a73e0d5e1 Shaping tests for Tibetan vowels (#446)
* Shaping tests for Tibetan vowels

* Test-cases for the Dzongkha contractions with multiple vowel-signs added.

* going to be removed

* Extended contraction-test-cases to all test cases in contractions.txt that actually use multiple-vowels (113 cases)
2017-07-14 12:14:55 +01: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
Dominik Schlösser c42869eb71 Small doc fix: `make check` runs the tests (#469) 2017-04-15 12:17:05 -07:00
Dominik Schloesser 8d256841ca Current fonttools (3.9.1) generate subset-file called font.subset.ttf instead of older font.ttf.subset 2017-03-27 12:05:35 +02:00
Dominik Schloesser c2a9de15f5 Updated samples: record-it.sh is now record-test.sh 2017-03-27 12:05:35 +02:00
Khaled Hosny f2e6c7ce51 [tools] Make hb-unicode-code work with Python 3
Related to https://github.com/behdad/harfbuzz/pull/445
2017-03-26 10:50:32 +02:00
Behdad Esfahbod 47e7a1800f Revert "Fix Context lookup application when moving back after a glyph delete"
This reverts commit b9b005f3a4.

This introduced invalid access cases. Revert until I fix correctly.
2017-03-10 13:23:02 -08:00
Behdad Esfahbod b9b005f3a4 Fix Context lookup application when moving back after a glyph delete
This was broken forever, since days that we did not allow moving
tape backwards. Works now. Reported by Doug Felt.
2017-03-01 14:27:23 -08:00
Behdad Esfahbod a11501444c Add few tests found by libFuzzer and oss-fuzz 2017-02-25 13:37:54 -08:00
jfkthame 44f7d6ecde Guard against underflow when adjusting length (#421)
* Guard against underflow when adjusting length

With the fuzz-testcase in mozilla bug 1295299, we end up with a recursed lookup that removes 3 items, when `match_positions[idx]` is 0, which results in (unsigned) `end` wrapping to a huge value.

Making `end` a signed int is probably the simplest route to a fix.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1295299.

* Add testcase for #421.
2017-02-16 19:03:24 -08:00
jfkthame 45766b673f [indic] Add support for Grantha marks that may be used in Tamil to th… (#401)
* [indic] Add support for Grantha marks that may be used in Tamil to the Indic table.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1331339.

Testcase: U+0BA4,U+0BC6,U+1133c,U+0BAA,U+1133c,U+0BC6,U+1133c

* [indic] Add test for Grantha nukta that is allowed in Tamil by ScriptExtensions.txt
2017-02-16 09:40:21 -08:00
Philip Withnall a6ced90efc test: Fix some memory leaks in test-font.c (#409)
Coverity IDs: 141039, 141040, 141041
2017-02-07 18:18:33 -08:00
Behdad Esfahbod e888f642db Route Adlam through Arabic shaper
Fixes joined Adlam rendering.

Fixes https://github.com/googlei18n/noto-fonts/issues/828
2017-01-26 14:50:14 -08:00
Behdad Esfahbod a8a5e81a52 [test-ot-math] Add test with nil face/font 2017-01-19 16:55:04 -08:00
Behdad Esfahbod 331d07bd40 Minor 2017-01-19 16:51:36 -08:00
Behdad Esfahbod b5ecf1bfa4 Fix warnings 2017-01-19 16:50:29 -08:00
Behdad Esfahbod 2f2ceee185 Minor 2017-01-19 16:48:01 -08:00
Khaled Hosny 2452543fdd [ot] Fix automatic fraction for RTL scripts (#405)
The numbers for right-to-left scripts are processed also from right to
left, so the order of applying “numr” and “dnom” features should be
reversed in such case.

Fixes https://github.com/behdad/harfbuzz/issues/395
2017-01-18 12:48:13 -08:00
Sascha Brawer 1337428e4f Update language tags to OpenType 1.8.1 (#403)
Resolves https://github.com/behdad/harfbuzz/issues/324
2017-01-18 04:51:02 -08:00
Behdad Esfahbod 31f7b1bb94 Add tests for USE using Marchen font and text
From http://www.babelstone.co.uk/Fonts/Marchen.html
2017-01-05 20:20:06 -08:00
Behdad Esfahbod 4b4a1b9f23 Fix assert fail with contextual matching
As discovered by libFuzzer / Chromium fuzzing.

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=659496
CC https://github.com/behdad/harfbuzz/issues/139
2016-12-21 23:14:16 -06:00
Behdad Esfahbod a0688e8e7b Ouch, finish previous change 2016-12-20 20:52:50 -06:00
Behdad Esfahbod de14c19d14 [fuzzer] Separate main() into a new file 2016-12-20 20:50:38 -06:00
Mike Hommey 1c98ff87c7 Support building with older glib versions
It is desirable to be able to build against older versions of glib.

fd7a245 changed the configure check to require glib > 2.38 for
G_TEST_DIST. Before that, version 2.16 was required, but in fact,
since aafe395, G_PASTE is being used, which was introduced in 2.19.1.
And since 0ef179e2, hb-glib uses GBytes, which were introduced in
2.31.10.

2.19.1 is rather old, but 2.38 is rather new. For Firefox, building
against 2.22 is still supported, although we could probably get away
with bumping that to 2.28. Either way, GBytes is not available.

Arguably, if you build against a glib that doesn't support GBytes,
you're not going to use the hb_glib_blob_create function, so we hide
the function when building against such a glib.

As for G_TEST_DIST, when building against versions of glib that don't
support it, we can fallback to the previous behavior, which, AIUI, was
just making the test not work when building in a separate directory.
2016-12-18 01:37:07 -06:00
Behdad Esfahbod 8c842e4a44 [hb-fuzzer] Get glyph extents for output glyphs
To exercise glyph-extents codepaths (glyf / CBLC+CBDT).
2016-12-04 20:28:38 -08:00
Behdad Esfahbod 9f6144cdb9 [CBDT] Add test for fetching glyph extents 2016-12-04 19:55:17 -08:00
Behdad Esfahbod d163cd9562 [tests] Add tests for vertical origin with ft and ot font-funcs 2016-10-26 18:27:48 +02:00
Frédéric Wang c3fa5d0e03 Remove inexistent file ttx file from test/api/Makefile.am 2016-10-24 21:42:04 +02:00
Behdad Esfahbod 34fc4a2cfa Fix dist 2016-10-04 14:47:12 -07:00
Behdad Esfahbod 46cc4a3a2a [MATH] Rename hb_math_*_t types to hb_ot_math_*_t
With this, I believe MATH table API is not ready to be merged.
2016-09-27 16:44:22 +02:00
Frédéric Wang 8d622f1114 Add tests for get_mathvariant (#329) 2016-09-27 13:53:34 +02:00
Frédéric Wang 485e4873fb Add tests for hb_ot_math_get_glyph_variants (#328) 2016-09-27 13:18:00 +02:00
Behdad Esfahbod a5629a2ed9 [MATH] Simplify test 2016-09-27 11:31:29 +02:00
Frédéric Wang edcfa789bf test-ot-math: Use different scales for vertical and horizontal directions and add test for hb_ot_math_get_min_connector_overlap. (#327) 2016-09-27 11:02:08 +02:00
Behdad Esfahbod cdc9eef7da [MATH] Enable tests for glyph-assembly italics-correction 2016-09-26 22:18:41 +02:00
Behdad Esfahbod 86106c7528 [MATH] Rename all API to hb_ot_math_* 2016-09-26 22:14:29 +02:00
Frédéric Wang 51da7a1cd6 MATH table: Add API to access math variants. 2016-09-26 15:18:16 +01:00
Frédéric Wang 722e620f20 Use G_TEST_DIST to build the path of math test fonts 2016-09-26 13:49:18 +01:00
Behdad Esfahbod 17ff30e9af [MATH] Clean up get_top_accent_attachment()
Note, the function now returns "half of horizontal advance width"
if top accent attachment for glyph is not explicitly defined.
This is what the spec requires.  Updated tests.
2016-09-26 12:21:27 +01:00
Behdad Esfahbod 8bcf517fe5 [MATH] Clean up get_italics_correction() 2016-09-26 12:13:14 +01:00
Frédéric Wang d7182d1296 MATH Table: Add API to access glyph info. 2016-09-26 11:32:25 +01:00
Frédéric Wang 319ff59161 MATH Table: Add API to access math contants. 2016-09-26 10:49:09 +01:00
Behdad Esfahbod 4d3892e9b0 [MATH] Fixups for previous commit 2016-09-26 10:45:58 +01:00