Commit Graph

2794 Commits

Author SHA1 Message Date
Behdad Esfahbod a7e8bbb080 Minor fraction mask setting improvement 2013-12-22 19:33:35 -05:00
Behdad Esfahbod 76fff252a9 Don't form fractions if only one of numr/dnom exist 2013-12-22 17:55:59 -05:00
Behdad Esfahbod 3aeee519f0 Bug 72698 - Automatically support frac / numr / dnom
When seeing U+2044 FRACTION SLASH in the text, find decimal
digits (Unicode General Category Decimal_Number) around it,
and mark the pre-slash digits with 'numr' feature, the post-slash
digits with 'dnom' feature, and the whole sequence with 'frac'
feature.

This beautifully renders fractions with major Windows fonts,
and any other font that implements those features (numr/dnom is
enough for most fonts.)

Not the fastest way to do this, but good enough for a start.
2013-12-22 16:17:54 -05:00
Behdad Esfahbod 014f369ec9 Add XXX note 2013-12-22 16:15:30 -05:00
Behdad Esfahbod 739325178a Initialize masks before mirroring
We were throwing away the rtlm feature mask set during
mirroring...
2013-12-21 00:18:18 -05:00
Behdad Esfahbod 2a8c49ade0 Remove unnecessary includes 2013-12-11 20:24:20 -05:00
Behdad Esfahbod 205bf834d8 Revert "Karen" language mapping back to what it was before
https://bugzilla.mozilla.org/show_bug.cgi?id=941470
2013-12-02 20:41:41 -05:00
Behdad Esfahbod f47b921954 Fix unsafe shape_plan->face dependency 2013-12-02 05:57:27 -05:00
Jonathan Kew ca8d96c8ba cache shape plans even if (global) user features are set 2013-12-02 05:22:00 -05:00
Behdad Esfahbod 8ffa528f28 Add note about unsafe shape_plan->face
Will fix by removing shape_plan->face completely.
2013-12-02 05:17:14 -05:00
Behdad Esfahbod aec468f01e [coretext] Add TODO 2013-11-29 19:21:58 -05:00
Behdad Esfahbod 58cc233e8b [coretext] Cleanup 2013-11-29 19:17:42 -05:00
Khaled Hosny c8213c6198 [coretext] Avoid font fallback with CoreText shaper
CoreText does automatic font fallback (AKA "cascading") for  characters
not supported by the requested font, and provides no way to turn it off,
so detect if the returned run uses a font other than the requested one
and fill in the buffer with .notdef glyphs instead of random indices
glyph from a different font.
2013-11-29 19:01:56 -05:00
Behdad Esfahbod 63bae73aef [fallback] Add TODO note 2013-11-26 22:57:24 -05:00
Behdad Esfahbod e1ebf01d0c Minor 2013-11-26 18:00:35 -05:00
Behdad Esfahbod a182dbc9e4 Minor 2013-11-26 17:53:41 -05: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 d2da5e0b4b [myanmar] Relax pwo-tone group a bit
This is broken sequence according to OpenType spec, Uniscribe,
and current HarfBuzz implementation.  But Roozbeh says this
is a valid sequence, so allow it.  There are multiple
"(DB As?)?" constructs in the grammar, but Roozbeh thinks only
this one needs changing.

