Commit Graph

65 Commits

Author SHA1 Message Date
Behdad Esfahbod 25f52f58c2 [myanmar] Remove myanmar_old shaper
Over time it has become the same as default shaper.  So, remove.
2018-11-22 14:41:01 -05:00
Behdad Esfahbod 17335a8161 Clean up buffer->swap_buffers() calls
That function checks for buffer->successful already.  No need
to check at call site.
2018-11-04 02:25:07 -05:00
Behdad Esfahbod 39bd07aed5 Fix bunch of unused parameter warnings
Show up with gcc -O0.

There's a few more but those are functions that need to be filled in.

Maybe this is a lost battle...
2018-10-26 21:22:26 -07:00
Behdad Esfahbod 982c2f4a65 [indic/khmer/myanmar/use] Clarify clear_syllable
No logic change.
2018-10-26 15:40:45 -07:00
Behdad Esfahbod bdb53ca24a [myanmar] Implement Zawgyi shaper
Enabled if script tag 'Qaag' is passed to HarfBuzz.  Disables mark
advance-zeroing and fallback mark-positioning.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1162
2018-10-11 20:20:29 -04:00
Behdad Esfahbod 00c5c4a79d [myanmar] Shuffle 2018-10-11 20:15:31 -04:00
Behdad Esfahbod 0a371fee4d Minor 2018-10-02 14:48:39 +02:00
Behdad Esfahbod 48c513fec9 Minor 2018-10-02 14:19:34 +02:00
Behdad Esfahbod f048ead84a Some more 2018-09-24 18:04:17 -04:00
Behdad Esfahbod 1676f608c8 Minor refactoring 2018-09-24 18:04:17 -04:00
Behdad Esfahbod 3583fb03b1 Simplify ZWJ-skipping a bit
Towards disabling ZWJ-skipping in certain GPOS contexts.

Part of https://github.com/flutter/flutter/issues/16886
2018-09-23 22:33:38 -04:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Behdad Esfahbod 7185b273b3 Rename in_error to !successful
Towards possibly using Null pool for some nil objects.
2018-05-31 20:03:34 -07:00
Ebrahim Byagowi f24b0b9728 Update the links and revive the dead ones 2018-04-12 13:44:32 +04:30
Behdad Esfahbod effddd03bd [myanmar] Add dump-myanmar-data 2018-02-13 21:38:15 -08:00
Behdad Esfahbod d830d3d244 [indic] Share some copy/pasta code 2018-02-13 19:01:03 -08:00
David Corbett ccb0367dae Let VS1 follow U+1031 MYANMAR VOWEL SIGN E 2018-02-02 12:41:07 -08:00
Behdad Esfahbod 7036f1d22c [ot] Remove shaper name
In ten years we never used them...
2017-10-27 14:42:59 -06:00
Behdad Esfahbod 7c561dacc3 [myanmar] Fix unsafe usage of FLAG_SAFE()
The commit f559c63307 caused
"undefined-shift" errors in Myanmar shaper as we changed the
numeric value of type D from 19 to 32 there, making the
"FLAG_SAFE (info.myanmar_category())" wrong.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3546
2017-10-19 11:35:51 -07:00
Behdad Esfahbod dbdbfe3d7b Use nullptr instead of NULL 2017-10-15 12:11:08 +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
Behdad Esfahbod f559c63307 [indic] Implement Consonent_With_Stacker
Fixes https://github.com/behdad/harfbuzz/issues/528
2017-10-03 15:20:07 +02:00
Behdad Esfahbod 9e005c5d86 [unsafe-to-break] Mark Indic-like clusters as unsafe-to-break 2017-08-10 20:10:53 -07:00
Ebrahim Byagowi 3b0e47ca00 Fix arm-none-eabi build (fixes #451) (#496) 2017-06-19 14:47:09 +04:30
Behdad Esfahbod e2b878055b Disable OTL processing for Hebrew if GPOS doesn't have Hebrew subtable
New approach to fix this:
69f9fbc420

Previous approach was reverted as it was too broad.  See context:
https://github.com/behdad/harfbuzz/issues/347#issuecomment-267838368

With U+05E9,U+05B8,U+05C1,U+05DC and Arial Unicode, we now (correctly) disable
GDEF and GPOS, so we get results very close to Uniscribe, but slightly different
since our fallback position logic is not exactly the same:

Before:		[gid1166=3+991|gid1142=0+737|gid5798=0+1434]
After:		[gid1166=3+991|gid1142=0@402,-26+0|gid5798=0+1434]
Uniscribe:	[gid1166=3+991|gid1142=0@348,0+0|gid5798=0+1434]
2016-12-22 14:43:23 -06:00
Behdad Esfahbod a2b03de5b3 [myanmar] Handle U+AA74..U+AA76
Fixes https://github.com/behdad/harfbuzz/issues/218
2016-05-06 17:56:07 +01:00
Behdad Esfahbod 8b5bc141cd Add get_nominal_glyph() and get_variation_glyph() instead of get_glyph()
New API:
- hb_font_get_nominal_glyph_func_t
- hb_font_get_variation_glyph_func_t
- hb_font_funcs_set_nominal_glyph_func()
- hb_font_funcs_set_variation_glyph_func()
- hb_font_get_nominal_glyph()
- hb_font_get_variation_glyph()

Deprecated API:
- hb_font_get_glyph_func_t
- hb_font_funcs_set_glyph_func()

Clients that implement their own font-funcs are encouraged to replace
their get_glyph() implementation with a get_nominal_glyph() and
get_variation_glyph() pair.  The variation version can assume that
variation_selector argument is not zero.
2016-02-24 19:05:23 +09:00
Behdad Esfahbod b894a85ad1 Fix more hangs in case of buffer allocation errors
Hopefully
fixes https://github.com/behdad/harfbuzz/issues/214
2016-02-02 16:39:19 +08:00
Behdad Esfahbod 2813e3049a [indic] Update data tables to Unicode 8.0
Test stats remain unchanged, except for Malayalam, which we investigate:

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: 1047584 out of 1048334 tests passed. 750 failed (0.0715421%)
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%)

