Commit Graph

3483 Commits

Author SHA1 Message Date
Behdad Esfahbod 1a31f9f820 [otlayout] Minor 2013-10-16 13:42:18 +02:00
Behdad Esfahbod 28d5daec94 [indic] More granular post-base cluster merging! 2013-10-16 12:32:12 +02:00
Behdad Esfahbod 9cb59d460e [indic] Fix cluster merging of left matras
The merge_clusters there was totally broken.
2013-10-16 11:34:07 +02:00
Behdad Esfahbod 190c8f2b60 [indic] Adjust cluster merging under uniscribe mode for Tamil
Apparently Uniscribe Tamil shaper doesn't ship chubby clusters
for Tamil.  Adjust to that.
2013-10-16 11:33:18 +02:00
Behdad Esfahbod 5c558877da [indic] Allow up to two syllable modifiers
Bug 70509 - Candrabindu+Visarga doesn't work in Devanagari
https://bugs.freedesktop.org/show_bug.cgi?id=70509

We categorize both bindus and visarga as syllable-modifiers.
OT spec doesn't actually say what characters go in the syllable
modifier category, and allows one.  We just allow up to two now.

Test case: U+0930,U+0941,U+0901,U+0903

Uniscribe currently doesn't support that and produces a
dotted circle.
2013-10-16 11:18:09 +02:00
Behdad Esfahbod f5299eff5c [indic] Simplify reph logic
*Shouldn't* break anything.
2013-10-15 18:21:32 +02:00
Behdad Esfahbod 65a929b1c0 [indic] If Malayalam dot-reph formed a ligature, don't move it
Rachana-0.6 implements dot-reph by ligation, so we shouldn't move it.
Uniscribe doesn't either.  Test case:

  U+0D4E,U+0D1A,U+0D4D,U+0D1A,U+0D4D
2013-10-15 18:21:32 +02:00
Behdad Esfahbod a01cbf6cbe [indic] Harmless reordering of Khmer features! 2013-10-15 18:21:32 +02:00
Behdad Esfahbod c46f406973 [tests] Remove Myanmar micro-font and test 2013-10-15 18:21:32 +02:00
Behdad Esfahbod eb10233b26 [indic] Apply 'kern' for all scripts except for Khmer in Uniscribe mode
Seems to better match Uniscribe.

Note: NotoSansTelugu-Regular has kern feature, so this fixes most of the
positioning failures there, except for the kern pairs blocked by a
(non-)joiner, in which case we (correctly) kern, but Uniscribe doesn't.
2013-10-15 18:21:32 +02:00
Behdad Esfahbod 30145272a7 [indic] Don't apply presentation features across syllables
More like Uniscribe...  We still allow user-defined features to
work across syllables, but not pres,blws,abs,psts,etc.

This "regressed" Sinhala numbers by 11.  These are cases were
there's Consonant followed by Ra,Halant,ZWJ at the of text.
The Ra,Halant,ZWJ ends up forming reph, which is wrong...
But before we were also ligating that reph with the previous
consonant.  That's even more wrong.  That's also what Uniscribe
does.

Current numbers:

BENGALI: 353732 out of 354188 tests passed. 456 failed (0.128745%)
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: 951030 out of 951913 tests passed. 883 failed (0.0927606%)
KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%)
MALAYALAM: 1048140 out of 1048334 tests passed. 194 failed (0.0185056%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271655 out of 271847 tests passed. 192 failed (0.070628%)
TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
2013-10-15 18:20:59 +02:00
Behdad Esfahbod 3c7b3641cf [indic] Handle Avagraha
It can come either at the end(ish!) of the syllable, or independently.
When independent, it accepts a few bits and pieces.
2013-10-15 13:14:31 +02:00
Behdad Esfahbod 5e7432b817 [myanmar] Apply abvm/blwm 2013-10-15 12:33:18 +02:00
Behdad Esfahbod 8acbb6be27 [indic] Some scripts like blwf applied to pre-base characters
...while some don't!

Improved Bengali, Devanagari, Gurmukhi, Malayalam.

Updated numbers:

BENGALI: 353732 out of 354188 tests passed. 456 failed (0.128745%)
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: 951030 out of 951913 tests passed. 883 failed (0.0927606%)
KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%)
MALAYALAM: 1048134 out of 1048334 tests passed. 200 failed (0.0190779%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271666 out of 271847 tests passed. 181 failed (0.0665816%)
TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
2013-10-15 12:29:07 +02:00
Behdad Esfahbod 2c85a3df09 Fix issue with automake 2013-10-14 19:41:52 +02:00
Behdad Esfahbod 6b65a76b40 [otlayout] Fix (Chain)Context recursion!
Previously we only supported recursive sublookups with
ascending indices.  We were also not correctly handling
non-1-to-1 recursed lookups.

Fix all that!

Fixes the three tests in test/shaping/tests/context-matching.tests,
which were derived from NotoSansBengali and NotoSansDevanagari
among others.
2013-10-14 18:54:51 +02:00
Behdad Esfahbod 841e20d083 Add test suite for shaping results
The new test suite runs tests included under
hb/test/shaping/tests/*.tests, which themselves reference
font files stored by sha1sum under hb/test/shaping/fonts/sha1sum.
The fonts are produced using a subsetter to only include glyphs
needed to run the test.

Four initial tests are added for (Chain)Context matching,
of which three currently fail.
2013-10-14 18:54:51 +02:00
Behdad Esfahbod e2dab69291 Minor 2013-10-14 16:44:44 +02:00
Behdad Esfahbod 4e6e53db5d [otlayout] "Minor" 2013-10-14 13:06:36 +02:00
Behdad Esfahbod 9326d48e43 Don't use g_mapped_file_unref()
Was introduced in glib 2.22.
2013-10-10 20:04:42 +02:00
Behdad Esfahbod e152d1a278 0.9.22 2013-10-03 15:09:37 -04:00
Behdad Esfahbod 27674b4bb3 [OTLayout] Protect against out-of-range lookup indices
Filter them out when compiling map.
2013-10-03 14:54:50 -04:00
Behdad Esfahbod 6b4fdded94 Update git.mk 2013-09-30 14:02:43 -04:00
M1cha 2a2b5b89ef Cleanup Android.mk
- use common src files for both static and shared libs
- remove empty LOCAL_SHARED_LIBRARIES
2013-09-30 12:33:31 -04:00
Behdad Esfahbod 622bc3d829 Merge pull request #4 from amarullz/master
Add build static library on Android.mk
2013-09-29 13:31:58 -07:00
Behdad Esfahbod 3d2c4f0c2f Fix hiding of default_ignorables if font doesn't have space glyph
Based on patch from Jonathan Kew.  See discussion on the list.
2013-09-27 17:06:29 -04:00
Ahmad Amarullah d583df1e78 Add build static library on Android.mk
Use UCDN instead ICU
HAVE Freetype
2013-09-27 19:04:32 +07:00
Behdad Esfahbod 078de49ca1 [util] Don't use g_array_unref()
Was introduced in glib 2.22.
2013-09-26 18:26:43 -04:00
Behdad Esfahbod 48360ec03b Bug 68990 - test-common fails on i686-linux
Fix use-after-end-of-scope.
2013-09-26 16:48:42 -04:00
Behdad Esfahbod b61f97d544 0.9.21 2013-09-16 22:07:22 -04:00
Behdad Esfahbod 2af8262963 Improve library checks 2013-09-16 22:03:59 -04:00
Behdad Esfahbod 882edce48e [graphite2] Fix include 2013-09-13 20:36:43 -04:00
Behdad Esfahbod ace5c7eb4c [introspection] hb-ft annotations 2013-09-13 20:35:19 -04:00
Behdad Esfahbod a8949df487 [introspection] Annotate Unicode / font callbacks
Should move these out of the public header...

We're "clean" of introspection warnings now.  Remaining ones are about
graphite2 / freetype types not being introspectable.
2013-09-13 20:31:07 -04:00
Behdad Esfahbod 4b011094d5 Move code around
I believe I didn't break anything...
2013-09-13 20:17:42 -04:00
Behdad Esfahbod 4878db2182 Remove contrib/ Python hand-coded binding stuff
gobject-introspection coming together.
2013-09-12 20:56:32 -04:00
Behdad Esfahbod e478ebe4d3 [introspection] Add sample.py 2013-09-12 20:53:07 -04:00
Behdad Esfahbod dfdbe7f932 [introspection] Make hb_blob_create() introspectable 2013-09-12 20:52:20 -04:00
Behdad Esfahbod 085d4291a9 [introspection] Disable constructors for now
Since our types are not associated with their methods, marking
constructors makes them inaccessible from bindings.  Undo for now.
2013-09-12 17:14:33 -04:00
Behdad Esfahbod 6c48f20eea [otlayout] Add structs for JSTF table 2013-09-09 15:43:10 -04:00
Behdad Esfahbod 70303cf23b [docs/introspection] Some more annotations 2013-09-06 17:38:25 -04:00
Behdad Esfahbod 288f289997 [docs/introspection] More annotations 2013-09-06 17:30:54 -04:00
Behdad Esfahbod 17905c54f1 [introspection] Work around g-i limitation with hb_language_t 2013-09-06 17:16:25 -04:00
Behdad Esfahbod cd361c3cbe Minor change to hb_language_t
Let me know if this breaks anyone's anything.
2013-09-06 17:16:25 -04:00
Behdad Esfahbod 20cbc1f8eb Annotate hb-set a bit; add HB_SET_VALUE_INVALID 2013-09-06 15:31:22 -04:00
Behdad Esfahbod c44b81833d Whitespace 2013-09-06 15:13:16 -04:00
Behdad Esfahbod ae9dc717d3 [gtk-doc] Pass source files to gtk-doc 2013-09-05 16:40:37 -04:00
Behdad Esfahbod 5f512017ba [docs] Document a few symbols 2013-09-05 16:40:32 -04:00
Behdad Esfahbod e0dbf99b44 [introspection] Pass source files to scanner 2013-09-05 16:18:45 -04:00
Behdad Esfahbod 5a5350b39b Revert "Round when scaling values"
This reverts commit 10f964623f.

See discussion with Khaled Hosny on mailing list.  In short, since
integers here can be negative, and int division is "round towards
zero", proper rounding should take sign into account.  Just skip
doing it again, has been serving us well before.
2013-09-03 20:11:01 -04:00