Test case: 1014,1063,103A

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=71949
2013-11-25 17:50:07 -05:00
Roozbeh Pournader 08c2d27d35 Added support for several new languages
Based on research into latest SIL and Windows fonts, pulling in
the latest OpenType language tag proposal from Microsoft, and updating
to latest language tags and names from ISO 639.
2013-11-25 06:36:20 -05:00
Roozbeh Pournader 05511acd19 Added language tags for S'gaw Karen and Khamti
Tags based on support in Windows 8.1's 'Myanmar Text' font.
2013-11-25 06:36:13 -05:00
Behdad Esfahbod 0bb31e4497 Bug 71845 - Use 64-bit cmpexch on ARM64 iOS 2013-11-20 14:21:07 -05:00
Behdad Esfahbod 02c6c8cd6e Set buffer content type to INVALID in hb_buffer_set_length(0)
Previously we were only setting this in hb_buffer_clear_contents(),
but set_length(0) is a valid way to reinitialize buffer to use with
new text.
2013-11-15 13:07:03 -05:00
Behdad Esfahbod 061cb46493 Use long alignment for scratch buffer
Fixes last of scratch alignment warnings in hb-coretext.
2013-11-13 14:50:25 -05:00
Behdad Esfahbod 68c372ed2e More scratch-buffer cleanup 2013-11-13 14:45:43 -05:00
Behdad Esfahbod 8fcadb9cf9 [coretext] More scratch buffer fixes 2013-11-13 14:33:57 -05:00
Behdad Esfahbod 16f175cb2e Fix scratch-buffer alignment warnings 2013-11-12 17:22:49 -05:00
Behdad Esfahbod 83408cf804 Fix llvm warnings on Mac
Patch from Scott Fleischman.  Warnings were:

harfbuzz/src/hb-font-private.hh:121:42: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-font-private.hh:126:42: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-font-private.hh:400:85: Implicit conversion loses
integer precision: 'long long' to 'hb_position_t' (aka 'int')
harfbuzz/src/hb-ot-layout-common-private.hh:1115:37: Implicit conversion
loses integer precision: 'long long' to 'int'
harfbuzz/src/hb-ft.cc:421:97: Implicit conversion loses integer
precision: 'unsigned long long' to 'int'
harfbuzz/src/hb-ft.cc:422:97: Implicit conversion loses integer
precision: 'unsigned long long' to 'int'
2013-11-06 14:46:04 -05:00
Behdad Esfahbod 333cc6e2d1 [otlayout] Remove unused is_inplace()
Patch from Jonathan Kew.
2013-10-30 17:30:11 +00:00
Behdad Esfahbod 176fd17d02 Bug 70971 - Signed/unsigned compiler warnings on windows
Patch from Emil Eklund.
2013-10-30 17:27:24 +00:00
Behdad Esfahbod 3d436d325e [otlayout] Reset ccc when marking glyph as letter 2013-10-28 21:00:37 +01:00
Behdad Esfahbod 6ffc007b61 [otlayout] Optimize inplace
See thread started by Jonathan with subject "an optimization for complex
fonts".
2013-10-28 19:26:02 +01: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 c2bc818706 Work with old and new glib
Avoids "deprecated" warnings.
2013-10-27 23:37:14 +01:00
Behdad Esfahbod 46a863d91d [indic] Adjust pref reordering logic
For Javanese (pref_len == 1) only reorder if it didn't ligate.  That's
sensible, and what the spec says.  For other Indic (pref_len > 1)
only reorder if ligated.

Doesn't change any test numbers.
2013-10-27 23:28:12 +01:00
Behdad Esfahbod 6b03e3c724 Optimize fallback kerning
Patch from Jonathan Kew.  "These changes seem to yield a small but
just-about-measurable improvement with old fonts that lack GPOS
kerning."
2013-10-27 21:04:55 +01:00
Behdad Esfahbod 133eeba6a3 Minor
See:
https://github.com/prezi/harfbuzz-js/pull/1/files#r7032397
2013-10-27 00:24:59 +02:00
Behdad Esfahbod a74f0de225 [indic] Fix CM2, really
Followup from 6e613f3365.
2013-10-24 11:46:33 +02:00
Behdad Esfahbod 6e613f3365 Fix "shift count >= width of type" issue 2013-10-23 23:34:13 +02:00
Behdad Esfahbod ac8cd51191 Refactor 2013-10-18 19:33:09 +02:00
Behdad Esfahbod 0f3fe37fcc Comment 2013-10-18 19:14:22 +02:00
Behdad Esfahbod ddce2d8df6 [indic] Improve positioning of post-base bells and whistles
Bug 58714 - Kannada u+0cb0 u+200d u+0ccd u+0c95 u+0cbe does not provide
same results as Windows8
https://bugs.freedesktop.org/show_bug.cgi?id=58714