Myanmar, compared to Windows 10 mmrtext.ttf:

MYANMAR: 1123865 out of 1123883 tests passed. 18 failed (0.00160159%)
2015-12-18 11:05:11 +00:00
Behdad Esfahbod 136863371c Add new shaper method postprocess_glyphs()
Unused currently.  To be used for Syriac stretch implementation.

https://github.com/behdad/harfbuzz/issues/141
2015-11-05 13:24:15 -08:00
Behdad Esfahbod 6f932bc8f9 Fix a few more -Wshadow-local warnings
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
2015-10-21 11:16:49 -02:00
Behdad Esfahbod c403d63200 [myanmar] Use buffer->sort() to sort cluster
This can possibly produce more granular clusters.
2015-09-01 16:15:25 +01:00
Behdad Esfahbod 85846b3de7 Use insertion-sort instead of bubble-sort
Needed for upcoming merge-clusters fix.
2015-09-01 15:07:52 +01:00
Behdad Esfahbod 56f71ff988 Use foreach_syllable in Myanmar shaper 2015-07-22 11:58:11 +01:00
Behdad Esfahbod f8160a4959 Add FLAG_SAFE() for values known to be small-enough
And add check to FLAG()
2015-07-21 15:50:02 +01:00
Behdad Esfahbod 6f2d9ba52a Add old-Myanmar shaper
Looks like Unsicribe responds to the 'mymr' tag by zeroing marks
GDEF_LATE instead of generic-shaper UNICODE_LATE.  Implement that.

Fixes
Bug 81775 - Incorrect Rendering with harfbuzz-ng myanmar unicode
https://bugs.freedesktop.org/show_bug.cgi?id=81775

Micro-test added based on Padauk.
2014-07-26 19:18:59 -04:00
Behdad Esfahbod 7cd33f2304 Micro optimization 2014-07-17 14:39:07 -04:00
Behdad Esfahbod 7627100f42 Mark unsigned integer literals with the u suffix
Simplifies hb_in_range() calls as the type can be inferred.
The rest is obsessiveness, I admit.
2014-07-11 16:22:13 -04:00
Behdad Esfahbod d743ce78e1 [indic-table] Update to Unicode 7.0 data
Touch code just enough to preserve previous syllable structure
and functionality as closely as possible.  Many further cleanups
coming later.
2014-06-30 15:24:45 -04:00
Behdad Esfahbod cf78dd483c [indic/myanmar] Rename OT_NBSP to OT_PLACEHOLDER 2014-05-27 17:53:37 -04:00
Behdad Esfahbod 186ece94c8 [myanmar] Use OT_NBSP instead of OT_DOTTEDCIRCLE for OT_GB
No functional change.
2014-05-27 17:49:45 -04:00
Behdad Esfahbod cf71d28c38 [indic/myanmar] Refactor a few macros 2014-05-27 17:47:43 -04:00
Behdad Esfahbod 3d6ca0d32e [ot] Simplify normalization_preference again
No shaper has more than one behavior re this, so no need for a callback.
2013-12-31 16:35:37 +08:00
Behdad Esfahbod 9174a9db5c [myanmar] Allow punctuation clusters
The spec and Uniscribe don't allow these, but UTN#11
specifically says the sequence U+104B,U+1038 is valid.
As such, allow all "P V" sequences.  There's about
eight sequences that match that structure, but Roozbeh
thinks it's fine to allow all of them.

Test case: U+104B, U+1038

https://bugs.freedesktop.org/show_bug.cgi?id=71947
2013-11-25 18:10:38 -05:00
Behdad Esfahbod 096b71e8ef [myanmar] Mark U+104E MYANMAR SYMBOL AFOREMENTIONED as Consonant
The spec and Uniscribe treat it as consonant in the grammar, but
it's not in IndicSyllableCategory.txt, so fix up.

Test sequence: U+1004,U+103A,U+1039,U+104E

https://bugs.freedesktop.org/show_bug.cgi?id=71948
2013-11-25 18:03:34 -05:00
Behdad Esfahbod 71b4c999a5 Revert "Zero marks by GDEF for Tibetan"
This reverts commit d5bd0590ae.

The reasoning behind that logic was flawed and made under
a misunderstanding of the original problem, and caused
regressions as reported by Jonathan Kew in thread titled
"tibetan marks" in Oct 2013.  Apparently I have had fixed
the original problem with this commit:

  7e08f1258d

So, revert the faulty commit and everything seems to be in good
shape.
2013-10-28 00:43:27 +01:00
Behdad Esfahbod d5bd0590ae Zero marks by GDEF for Tibetan
See:
http://lists.freedesktop.org/archives/harfbuzz/2013-April/003101.html
2013-10-18 18:17:29 +02:00
Behdad Esfahbod a1f7b28561 [otlayout] Switch over from old is_a_ligature() to IS_LIGATED
Impact should be minimal and positive.
2013-10-18 11:25:24 +02:00
Behdad Esfahbod 3ddf892b53 [otlayout] Renaming 2013-10-18 11:21:15 +02:00
Behdad Esfahbod 5e7432b817 [myanmar] Apply abvm/blwm 2013-10-15 12:33:18 +02:00