Commit Graph

310 Commits

Author SHA1 Message Date
David Corbett 729c9e1335 Include all relevant glyphs in the subsetted font 2017-10-26 13:49:56 -05:00
Khaled Hosny 9d4d2fb9af [ot-font] Implement hb_ot_get_glyph_name
Turns out we already have support for “post” table, it just needed to be
activated and put in use.
2017-10-25 19:29:51 -04:00
David Corbett fd786c768f Use `mktemp -d` instead of `mktemp --directory` 2017-10-25 16:53:37 -04:00
David Corbett c4944920c0 Fix and run indic-script-extensions.tests 2017-10-25 16:53:16 -04:00
David Corbett d8df714251 Fix code point iteration in narrow Python 2017-10-25 16:53:16 -04:00
Behdad Esfahbod 81e2b9b8a9 Never skip over CGJ
We might want to tweak this some more.  For now, never skipping over
it is better behavior than always skipping.

Part of https://github.com/behdad/harfbuzz/issues/554
2017-10-15 10:49:06 +02:00
Behdad Esfahbod fa48ccbe12 [indic] Special-case Kannada Ra,H,ZWJ sequence
Fixes https://github.com/behdad/harfbuzz/issues/435
2017-10-12 14:07:37 +02:00
Behdad Esfahbod ab8d70ec70 [arabic] Implement Unicode Arabic Mark Ordering Algorithm UTR#53
Fixes https://github.com/behdad/harfbuzz/issues/509
2017-10-04 14:47:10 +02:00
David Corbett 3ca9c92aa6 Test Consonant_With_Stacker in Kannada (#530) 2017-10-03 14:07:02 +02:00
Behdad Esfahbod 5d98de1f38 Tweak mark-base attachment
Apparently a base glyph can also become an attached component of a
ligature if the ligature-forming lookup used IgnoreBase.  This was
being confused with a non-first component of a MultipleSubst and
hence not matched for mark-attachment.  Tweak test to fix.

Fixes https://github.com/behdad/harfbuzz/issues/543
2017-10-03 13:49:40 +02:00
Behdad Esfahbod 09cbeb2246 Make bots happy
Fixes https://github.com/behdad/harfbuzz/issues/551
2017-10-03 13:22:07 +02:00
Behdad Esfahbod 1633513996 Add test for U+0A51
New Indic numbers are:

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: 60729 out of 60747 tests passed. 18 failed (0.0296311%)
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 71c0a1429d GURMUKHI used to be at 15,
because Uniscribe seems to allow this character standalone, but that looks
wrong.
2017-10-02 20:28:56 +02:00
Behdad Esfahbod 8b2c94c43f Tweak ligature component matching for ligature formation
If two marks want to ligate and they belong to different components of the
same ligature glyph, and said ligature glyph is to be ignored according to
mark-filtering rules, then allow.

Example Burmese senquence:

  U+1004,U+103A,U+1039,U+101B,U+103D,U+102D

Test font provided by Norbert Lindenberg.

Fixes https://github.com/behdad/harfbuzz/issues/545
2017-10-02 20:03:35 +02:00
Behdad Esfahbod 71c0a1429d [indic] Fix shaping of U+0A51
Mark it as matra below to allow the sequence U+0A15, U+0A51, U+0A47.
Oh well...

Fixes https://github.com/behdad/harfbuzz/issues/524
2017-10-02 18:57:03 +02:00
Behdad Esfahbod cc79b666bc [indic] Add test for 1a0a356a0f
https://github.com/behdad/harfbuzz/issues/538
2017-10-02 09:19:15 -04:00
Behdad Esfahbod 61a9d7e6d0 Minor 2017-09-04 19:48:52 -07:00
Behdad Esfahbod 03a5a6f873 [util] Add --unicodes to hb-view / hb-shape
Fixes https://github.com/behdad/harfbuzz/issues/154
2017-09-01 19:12:22 -07:00
Behdad Esfahbod 0e5b475d98 Minor 2017-09-01 18:28:47 -07:00
Behdad Esfahbod 3e1fc6d18b Minor 2017-09-01 10:46:48 -07:00
Behdad Esfahbod 04f009f848 Add test accidentally removed in previous commit 2017-09-01 10:38:25 -07:00
Behdad Esfahbod 06cb162cd7 [indic] Treat Consonant_With_Stacker as consonant
Fixes https://github.com/behdad/harfbuzz/issues/528
"Kannada JIHVAMULIYA and UPADHMANIYA insert dotted circles"
2017-09-01 10:34:56 -07:00
Behdad Esfahbod 099472e08b hb_buffer_diff() tweak
I like to have a mode where CONTAINS_NOTDEF and CONTAINS_DOTTEDCIRCLE are not
returned.  Abused a value of -1 for that.  hb-shape now uses it.  Fixes two
of the six tests failing with --verify in test/shaping/run-tests.sh.
2017-08-30 16:45:06 -07:00
Behdad Esfahbod 4387b059a0 [test] Add --verify to hb-shape
Disabled for now.  Will enable and fix failures after next release.
2017-08-23 14:35:58 -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
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
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
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 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
Behdad Esfahbod 91f2585411 Actually add test 2016-08-08 18:08:08 -07:00
Behdad Esfahbod f1b76275da Add tests for Chinese language tags
Using font from https://github.com/behdad/harfbuzz/issues/300
2016-08-08 18:06:09 -07:00
Khaled Hosny 988350586f [tests] Workaround Python 2 “narrow” builds
The so-called Python 2 “narrow” builds support UCS2 only, this is a
workaround to allow unichr to work with any Unicode character in such
builds. This fixes Travis-CI failure as it has narrow Python 2 builds.

Copied from:
https://github.com/behdad/fonttools/blob/master/Lib/fontTools/misc/py23.py
2016-06-18 23:01:58 +02:00
Behdad Esfahbod 6c0aa9e92b Fix build on droid.io 2016-05-06 17:50:53 +01:00