platform/upstream/libHarfBuzzSharp.git
11 years ago[win32] Remove MemoryBarrier() fallback implementation
Behdad Esfahbod [Fri, 8 Mar 2013 01:51:30 +0000 (20:51 -0500)]
[win32] Remove MemoryBarrier() fallback implementation

I added these because the older mingw32 toolchain didn't have
MemoryBarrier().  The newer mingw-w64 toolchain however has.
As reported by John Emmas this was causing build failure with
MSVC (on glib) because of inline issues.  But that reminded me
that we may be taking this path even if the system implements
MemoryBarrier as a function, which is a waste.  So, just remove
it.

11 years ago[build] Port to newer automake recommended syntax
Behdad Esfahbod [Thu, 7 Mar 2013 01:21:11 +0000 (20:21 -0500)]
[build] Port to newer automake recommended syntax

11 years agoMove valgrind suppressions to the correct directory
Behdad Esfahbod [Thu, 7 Mar 2013 01:20:45 +0000 (20:20 -0500)]
Move valgrind suppressions to the correct directory

11 years ago[build] Add AM_PROG_AR
Behdad Esfahbod [Thu, 7 Mar 2013 01:05:34 +0000 (20:05 -0500)]
[build] Add AM_PROG_AR

Newer automake / libtools warns otherwise.

11 years ago[FT] Just return if glyph name not found
Behdad Esfahbod [Thu, 7 Mar 2013 00:37:31 +0000 (19:37 -0500)]
[FT] Just return if glyph name not found

The fallback happens in higher level already.  No need to do here.

11 years ago[Indic] Minor
Behdad Esfahbod [Wed, 6 Mar 2013 05:53:24 +0000 (00:53 -0500)]
[Indic] Minor

11 years ago[Indic] Work around fonts with broken new-spec tables
Behdad Esfahbod [Wed, 6 Mar 2013 01:08:59 +0000 (20:08 -0500)]
[Indic] Work around fonts with broken new-spec tables

See comments, and this thread:

http://lists.freedesktop.org/archives/harfbuzz/2013-March/002990.html

Originally reported here:

https://code.google.com/p/chromium/issues/detail?id=96143

Doesn't change test suite numbers.

11 years ago[travis] Oops. Run make check, not make test!
Behdad Esfahbod [Tue, 5 Mar 2013 22:23:33 +0000 (17:23 -0500)]
[travis] Oops.  Run make check, not make test!

11 years agoRun autogen.sh, not configure, in travis-ci
Behdad Esfahbod [Tue, 5 Mar 2013 07:35:31 +0000 (02:35 -0500)]
Run autogen.sh, not configure, in travis-ci

11 years agoAdd .travis.yml for continuous building with travis-ci.org
Behdad Esfahbod [Tue, 5 Mar 2013 06:37:44 +0000 (01:37 -0500)]
Add .travis.yml for continuous building with travis-ci.org

Notifications sent to IRC channel and mailing list.

11 years agoFix distcheck
Behdad Esfahbod [Tue, 5 Mar 2013 02:29:38 +0000 (21:29 -0500)]
Fix distcheck

11 years ago[git.mk] Update to commit efc928222179576270c5910416d8055dd7a97896
Behdad Esfahbod [Tue, 5 Mar 2013 01:56:15 +0000 (20:56 -0500)]
[git.mk] Update to commit efc928222179576270c5910416d8055dd7a97896

    Move reusable list of files into variable definitions modules can
    reuse

11 years agoAdd libtool m4 macros to MAINTAINERCLEANFILES
Behdad Esfahbod [Mon, 4 Mar 2013 23:52:12 +0000 (18:52 -0500)]
Add libtool m4 macros to MAINTAINERCLEANFILES

11 years ago[Indic] Help compiler put indic_features table in .rodata
Behdad Esfahbod [Thu, 28 Feb 2013 01:40:54 +0000 (20:40 -0500)]
[Indic] Help compiler put indic_features table in .rodata

The overridden "or" operator was preventing the flag expression from
being const, and putting the table in .data instead or .rodata.

11 years ago[buffer] Better parse glyph names
Behdad Esfahbod [Wed, 27 Feb 2013 23:47:26 +0000 (18:47 -0500)]
[buffer] Better parse glyph names

11 years ago[buffer] Implement buffer deserialization for format=json
Behdad Esfahbod [Wed, 27 Feb 2013 23:39:37 +0000 (18:39 -0500)]
[buffer] Implement buffer deserialization for format=json