Test with U+0CB0,U+200D,U+0CCD,U+0C95,U+0CBF and tunga.ttf.

Improves some scripts.  Improves Bengali too, but numbers
are up because we produce better results than Uniscribe for some
sequences now.

New numbers:
BENGALI: 353724 out of 354188 tests passed. 464 failed (0.131004%)
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: 1048140 out of 1048334 tests passed. 194 failed (0.0185056%)
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%)
2013-10-18 18:17:29 +02: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 bf029281b1 Bug 65258 - [...] Mongolian with free variation selector 2013-10-18 18:17:29 +02:00
Behdad Esfahbod 0193649ce4 [otfallback] Don't shift down above-marks too much
This seems to generate much better, almost-perfect, positioning for
Arabic as well as Latin above marks.
2013-10-18 18:17:29 +02:00
Behdad Esfahbod dba9580237 [otfallback] Never fallback-position a below-mark upwards
Test with WinXP times.ttf and U+05D9,U+05B5.
2013-10-18 18:17:29 +02:00
Behdad Esfahbod 8177da29ad Minor 2013-10-18 18:17:29 +02:00
Behdad Esfahbod c16012e901 [indic] Add Javanese support!
Seems to be working just fine!
2013-10-18 18:17:29 +02:00
Behdad Esfahbod 755b44cce6 [ft] Round metrics instead of truncate
Lohit-Punjabi has a upem of 769!  We were losing one unit in our
code, and FreeType is losing another one...  Test with U+0A06.
Has an advance of 854 in the font.  We were producing 852.
Now we do 853, which is what FreeType is telling us.
2013-10-18 12:03:01 +02:00
Behdad Esfahbod 9a49351cc2 [indic] Swith pref logic to use _hb_glyph_info_substituted()
See comments from caveat!  Seems to work fine.

