Commit Graph

438 Commits

Author SHA1 Message Date
Behdad Esfahbod 6173c2a6fc Fix flaky test
This test font had a upem of 769, which results in rounding-related errors with
the FreeType font funcs.  Change the upem to 1024 to fix that.

Fixes https://github.com/behdad/harfbuzz/issues/201
2015-12-25 18:18:23 +01:00
Behdad Esfahbod 3fcae6d82d [tests] Add --reference, for re-recording tests 2015-12-25 18:18:02 +01:00
Behdad Esfahbod 2f02fc79a5 Improve ligature-component handling
We use three bits for lig_id these days, so we finally got a report of
two separate ligatures with the same lig_id happening adjacent to each
other, and then the component-handling code was breaking things.
Protect against that by ignoring same-lig-id but lig-comp=0 glyphs after
a new ligature.

Fixes https://github.com/behdad/harfbuzz/issues/198
2015-12-17 15:21:14 +00:00
Behdad Esfahbod 2ab0de9fbd [use] Fix halant detection
Before, we were just checking the use_category().  This detects as
halant a ligature that had the halant as first glyph (as seen in
NotoSansBalinese.)  Change that to use the is_ligated() glyph prop
bit.  The font is forming this ligature in ccmp, which is before
the rphf / pref tests.  So we need to make sure the "ligated" bit
survives those tests.  Since those only check the "substituted" bit,
we now only clear that bit for them and "ligated" survives.

Fixes https://github.com/behdad/harfbuzz/issues/180
2015-12-17 11:59:15 +00:00
Behdad Esfahbod 1c6a057dd1 Add tests for previous commit 2015-11-26 18:48:30 -05:00
Behdad Esfahbod 9cc1ed4fa6 Do not allow recursiving to same position and same lookup
This is just to make it harder to be extremely slow.  There definitely
are ways still, just harder.  Oh well... how do we tame this problem
without solving halting problem?!

Fixes https://github.com/behdad/harfbuzz/issues/174
2015-11-19 12:39:09 -08:00
Behdad Esfahbod 7d75eee799 [fuzzing] Run fuzzing tests using hb-fuzzer as well 2015-11-19 12:15:05 -08:00
Behdad Esfahbod 85062e3b46 Add tests for previous two commits
To fully test what these are supposed to test, they should be run
against libharfbuzz-fuzzing.la instead of libharfbuzz.la, but for
now just record the files.
2015-11-18 23:09:13 -08:00
Behdad Esfahbod ec625f7dfb Try to fix gnome-continuous build fail 2015-11-18 16:37:59 -08:00
Behdad Esfahbod ff16ef3379 Enable building a bounded version of the library for fuzzing
test/fuzzing/hb-fuzzer links against libharfbuzz-fuzzing.so now.
2015-11-18 16:27:32 -08:00
Behdad Esfahbod 59821ab8b4 [arabic] Don't stretch over cased letters
Addresses
6e6f82b6f3 (commitcomment-14248516)
2015-11-06 16:27:44 -08:00
Behdad Esfahbod a6d7668a95 [fuzzing] Cap max buffer len at 128 2015-11-06 09:46:54 -08:00
Behdad Esfahbod 5a7eb5d4d8 [fuzzing] Add test case for OOM
From https://github.com/behdad/harfbuzz/issues/161
2015-11-06 00:01:24 -08:00
Behdad Esfahbod 4301703bdd Limit buffer max size growth
https://github.com/behdad/harfbuzz/issues/161
2015-11-05 23:44:59 -08:00
Behdad Esfahbod 19300183a6 [fuzzing] Add build system 2015-11-05 23:08:50 -08:00
Behdad Esfahbod 9c9ad214af [fuzzer] Add README
https://github.com/behdad/harfbuzz/issues/139#issuecomment-154202645
2015-11-05 22:50:52 -08:00
Behdad Esfahbod 6e6f82b6f3 Implement SYRIAC ABBREVIATION MARK with 'stch' feature
The feature is enabled for any character in the Arabic shaper.
We should experiment with using it for Arabic subtending marks.
Though, that has a directionality problem as well, since those
are used with digits...

Fixes https://github.com/behdad/harfbuzz/issues/141
2015-11-05 17:46:34 -08:00
Behdad Esfahbod da29b43794 Separate nil font-funcs from parent-peeking font-funcs
API change: all fonts created with hb_font_create() now inherit from
(ie have parent) hb_font_get_empty().
2015-11-04 20:22:44 -08:00
Behdad Esfahbod 04fd8517f8 Add tests for hyphen fallback
U+2011 is <noBreak> equivaent of U+2010, so we should do the fallback
for it.  Currently fails.
2015-11-04 17:39:26 -08:00
Behdad Esfahbod 550417117d [test] Drop hintings when subsetting fonts to record 2015-11-04 17:37:30 -08:00
Behdad Esfahbod 49ef630936 Adjust the width of various spaces if font does not cover them
See discussion here:
81ef4f407d

There's no way to disable this fallback, but I don't think it would
be needed.  Let's hope for the best!

Fixes https://github.com/behdad/harfbuzz/issues/153
2015-11-04 17:27:07 -08:00
Behdad Esfahbod 7793aad946 Normalize various spaces to space if font doesn't support
This resurrects the space fallback feature, after I disabled
the compatibility decomposition.  Now I can release HarfBuzz
again without breaking Pango!

It also remembers which space character it was, such that later
on we can approximate the width of this particular space
character.  That part is not implemented yet.