Using a ragel machine.

11 years ago[buffer] Implement buffer deserialization for format=text
Behdad Esfahbod [Wed, 27 Feb 2013 22:59:28 +0000 (17:59 -0500)]
[buffer] Implement buffer deserialization for format=text

Using a ragel machine.

11 years ago[buffer] Fix serializing of buffer with invalid direction
Behdad Esfahbod [Wed, 27 Feb 2013 21:09:55 +0000 (16:09 -0500)]
[buffer] Fix serializing of buffer with invalid direction

11 years ago[buffer] Start implementing buffer deserialization
Behdad Esfahbod [Wed, 27 Feb 2013 18:01:02 +0000 (13:01 -0500)]
[buffer] Start implementing buffer deserialization

11 years ago[buffer] Minor
Behdad Esfahbod [Wed, 27 Feb 2013 17:02:42 +0000 (12:02 -0500)]
[buffer] Minor

11 years ago[buffer] Move buffer serialization code to a new file
Behdad Esfahbod [Wed, 27 Feb 2013 16:06:36 +0000 (11:06 -0500)]
[buffer] Move buffer serialization code to a new file

11 years agoMinor
Behdad Esfahbod [Wed, 27 Feb 2013 22:48:31 +0000 (17:48 -0500)]
Minor

11 years ago[Indic] Sort pre-base reordering consonants with post-forms
Behdad Esfahbod [Wed, 27 Feb 2013 02:22:37 +0000 (21:22 -0500)]
[Indic] Sort pre-base reordering consonants with post-forms

Before, we were marking them as below-form for initial reordering.
However, there is a rule that says "post consonants should follow
below consonsnts" for base determination purposes.  Malayalam has
port-form YA/VA, and RA is pre-base.  As such, for a sequence like
YA,Virama,YA,Virama,RA, the correct base is at index 0.  But
because the code was seeing RA as a below-base, it was stopping at
the second YA as base, instead of jumping it as a post-base.

By treating prebase-reordering consonants like post-forms, this
is fixed.

MALAYALAM went down from 351 to 265.  Other numbers didn't change:

BENGALI: 353686 out of 354188 tests passed. 502 failed (0.141733%)
DEVANAGARI: 707305 out of 707394 tests passed. 89 failed (0.0125814%)
GUJARATI: 366262 out of 366457 tests passed. 195 failed (0.0532122%)
GURMUKHI: 60706 out of 60747 tests passed. 41 failed (0.067493%)
KANNADA: 950680 out of 951913 tests passed. 1233 failed (0.129529%)
KHMER: 299074 out of 299124 tests passed. 50 failed (0.0167155%)
LAO: 53611 out of 53644 tests passed. 33 failed (0.0615167%)
MALAYALAM: 1048069 out of 1048334 tests passed. 265 failed (0.0252782%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271539 out of 271847 tests passed. 308 failed (0.113299%)
TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
TIBETAN: 208469 out of 208469 tests passed. 0 failed (0%)

11 years ago[tests] Add Malayalam tests frim cibu
Behdad Esfahbod [Wed, 27 Feb 2013 00:35:50 +0000 (19:35 -0500)]
[tests] Add Malayalam tests frim cibu

11 years agoUpdate Android.mk
Behdad Esfahbod [Tue, 26 Feb 2013 20:01:45 +0000 (15:01 -0500)]
Update Android.mk

11 years agoFix "comparison between signed and unsigned" warnings
Behdad Esfahbod [Tue, 26 Feb 2013 04:57:51 +0000 (23:57 -0500)]
Fix "comparison between signed and unsigned" warnings

Patch from Jonathan Kew.

11 years agoGive up sanitizing after 100 edit requests
Behdad Esfahbod [Tue, 26 Feb 2013 00:09:57 +0000 (19:09 -0500)]
Give up sanitizing after 100 edit requests

Such fonts are *definitely* really broken.  Give up.
Limits time spent in sanitize for extremely / deliberately broken
fonts.  For example, two fonts with these md5sum / names:

  9343f0a1b8c84b8123e7d201cae62ffd.ttf
  eb8c978547f09d368fc204194fb34688.ttf

were spending over a second in sanitize!  Not anymore.

11 years agoAdd HB_DEBUG_VERBOSE
Behdad Esfahbod [Tue, 26 Feb 2013 00:04:56 +0000 (19:04 -0500)]
Add HB_DEBUG_VERBOSE

Only affects the verbosity of function name printing right now.

11 years ago0.9.13
Behdad Esfahbod [Mon, 25 Feb 2013 23:19:20 +0000 (18:19 -0500)]
0.9.13

11 years agoFix blob test to match c3ba49b6fa1865e8318926eaa6c0f2063d1053bb
Behdad Esfahbod [Mon, 25 Feb 2013 22:54:10 +0000 (17:54 -0500)]
Fix blob test to match c3ba49b6fa1865e8318926eaa6c0f2063d1053bb

11 years agoAlways create sub-blobs in MEMORY_MODE_READONLY
Behdad Esfahbod [Mon, 25 Feb 2013 22:06:35 +0000 (17:06 -0500)]
Always create sub-blobs in MEMORY_MODE_READONLY

This fixes a design bug with sanitize and sub-blobs that can
cause crashes.  Jonathan and I found and debugged this issue
when we tested a corrupt font with the md5sum / filename:
ea395483d37af0cb933f40689ff7b60a.  Two hours of intense
debugging we found out that the font has overlapping GSUB/GPOS
tables, and as such, sanitizing the second table can modify
the first one, which can cause all kinds of undefined behavior.

The correct way to fix this is to make sure sub-blobs are
always created readonly, since we consider the parent blob
to be a shared resource and can't modify it, even if it *is*
writable.

This essentially makes the READONLY_MAY_MAKE_WRITABLE mode
unused...  Maybe we should simply remove / deprecate it.

11 years agoMinor
Behdad Esfahbod [Thu, 21 Feb 2013 20:54:05 +0000 (15:54 -0500)]
Minor

11 years agoPort TrueType-kerning to use skippy iterator
Behdad Esfahbod [Thu, 21 Feb 2013 20:39:57 +0000 (15:39 -0500)]
Port TrueType-kerning to use skippy iterator

It skips joiners and default ignorables now.  Skips marks too, but only
if there is proper GDEF classes for marks.

11 years agoFixup previous commit
Behdad Esfahbod [Thu, 21 Feb 2013 20:37:51 +0000 (15:37 -0500)]
Fixup previous commit

Was not decreasing num_items.  Ouch!

11 years agoMove code around
Behdad Esfahbod [Thu, 21 Feb 2013 20:23:39 +0000 (15:23 -0500)]
Move code around

11 years ago[OTLayout] Correctly skip Default_Ignorable when match_func not set
Behdad Esfahbod [Thu, 21 Feb 2013 20:07:03 +0000 (15:07 -0500)]
[OTLayout] Correctly skip Default_Ignorable when match_func not set

When a match_func was not set on the matcher_t object (ie. from GPOS),
then the Default_Ignorables (including joiners) were never skipped.
This meant that they were not skipped as they should during GPOS
matching.  Fix that.

A few Indic numbers have "regressed": BENGALI and DEVANAGARI went
up from 290 and 58 respectively, but in both cases new results are
superior to Uniscribe, as they apply GPOS when we weren't (and
Uniscribe isn't) before.
BENGALI: 353686 out of 354188 tests passed. 502 failed (0.141733%)
DEVANAGARI: 707305 out of 707394 tests passed. 89 failed (0.0125814%)
GUJARATI: 366262 out of 366457 tests passed. 195 failed (0.0532122%)
GURMUKHI: 60706 out of 60747 tests passed. 41 failed (0.067493%)
KANNADA: 950680 out of 951913 tests passed. 1233 failed (0.129529%)
KHMER: 299074 out of 299124 tests passed. 50 failed (0.0167155%)
LAO: 53611 out of 53644 tests passed. 33 failed (0.0615167%)
MALAYALAM: 1047983 out of 1048334 tests passed. 351 failed (0.0334817%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271539 out of 271847 tests passed. 308 failed (0.113299%)
TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
TIBETAN: 208469 out of 208469 tests passed. 0 failed (0%)

11 years agoMinor
Behdad Esfahbod [Thu, 21 Feb 2013 19:51:40 +0000 (14:51 -0500)]
Minor

11 years ago[tests] Add Myanmar torture tests from Martin Hosken
Behdad Esfahbod [Tue, 19 Feb 2013 05:58:10 +0000 (00:58 -0500)]
[tests] Add Myanmar torture tests from Martin Hosken

11 years agoMinor
Behdad Esfahbod [Tue, 19 Feb 2013 05:50:46 +0000 (00:50 -0500)]
Minor

Moving files around

11 years ago[SEA] Fix order of pre-base reordering Ra and left matras
Behdad Esfahbod [Sun, 17 Feb 2013 17:12:37 +0000 (12:12 -0500)]
[SEA] Fix order of pre-base reordering Ra and left matras

The code was confused because it was expecting left matra to have
POS_PRE_M, like we do in the Myanmar shaper, but that is not what
we were doing in this shaper.  Rewrite to rely on category only.

Test case: U+AA06,U+AA34,U+AA2F

11 years agoMinor
Behdad Esfahbod [Fri, 15 Feb 2013 16:47:24 +0000 (11:47 -0500)]
Minor

11 years ago[OTLayout] Remove unused code
Behdad Esfahbod [Fri, 15 Feb 2013 16:47:09 +0000 (11:47 -0500)]
[OTLayout] Remove unused code

11 years agoRemove TODO items that don't make sense
Behdad Esfahbod [Fri, 15 Feb 2013 14:33:10 +0000 (09:33 -0500)]
Remove TODO items that don't make sense

The spec says those features need to be disabled by default.

11 years ago[Arabic] Fix shaping of left-joining 'Phags-Pa U+A872
Behdad Esfahbod [Fri, 15 Feb 2013 14:27:02 +0000 (09:27 -0500)]
[Arabic] Fix shaping of left-joining 'Phags-Pa U+A872

This is the first character in Unicode to have Arabic left-joining
behavior.  Update the machine to recognize that.

Test case: U+A840,U+A872,U+A840.

11 years ago[tests] Add Syriac Alaph shaping test cases
Behdad Esfahbod [Fri, 15 Feb 2013 14:26:41 +0000 (09:26 -0500)]
[tests] Add Syriac Alaph shaping test cases

11 years agoDisable automatic segment properties guessing
Behdad Esfahbod [Fri, 15 Feb 2013 12:51:47 +0000 (07:51 -0500)]
Disable automatic segment properties guessing

Before, if one called hb_shape() without setting script, language, and
direction on the buffer, hb_shape() was calling
hb_buffer_guess_segment_properties() on the user's behalf to guess
these.

This is very dangerous, since any serious user of HarfBuzz must set
these properly (specially important is direction).  So now, we don't
guess properties by default.  People not setting direction will get
an abort() now.  If the old behavior is desired (fragile, good for
simple testing only), users can call
hb_buffer_guess_segment_properties() on the buffer just before calling
hb_shape().

11 years agoAdd assertions for a couple programmer errors
Behdad Esfahbod [Fri, 15 Feb 2013 12:46:57 +0000 (07:46 -0500)]
Add assertions for a couple programmer errors

11 years agoAllow disabling of TrueType kerning
Behdad Esfahbod [Fri, 15 Feb 2013 12:41:07 +0000 (07:41 -0500)]
Allow disabling of TrueType kerning

Responds to the same feature tag that GPOS kerning does:
'kern' for horizontal and 'vkrn' for vertical.

11 years agoFix partial disabling of default-on features
Behdad Esfahbod [Fri, 15 Feb 2013 12:40:10 +0000 (07:40 -0500)]
Fix partial disabling of default-on features

Surprisingly, if user ever tried to turn a default feature off partially
(say, disable liga for a range), the feature was being turned off
globally!  Fixed now.

11 years ago[OTLayout] Respect syllable boundaries for backtrack/lookahead matching
Behdad Esfahbod [Fri, 15 Feb 2013 12:02:08 +0000 (07:02 -0500)]
[OTLayout] Respect syllable boundaries for backtrack/lookahead matching

Originally we meant to match backtrack/lookahead across syllable
boundaries.  But a bug in the code meant that this was NOT done for
backtrack.  We "fixed" that in 2c7d0b6b80d412de3fddd443ed1a485ea1cbb03c,
but that broke Myanmar shaping.

We now believe that for Indic-like shapers (which is where syllables are
used), all basic shaping forms should be fully contained within their
syllables, so now we limit backtrack/lookahead matching to the syllable
too.  Unbreaks Myanmar.

11 years agoMinor refactoring
Behdad Esfahbod [Fri, 15 Feb 2013 11:22:26 +0000 (06:22 -0500)]
Minor refactoring

11 years ago[Indic-like] Disable automatic joiner handling for basic shaping features
Behdad Esfahbod [Thu, 14 Feb 2013 15:40:12 +0000 (10:40 -0500)]
[Indic-like] Disable automatic joiner handling for basic shaping features

Not for Arabic, but for Indic-like scripts.  ZWJ/ZWNJ have special
meanings in those scripts, so let font lookups take full control.

This undoes the regression caused by automatic-joiners handling
introduced two commits ago.

We only disable automatic joiner handling for the "basic shaping
features" of Indic, Myanmar, and SEAsian shapers.  The "presentation
forms" and other features are still applied with automatic-joiner
handling.

This change also changes the test suite failure statistics, such that
a few scripts show more "failures".  The most affected is Kannada.
However, upon inspection, we believe that in most, if not all, of the
new failures, we are producing results superior to Uniscribe.  Hard to
count those!

Here's an example of what is fixed by the recent joiner-handling
changes:

  https://bugs.freedesktop.org/show_bug.cgi?id=58714

New numbers, for future reference:

BENGALI: 353892 out of 354188 tests passed. 296 failed (0.0835714%)
DEVANAGARI: 707336 out of 707394 tests passed. 58 failed (0.00819911%)
GUJARATI: 366262 out of 366457 tests passed. 195 failed (0.0532122%)
GURMUKHI: 60706 out of 60747 tests passed. 41 failed (0.067493%)
KANNADA: 950680 out of 951913 tests passed. 1233 failed (0.129529%)
KHMER: 299074 out of 299124 tests passed. 50 failed (0.0167155%)
LAO: 53611 out of 53644 tests passed. 33 failed (0.0615167%)
MALAYALAM: 1047983 out of 1048334 tests passed. 351 failed (0.0334817%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271539 out of 271847 tests passed. 308 failed (0.113299%)
TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
TIBETAN: 208469 out of 208469 tests passed. 0 failed (0%)

11 years ago[OTLayout] Add fine-grained control over ZWJ matching
Behdad Esfahbod [Thu, 14 Feb 2013 15:46:52 +0000 (10:46 -0500)]
[OTLayout] Add fine-grained control over ZWJ matching

Not used yet.  Next commit...

11 years ago[OTLayout] Ignore default-ignorables when matching GSUB/GPOS
Behdad Esfahbod [Thu, 14 Feb 2013 12:43:13 +0000 (07:43 -0500)]
[OTLayout] Ignore default-ignorables when matching GSUB/GPOS

When matching lookups, be smart about default-ignorable characters.
In particular:

Do nothing specific about ZWNJ, but for the other default-ignorables:

If the lookup in question uses the ignorable character in a sequence,
then match it as we used to do.  However, if the sequence match will
fail because the default-ignorable blocked it, try skipping the
ignorable character and continue.

The most immediate thing it means is that if Lam-Alef forms a ligature,
then Lam-ZWJ-Alef will do to.  Finally!

One exception: when matching for GPOS, or for backtrack/lookahead of
GSUB, we ignore ZWNJ too.  That's the right thing to do.

It certainly is possible to build fonts that this feature will result
in undesirable glyphs, but it's hard to think of a real-world case
that that would happen.

This *does* break Indic shaping right now, since Indic Unicode has
specific rules for what ZWJ/ZWNJ mean, and skipping ZWJ is breaking
those rules.  That will be fixed in upcoming commits.

11 years agoAdd hb_ot_map_feature_flags_t
Behdad Esfahbod [Thu, 14 Feb 2013 16:25:10 +0000 (11:25 -0500)]
Add hb_ot_map_feature_flags_t

Code cleanup.  No (intended) functional change.

11 years agoClean-up add_bool_feature
Behdad Esfahbod [Thu, 14 Feb 2013 16:05:56 +0000 (11:05 -0500)]
Clean-up add_bool_feature

11 years agoFix compile warnings for ragel-generated machines
Behdad Esfahbod [Thu, 14 Feb 2013 16:05:36 +0000 (11:05 -0500)]
Fix compile warnings for ragel-generated machines

11 years ago[OTLayout] Remove unused function
Behdad Esfahbod [Thu, 14 Feb 2013 12:42:42 +0000 (07:42 -0500)]
[OTLayout] Remove unused function

11 years ago[OTLayout] Port apply_lookup to skippy_iter
Behdad Esfahbod [Thu, 14 Feb 2013 12:41:03 +0000 (07:41 -0500)]
[OTLayout] Port apply_lookup to skippy_iter

11 years ago[OTLayout] Port ligate_input to skippy_iter
Behdad Esfahbod [Thu, 14 Feb 2013 12:20:52 +0000 (07:20 -0500)]
[OTLayout] Port ligate_input to skippy_iter

11 years ago[OTLayout] Minor fix for apply_lookup()
Behdad Esfahbod [Thu, 14 Feb 2013 11:24:30 +0000 (06:24 -0500)]
[OTLayout] Minor fix for apply_lookup()

Should NOT change behavior, since first glyph is a match.

11 years ago[OTLayout] Make table type known to apply context
Behdad Esfahbod [Wed, 13 Feb 2013 17:17:25 +0000 (12:17 -0500)]
[OTLayout] Make table type known to apply context

11 years ago[OTLayou] Unbreak backtrack matching
Behdad Esfahbod [Wed, 13 Feb 2013 17:10:08 +0000 (12:10 -0500)]
[OTLayou] Unbreak backtrack matching

Was introduced by 28b9d502bb69a8045818d5f6113ded9c59a56bd7.

11 years ago[OTLayout] Minor refactoring
Behdad Esfahbod [Wed, 13 Feb 2013 16:22:42 +0000 (11:22 -0500)]
[OTLayout] Minor refactoring

11 years ago[OTLayout] Remove bogus caching of glyph property
Behdad Esfahbod [Wed, 13 Feb 2013 16:13:06 +0000 (11:13 -0500)]
[OTLayout] Remove bogus caching of glyph property

11 years agoRemember ZWNJ
Behdad Esfahbod [Wed, 13 Feb 2013 16:02:54 +0000 (11:02 -0500)]
Remember ZWNJ

To be used in upcoming changes.

11 years agoIndent
Behdad Esfahbod [Wed, 13 Feb 2013 14:38:40 +0000 (09:38 -0500)]
Indent

11 years ago[Indic] Improve base finding in final_reordering
Behdad Esfahbod [Wed, 13 Feb 2013 14:26:55 +0000 (09:26 -0500)]
[Indic] Improve base finding in final_reordering

Fixes 5 Malayalam failures!

MALAYALAM: 1048016 out of 1048334 tests passed. 318 failed (0.0303338%)

11 years agoAdd more dot-reph tests
Behdad Esfahbod [Wed, 13 Feb 2013 13:29:21 +0000 (08:29 -0500)]
Add more dot-reph tests

11 years ago[Indic] Track base position when reordering things
Behdad Esfahbod [Wed, 13 Feb 2013 12:32:46 +0000 (07:32 -0500)]
[Indic] Track base position when reordering things

Ouch, how did things ever work without this?!  The added test that has a
dot-reph as well as a pre-base reordering Ra perfectly demonstrates the
bug (tested with Nirmala font from Win8 for example).  Testing suggests
that Win8 shaper has the *exact* same bug / behavior that we used to
have.  Odd.

11 years ago[SEA] Don't zero any mark advances
Behdad Esfahbod [Wed, 13 Feb 2013 10:59:06 +0000 (05:59 -0500)]
[SEA] Don't zero any mark advances

Keep the logic simple, easier to explain to font developers.

11 years agoFurther adjust mark advance zeroing
Behdad Esfahbod [Wed, 13 Feb 2013 10:57:24 +0000 (05:57 -0500)]
Further adjust mark advance zeroing

This is a followup to 568000274c8edb5f41bc4f876ce21fcc8bdaeed8.
Looks like in the Latin shaper, Uniscribe zeroes all Unicode NSM
advances *after* GPOS, not before.  Match that.

Can be tested using DejaVu Sans Mono, since that font has GPOS
rules to zero the mark advances on its own.

11 years ago[Indic] Fix Eyelash Ra with old Devanagari spec
Behdad Esfahbod [Tue, 12 Feb 2013 23:17:39 +0000 (18:17 -0500)]
[Indic] Fix Eyelash Ra with old Devanagari spec

11 years ago[tests] Add tests for Devanagary Eyelash Ra
Behdad Esfahbod [Tue, 12 Feb 2013 23:17:12 +0000 (18:17 -0500)]
[tests] Add tests for Devanagary Eyelash Ra

Currently broken with Sanskrit 2003 font.

11 years ago[Indic] Apply 'blwf' before 'half'
Behdad Esfahbod [Tue, 12 Feb 2013 22:57:49 +0000 (17:57 -0500)]
[Indic] Apply 'blwf' before 'half'

This reverts 167b625d988b74572d6b2f646c285b666b650d49.  It didn't
matter before, but that's going to change with next commit.

11 years ago[Indic] Apply 'vatu' before 'cjct'
Behdad Esfahbod [Tue, 12 Feb 2013 23:01:21 +0000 (18:01 -0500)]
[Indic] Apply 'vatu' before 'cjct'

This essentially reverts 1d6846db9ebf84561bb30a4e48c6c43184914099,
but that commit is from way back when.  We should be better
following the spec order now again.

11 years agoDidn't mean to push this out
Behdad Esfahbod [Tue, 12 Feb 2013 21:29:25 +0000 (16:29 -0500)]
Didn't mean to push this out

Ouch!

11 years ago[Myanmar] Use master Indic table for syllable data
Behdad Esfahbod [Tue, 12 Feb 2013 21:13:56 +0000 (16:13 -0500)]
[Myanmar] Use master Indic table for syllable data

11 years ago[tests] Add Cham sample
Behdad Esfahbod [Tue, 12 Feb 2013 20:45:59 +0000 (15:45 -0500)]
[tests] Add Cham sample

11 years agoImprove checks for setmode()
Behdad Esfahbod [Tue, 12 Feb 2013 20:35:32 +0000 (15:35 -0500)]
Improve checks for setmode()

As reported by Jonathan, OS X has setmode() that is something other
than what setmode() is on Win32.  So, limit invocation to Windows
platforms only.

11 years agoImprove check for Windows platforms
Behdad Esfahbod [Tue, 12 Feb 2013 20:31:58 +0000 (15:31 -0500)]
Improve check for Windows platforms

Instead of checking for compiler, check for platform.

11 years ago[SEA] Treat Consonant_Final like Consonant_Medial
Behdad Esfahbod [Tue, 12 Feb 2013 20:28:21 +0000 (15:28 -0500)]
[SEA] Treat Consonant_Final like Consonant_Medial

11 years agoRename HB_OT_INDIC_OPTIONS env var to HB_OPTIONS
Behdad Esfahbod [Tue, 12 Feb 2013 20:26:45 +0000 (15:26 -0500)]
Rename HB_OT_INDIC_OPTIONS env var to HB_OPTIONS

The Myanmar shaper now respects the uniscribe-bug-compatibility
option too.

11 years agoAdd South-East Asian shaper
Behdad Esfahbod [Tue, 12 Feb 2013 17:14:10 +0000 (12:14 -0500)]
Add South-East Asian shaper

Handles Tai Tham, Cham, and New Tai Lue for now.

11 years agoMinor test reshufflings
Behdad Esfahbod [Tue, 12 Feb 2013 15:33:58 +0000 (10:33 -0500)]
Minor test reshufflings

11 years ago[Indic] Make sure New Tai Lue works!
Behdad Esfahbod [Tue, 12 Feb 2013 15:31:14 +0000 (10:31 -0500)]
[Indic] Make sure New Tai Lue works!

11 years agoAdjust mark advance-width zeroing logic for Myanmar
Behdad Esfahbod [Tue, 12 Feb 2013 14:44:57 +0000 (09:44 -0500)]
Adjust mark advance-width zeroing logic for Myanmar

Before, we were zeroing advance width of attached marks for
non-Indic scripts, and not doing it for Indic.

We have now three different behaviors, which seem to better
reflect what Uniscribe is doing:

  - For Indic, no explicit zeroing happens whatsoever, which
    is the same as before,

  - For Myanmar, zero advance width of glyphs marked as marks
    *in GDEF*, and do that *before* applying GPOS.  This seems
    to be what the new Win8 Myanmar shaper does,

  - For everything else, zero advance width of glyphs that are
    from General_Category=Mn Unicode characters, and do so
    before applying GPOS.  This seems to be what Uniscribe does
    for Latin at least.

With these changes, positioning of all tests matches for Myanmar,
except for the glitch in Uniscribe not applying 'mark'.  See preivous
commit.

11 years ago[Myanmar] Add note re Uniscribe NOT applying 'mark'
Behdad Esfahbod [Tue, 12 Feb 2013 14:44:35 +0000 (09:44 -0500)]
[Myanmar] Add note re Uniscribe NOT applying 'mark'

11 years agoMinor
Behdad Esfahbod [Mon, 11 Feb 2013 22:02:17 +0000 (17:02 -0500)]
Minor

11 years ago[Myanmar] Fix handling of Punctuation and Symbol types
Behdad Esfahbod [Mon, 11 Feb 2013 21:16:16 +0000 (16:16 -0500)]
[Myanmar] Fix handling of Punctuation and Symbol types

Testing with "clusters" now on par with testing without them.  15
failures both.

11 years ago[Myanmar] Fixup handling of joiners and GB characters
Behdad Esfahbod [Mon, 11 Feb 2013 21:06:02 +0000 (16:06 -0500)]
[Myanmar] Fixup handling of joiners and GB characters

11 years ago[Myanmar] Prevent reordering between Asat and Dot below
Behdad Esfahbod [Mon, 11 Feb 2013 19:27:02 +0000 (14:27 -0500)]
[Myanmar] Prevent reordering between Asat and Dot below

Implemented as a hack for now.  Myanmar failures down from 23 to 15.

MYANMAR: 1123868 out of 1123883 tests passed. 15 failed (0.00133466%)

The remaining 15 cases are all where the syllable is wrong according to
the OpenType spec.  We insert dottedcircle.  Uniscribe fails to do that,
but it also fails to reorder the prebase-reordering medial-Ra.  So it
gets it wrong.

11 years agoShuffle test data around
Behdad Esfahbod [Mon, 11 Feb 2013 19:24:03 +0000 (14:24 -0500)]
Shuffle test data around

11 years agoAdd Win8-style Myanmar shaper
Behdad Esfahbod [Mon, 11 Feb 2013 18:36:23 +0000 (13:36 -0500)]
Add Win8-style Myanmar shaper

Myanmar failures down from 51% to 0.00204648%!

MYANMAR: 1123860 out of 1123883 tests passed. 23 failed (0.00204648%)

11 years agoMinor
Behdad Esfahbod [Mon, 11 Feb 2013 19:17:54 +0000 (14:17 -0500)]
Minor

11 years ago[OTLayout] Respect lookup-flags skipping over non-mark glyphs
Behdad Esfahbod [Mon, 11 Feb 2013 18:27:17 +0000 (13:27 -0500)]
[OTLayout] Respect lookup-flags skipping over non-mark glyphs

Before, when matching ligatures, we never skipping over base / liga
glyphs even if that was what the LookupFlags asked for.

Fixed now.  We carefully reviewed all instances of this, and tested with
Amiri as well as some Indic scripts, and are confident that this should
NOT break anyone's fonts.  It's also how Uniscribe does it, from what
we can tell.

11 years ago[OTLayout] s/mark_skipping/skipping/
Behdad Esfahbod [Mon, 11 Feb 2013 18:14:15 +0000 (13:14 -0500)]
[OTLayout] s/mark_skipping/skipping/

In aticipation of upcoming changes.

11 years ago[Indic] Fix bug introduced in 8b217f5ac54aa0dcbba2dd6d59aa89dde33e56c2
Behdad Esfahbod [Mon, 11 Feb 2013 11:58:27 +0000 (06:58 -0500)]
[Indic] Fix bug introduced in 8b217f5ac54aa0dcbba2dd6d59aa89dde33e56c2

Was breaking reph formation logic when the Ra is the only consonant.
Devanagari regression fixed.  Down to 57 failures again.  Ouch.

11 years agoImprove normalization heuristic
Behdad Esfahbod [Mon, 11 Feb 2013 11:50:17 +0000 (06:50 -0500)]
Improve normalization heuristic

Before, for most scripts, we were not trying to recompose two characters
if the second one had ccc=0.  That fails for Myanmar where U+1026
decomposes to U+1025,U+102E, both of which have ccc=0.  However, we do
want to try to recompose those.  We now check whether the second is a
mark, using general category instead.

At the same time, remove optimization that was conflicting with this.

[Let the Ngapi hackfest begin!]

11 years agoRevert "Include config.h.in in tree"
Behdad Esfahbod [Thu, 7 Feb 2013 04:45:27 +0000 (23:45 -0500)]
Revert "Include config.h.in in tree"

This reverts commit 01013a0f5c58d5d54a37e5b4d6692e0bbd4baf80.

Conflicts:
config.h.in

Same argument as previous commit.