This is useful for Javanese which has an atomically encoded pre-base
reordering Ra which should only be reordered if it was substituted
by the pref feature.
2013-10-18 11:25:24 +02:00
Behdad Esfahbod f175aa33c5 [indic] Fix compiler warnings 2013-10-18 11:25:24 +02:00
Behdad Esfahbod 8570273414 [otlayout] Add _hb_glyph_info_substituted()
Currently unused.
2013-10-18 11:25:24 +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 09675a8115 [otlayout] Add HB_OT_LAYOUT_GLYPH_PROPS_LIGATED
Currently unused.
2013-10-18 11:25:24 +02:00
Behdad Esfahbod 05ad6b50ac [otlayout] Add HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED
Currently unused.
2013-10-18 11:21:15 +02:00
Behdad Esfahbod 101303dbf7 [otlayout] More shuffling around 2013-10-18 11:21:15 +02:00
Behdad Esfahbod 91689de260 [otlayout] Add _hb_glyph_info_set_glyph_props()
No functional change.
2013-10-18 11:21:15 +02:00
Behdad Esfahbod a016174658 [otlayout] Simplify set_class() usage 2013-10-18 11:21:15 +02:00
Behdad Esfahbod 3ddf892b53 [otlayout] Renaming 2013-10-18 11:21:15 +02:00
Behdad Esfahbod 2e96d2c6ee [otlayout] More shuffling 2013-10-18 11:21:15 +02:00
Behdad Esfahbod 469524692b [otlayout] Code shuffling 2013-10-18 11:21:15 +02:00
Behdad Esfahbod 11fb16cb84 Use unsigned enums for mask types 2013-10-18 11:21:11 +02:00
Behdad Esfahbod 03058c3d1e [otlayout] Remove two unused HB_OT_LAYOUT_GLYPH_PROPS_* values 2013-10-17 20:55:34 +02:00
Behdad Esfahbod 941b699204 [otlayout] Remove unused HB_OT_LAYOUT_GLYPH_PROPS_UNCLASSIFIED 2013-10-17 20:47:33 +02:00
Behdad Esfahbod 8f9ec92dfc [indic] Adjust Javanese base algorithm 2013-10-17 19:52:47 +02:00
Behdad Esfahbod 49901862e3 [otlayout] Guard against use of ReverseChain through Context 2013-10-17 19:48:51 +02:00
Behdad Esfahbod 74f4bbf056 [indic] Towards supporting atomicly-encoded prebase-reorderings 2013-10-17 19:07:53 +02:00
Behdad Esfahbod efed40b975 [indic] Minor refactoring of reph handling 2013-10-17 18:50:11 +02:00
Behdad Esfahbod 684fe59ff8 [indic] Minor refactoring of would_substitute() 2013-10-17 18:30:06 +02:00
Behdad Esfahbod 321df83fb4 Route Buginese through the SEA shaper
Both Indic and SEA seem to do it just fine, but SEA is much
simpler.
2013-10-17 18:16:14 +02:00
Behdad Esfahbod b5a0f69e47 [indic] Pass zero-context=false to would_substitute for newer scripts
For scripts without an old/new spec distinction, use zero-context=false.
This changes behavior in Sinhala / Khmer, but doesn't seem to regress.
This will be useful and used in Javanese.
2013-10-17 18:04:23 +02:00
Behdad Esfahbod c4e71ff36d [indic] Clean up Khmer and Sinhala base finding algorithm 2013-10-17 17:04:47 +02:00
Behdad Esfahbod e10453e6fb [indic] Add BASE_POS_LAST_SINHALA
Previously we planted this into the mode used for Khmer.  There's not
really much in common between the two, so separate again.
2013-10-17 16:49:06 +02:00
Behdad Esfahbod 9ac6b01e0c [indic] Adjust Sinhala cluster merging under uniscribe
Similar to 190c8f2b60 but for
Sinhala.
2013-10-17 16:27:38 +02:00
Behdad Esfahbod 3c3df9cba1 [otlayout] Minor 2013-10-17 13:58:31 +02:00
Behdad Esfahbod 6cc136f753 [otlayout] Minor 2013-10-17 13:55:48 +02:00
Behdad Esfahbod ba6ddc421e [otlayout] Increase MAX_CONTEXT_LENGTH
It's cheap.
2013-10-17 13:52:51 +02:00
Behdad Esfahbod e714fe6d6a [otlayout] Simplify ligate_input()
Shouldn't change behavior at all, but is faster / more robust.
2013-10-17 13:49:51 +02:00
Behdad Esfahbod 6b2abdcd20 [indic] Improve clusters in presence of reph 2013-10-17 13:15:43 +02:00
Behdad Esfahbod 42d0f55cbc [indic] Apply calt,clig in the same stage as presentation features
Whic means these twp are applied per-syllable now.  Apparently
in some Khmer fonts the clig interacts with presentation features.