We normalize all GC=Zs chars except for U+1680 OGHA SPACE MARK,
which is better left alone.
2015-11-04 15:51:41 -08:00
Behdad Esfahbod 8b3c7f9ede [test] Support recording multiple lines of text in record-test.sh 2015-11-04 15:48:51 -08:00
Behdad Esfahbod 2f0dfd43cd Fix test expectation 2015-11-03 12:28:34 -08:00
Behdad Esfahbod df698f3299 [ot-font] Fix hmtx table length checking, *again*
Exactly the same problem that I fixed in
63ef0b41dc

I rewrote the table checking yesterday in
67f8821fb2
and introduced the exact same issue again. :(
Good thing we have ongoing fuzzing going now.  Was discovered
immediately by libFuzzer.  Thanks kcc!

https://github.com/behdad/harfbuzz/issues/139#issuecomment-153449473
Fixes https://github.com/behdad/harfbuzz/issues/156
2015-11-03 12:15:12 -08:00
Behdad Esfahbod 67f8821fb2 [ot] Make bad-hmtx handling match FreeType
Also route fuzzing-related tests through hb-ot-font, to reduce dependency
on FreeType behavior for badly-broken fonts.  Fixes failing test with
FreeType master.
2015-11-02 15:37:29 -08:00
Behdad Esfahbod 338ffec9e4 Add tests for a couple of fixed issues found by libFuzzer
From:
https://github.com/behdad/harfbuzz/issues/139#issuecomment-147616887
https://github.com/behdad/harfbuzz/issues/139#issuecomment-148289957
2015-10-15 12:56:19 -03:00
Behdad Esfahbod 55db94be2b Add test for previous commit 2015-10-13 00:33:59 -04:00
Behdad Esfahbod c1a5dc46c2 [fuzz] Add fuzzing script from kcc@
https://github.com/behdad/harfbuzz/issues/139
2015-10-12 17:39:52 -04:00
Behdad Esfahbod 98c6fccc00 Add test for ee9b0b6cb5 2015-10-11 21:41:04 -04:00
Behdad Esfahbod 34379b49e6 Add test for previous fix 2015-10-09 12:34:02 -04:00
Behdad Esfahbod 3e905e396b Add hb_font_set_parent()
No reason to not have it.  Makes life easier later.
We (hb-ft, hb-ot-font, etc) can use this API to inject new
parent into a font...
2015-10-08 12:51:02 -04:00
Behdad Esfahbod 88da7bba9f Default font scale to face upem
Makes for a better default and avoids nasty inheritance issues.
See mailing list thread "Default hb_font_t scale".
2015-10-02 14:38:20 +01:00
Behdad Esfahbod 1866e17114 Make hb_font_create_sub_font() NOT make parent immutable
We don't rely on that.  However, whenever hb_font_make_immutable()
is called, it makes its parenting chain immutable.
2015-10-02 14:21:29 +01:00
Sascha Brawer f2ad935e19 Handle language tags that indicate phonetic IPA transcription
The BCP-47 registry defines a variant subtag "fonipa" that can be used
in combination with arbitrary other language tags. For example,
"rm-CH-fonipa-sursilv" indicates the Sursilvan dialect of Romansh
as used in Switzerland, transcribed used the International Phonetic
Alphabet.

http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
2015-09-29 14:32:06 +01:00
Behdad Esfahbod b6d7d161a8 [tests] Add Hebrew test for normalization under cluster-level=1
Currently fails.
https://bugzilla.gnome.org/show_bug.cgi?id=541608
2015-09-01 16:12:44 +01:00
Behdad Esfahbod fad2674874 Minor 2015-09-01 14:45:46 +01:00
Behdad Esfahbod 31594b98af [test] Fix test-object
See previous commit.
2015-08-30 17:33:04 +01:00
Behdad Esfahbod 7368da6724 [test] Add test for cursive-positioning with mixed directions
Fails now.  Fix coming.  See thread "Issue with cursive attachment"
started by Khaled.  Test fonts were made by modifying test font
from Khaled to add more anchors.
2015-08-25 20:29:36 +01:00
Behdad Esfahbod f3792342f6 [tests] Add test for fallback positioning with cluster_level > 0
For https://github.com/behdad/harfbuzz/pull/123
Currently fails.  Fix coming.
2015-08-08 18:03:16 +02:00
Romain Naour 160f635523 fix static linking with icu-uc
When linking test-unicode statically it needs $(ICU_LIBS)
which contains all required flags.
Especially -lstdc++.

Fixes:
http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef521ca/

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
2015-07-31 16:12:26 +02:00
Behdad Esfahbod df6cb84449 Merge branch 'use' 2015-07-26 19:40:55 +02:00
Behdad Esfahbod 786ba45847 [test] Encode Kharoshti text
Ouch!
2015-07-23 13:04:34 +01:00
Behdad Esfahbod b423125503 [test] Add Batak and Buginese test texts 2015-07-23 13:01:55 +01:00
Behdad Esfahbod b8c159ffcc [test] Remove shaper-sea texts under shaper-use 2015-07-23 13:00:44 +01:00
Behdad Esfahbod 67ba7320cc [test] Remove New Tai Lue texts
New Tai Lue changed encoding to visual, boring, model.
2015-07-23 12:58:21 +01:00
Behdad Esfahbod c81d957a26 [test] Add tests for improved 'vert' feature 2015-07-23 12:50:48 +01:00
Behdad Esfahbod 8a6a16dbcb [test] Add recently added test
Ouch.
2015-07-23 12:49:09 +01:00
Behdad Esfahbod 895fb31c7f [test] Support additional options to hb-shape in micro-test suite 2015-07-23 12:14:03 +01:00
Behdad Esfahbod 582069172c Add test case for deleting default ignorables with positioning 2015-07-22 18:44:59 +01:00