Test case: U+1781,U+17D2,U+1789,U+17BB,U+17C6 with Mondulkiri-R.ttf
should produce one big ligature.
2013-10-17 13:06:22 +02:00
Behdad Esfahbod ae9a5834df [indic] Fix pref vs blwf interaction
If a glyph can be both blwf and pref, we were wrongly sorting it
in the post position instead of below position.
2013-10-17 12:24:55 +02:00
Behdad Esfahbod c7dacac02c [indic] Don't apply blwf before base under old-spec mode
Test case: U+09AC,U+09CD,U+09A6 with Lohit-Bengali 2.5.3.
2013-10-17 12:20:46 +02:00
Behdad Esfahbod da72042c52 [otlayout] Fix up recent Context matching change
Commit 6b65a76b40.  "end" was becoming
negative.  Was trigerred by Lohit-Kannada 2.5.3 and the sequence:
U+0CB0,U+200D,U+0CBE,U+0CB7,U+0CCD,U+0C9F,U+0CCD,U+0CB0,U+0C97,U+0CB3
Two glyphs were being duplicated.
2013-10-17 12:02:34 +02:00
Behdad Esfahbod 1a7de1ba98 [indic] Improve Avagraha support in machine 2013-10-16 19:55:06 +02:00
Behdad Esfahbod 3756efaf4e [indic] Misc harmless fixes!
First, we were abusing OT_VD instead of OT_A.  Fix that
but moving OT_A in the grammar where it belongs (which
is different from what the spec says).

Also, only allow medial consonants after all other
consonants.  This doesn't affect any current character.

Finally, fix Halant attachment in presence of medial
consonants.  Again, this currently doesn't affect any
sequence.

I lied.  There's Gurmukhi U+0A75 which is Consonant_Medial.
Uniscribe allows one of those in each of these positions:
before matras, after matras and before syllable modifiers,
and after syllable modifiers!  We currently just allow
unlimited numbers of it, before matras.
2013-10-16 19:06:29 +02:00
Behdad Esfahbod c52ddab72e [arabic] Make ZWJ prevent ligatures instead of facilitating it
Unicode 6.2.0 Section 16.2 / Figure 16.3 says:

"For backward compatibility, between Arabic characters a ZWJ acts just
like the sequence <ZWJ, ZWNJ, ZWJ>, preventing a ligature from forming
instead of requesting the use of a ligature that would not normally be
used. As a result, there is no plain text mechanism for requesting the
use of a ligature in Arabic text."

As such, we flip internal zwj to zwnj flags for GSUB matching, which
means it will block ligation in all features, unless the font
explicitly matches U+200D glyph.  This doesn't affect joining behavior.
2013-10-16 13:42:38 +02:00
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 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 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 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 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 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
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 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 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 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
Behdad Esfahbod 213001aa99 [build] Fix EXTRA_DIST
I was under the impression that EXTRA_DISTs will happen regardless of
automake conditionals.  Apparently I was wrong.
2013-09-03 20:00:16 -04:00
Behdad Esfahbod ac1b723917 Remove hb-old and hb-icu-le test shapers
They've been disabled for a while and no one cared.  We're past
the point to need them for testing, and if we ever need to
resurrect them again, well, they're in git graveyard somewhere.
2013-08-30 19:32:10 -04:00
Behdad Esfahbod b94243d6a9 [g-i] Rename library from harfbuzz to HarfBuzz 2013-08-30 18:41:33 -04:00
Behdad Esfahbod 71ef22b04d Turn hb-gobject, and introspection off by default
Also enable bootstrapping without them.
2013-08-28 12:52:55 -04:00
Behdad Esfahbod d8f507099b Hookup harfbuzz-gobject to introspection 2013-08-28 12:38:37 -04:00
Behdad Esfahbod 71439a8c7a [gobject] Flesh out hb-gobject
Move it to new harfbuzz-gobject library.  Implement enums and
boxed types for object-types.  Still have to do boxed types for
value types.
2013-08-28 12:38:37 -04:00
Behdad Esfahbod 23027f7611 [introspection] Enable gobject-introspection again 2013-08-28 12:38:37 -04:00
Behdad Esfahbod 757a7a9018 [uniscribe] Fixed build with wide chars
f65dafa413
2013-08-28 12:38:37 -04:00
Behdad Esfahbod 4dc798de19 Add hb-deprecated.h, and rename a couple enum values
Add deprecated alias for old name.
2013-08-27 11:46:08 -04:00
Behdad Esfahbod 2e3a07abdf Separate face source code from font
Makes documentation / introspection easier.
2013-08-27 11:46:08 -04:00
Behdad Esfahbod d3490761e1 Improve check-includes.sh 2013-08-27 11:46:07 -04:00
Behdad Esfahbod 38b8b40526 Fix possible snprintf OOM
https://bugzilla.redhat.com/show_bug.cgi?id=1001645
2013-08-27 11:46:07 -04:00
Behdad Esfahbod d22548c0e3 [check-*] Minor 2013-08-26 18:46:21 -04:00
Behdad Esfahbod 700a15fe4b Add HB_DISABLE_DEPRECATED
That moment that you have to accept that you made API mistakes...
2013-08-26 17:49:36 -04:00
Anthony Carrico f7c72b42ef [gtk-doc] Initial setup
Initial setup of gtk-doc. Straight forward setup following the gtk-doc
instructions. Ignore some troublesome types in src/hb-gobject.h. To
build use "./autogen.sh --enable-gtk-doc" then "make". Docs are in
harfbuzz/docs/reference/html/index.html.
2013-08-26 17:32:30 -04:00
Behdad Esfahbod 3409fb1c76 [uniscribe] Ask Uniscribe to return shaping results in logical order
See discussion on the list in the thread "Arabic presentation forms
and the uniscribe backend".

Based on patch from Jonathan Kew.
2013-08-21 17:22:21 -04:00
Behdad Esfahbod 1d05fdd09f [uniscribe] Print run info 2013-08-20 13:22:50 -04:00
Behdad Esfahbod 3613696b57 [coretext] Fully support user features
Based on patch from Jonathan Kew and data from Apple.

It's not working correctly though, and I suspect I'm hitting a bug in
CoreText.  When I do this:

hb-shape /Library/Fonts/Zapfino.ttf ZapfinoZapfino --shaper coretext \
--features=-liga

I expect both ligatures to turn off, but only the second one does:

[Z_a_p_f_i_n_o=0+2333|Z=7+395|a=8+285|p_f=9+433|i=11+181|n=12+261|o=13+250]

whereas if I disable 'dlig' instead of 'liga', both are turned off.
Smells...

Doesn't resolve conflicting feature settings.
2013-08-12 12:01:05 -04:00
Behdad Esfahbod 54e6f6c588 Clean up list of Unicode scripts
Rename HB_SCRIPT_CANADIAN_ABORIGINAL to HB_SCRIPT_CANADIAN_SYLLABICS
and a macro for the old name.
2013-08-09 14:36:18 -04:00
Behdad Esfahbod 515a0ac81e Fix compiler warning 2013-08-09 09:40:59 -04:00
Behdad Esfahbod 10f964623f Round when scaling values
Doesn't matter for most users since they should be working in a
fixed sub-pixel scale anyway (ie. 22.10, 26.6, 16.16, etc).
2013-08-09 09:40:01 -04:00
Behdad Esfahbod df8f70ae5d Minor 2013-08-09 09:35:10 -04:00
Behdad Esfahbod ce8badf180 Minor 2013-08-09 09:31:06 -04:00
Behdad Esfahbod d71c0df2d1 Remove vrt2, vkrn, vpal, and valt from default vertical features
See thread by John Dagget on the list.
2013-08-09 09:29:29 -04:00
Behdad Esfahbod a782a5e9a3 [coretext] Start adding support for features
Unlike AAT, looks like with CoreText very few OT features can be mapped.
:(
2013-08-07 22:08:29 -04:00
Behdad Esfahbod bdd8873fd8 Revert "[Indic] don't apply 'calt' by default in Indic shaper"
This reverts commit 952121007c.

In light of discussion on the mailing list...
2013-08-07 17:58:25 -04:00
Behdad Esfahbod 9a175914d7 [uniscribe] Support feature ranges
As Khaled pointed out, right now setting any features, turns kern
and possibly other features off.
2013-08-07 17:29:32 -04:00