Commit Graph

2866 Commits

Author SHA1 Message Date
Behdad Esfahbod ca7b77431d [ot] Factor out code between cmap sutable format 12 and 13 2014-05-13 21:26:34 -04:00
Behdad Esfahbod 94759e8219 [ot] Factor out code between cmap subtable format 6 and 10 2014-05-13 21:19:49 -04:00
Behdad Esfahbod 1a8ffc5129 Minor 2014-05-13 21:06:39 -04:00
Behdad Esfahbod 91bbfca875 [ot] Implement cmap subtable formats 6 and 10 2014-05-12 18:19:29 -04:00
Behdad Esfahbod d294a2cb16 [ot] Implement cmap subtable format 13 2014-05-12 17:58:31 -04:00
Behdad Esfahbod 0d75793fae [ot] Implement cmap subtable format 12 2014-05-12 17:51:15 -04:00
Behdad Esfahbod 3608a6847e [ot] Hook up cmap table to hb_ot_font_funcs() 2014-05-12 13:46:29 -04:00
Behdad Esfahbod c8a4745299 [ot] Implement cmap subtable format 4 2014-05-09 19:55:51 -04:00
Behdad Esfahbod 4719621f20 Minor 2014-05-09 16:09:11 -04:00
Behdad Esfahbod 41ca1fbebf [ot] Start implementing cmap table 2014-05-09 15:35:56 -04:00
Behdad Esfahbod c7074b8798 [otlayout] Add GenericArrayOf::search() 2014-05-08 18:24:31 -04:00
Behdad Esfahbod 40a479797a [otlayout] Add GenericSortedArrayOf 2014-05-08 18:21:04 -04:00
Behdad Esfahbod 0ddecabc6d [main] Minor improvement to output 2014-05-01 16:01:40 -07:00
Behdad Esfahbod 6faff8e413 Add static storage classifier to inline functions
Before we were just relying on the compiler inlining them and not
leaving a trace in our public API.  Try to fix.  Hopefully not
breaking anyone's build.
2014-04-28 14:30:44 -07:00
Behdad Esfahbod 9c9411839b [tibetan] Reorder PADMA sign to occur after other below marks
Based on suggestion from Andrew Glass.

Test: U+0F40,0FC6,0F83
2014-04-28 12:44:14 -07:00
Behdad Esfahbod b082ef373c Typo 2014-04-25 11:48:10 -07:00
Behdad Esfahbod 828e109c7a [indic] Fix-up zero-context matching
commit b5a0f69e47
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Thu Oct 17 18:04:23 2013 +0200

    [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.

The *intention* was to change zero-context from true to false for scripts that
don't have old-vs-new specs.  However, checking the code, looks like we
essentially change zero-context to always be true; ie. we only changed things
for old-spec, and we broke them.  That's what causes this bug:

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

The root of the bug is here:

  /* Use zero-context would_substitute() matching for new-spec of the main
   * Indic scripts, but not for old-spec or scripts with one spec only. */
  bool zero_context = indic_plan->config->has_old_spec || !indic_plan->is_old_spec;

Note that is_old_spec itself is:

  indic_plan->is_old_spec = indic_plan->config->has_old_spec && ((plan->map.chosen_script[0] & 0x000000FF) != '2');

It's easy to show that zero_context is now always true.  What we really meant was:

  bool zero_context = indic_plan->config->has_old_spec && !indic_plan->is_old_spec;

Ie, "&&" instead of "||".  We made this change supposedly to make Javanese
work.  But apparently we got it working regardless!  So I'm going to fix this
to only change the logic for old-spec and not touch other cases.
2014-04-18 16:53:34 -07:00
Behdad Esfahbod 66c6a48b6c Add HB_NO_MERGE_CLUSTERS
Disables any cluster-merging.  Added for testing purposes while
we investigate what kind of API to add for this.
2014-04-14 15:55:42 -07:00
Behdad Esfahbod 5fd996c4a4 Further adjust check-defs and check-symbols for mipsel
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=74491
2014-04-09 16:38:26 -07:00
Behdad Esfahbod 75ec6d0bc5 Tighten up check-static-inits.sh check
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=74490
2014-04-09 16:33:32 -07:00
Behdad Esfahbod 110ec0714a Typo 2014-04-08 17:32:08 -07:00
Behdad Esfahbod 0682ddd05c [indic] Support U+17DD KHMER SIGN ATTHACAN
As requested by Martin Hosken on the list.
2014-04-08 16:03:35 -07:00
Primiano Tucci 05870ed62e Use __aarch64__ for 64-bit ARM detection, not __arm64__
Many GCC versions don't define __arm64__
2014-04-02 12:41:11 -07:00
Behdad Esfahbod 04d894e897 Minor 2014-03-25 12:11:32 -07:00
Behdad Esfahbod 903648437c Start fleshing out builtin font functions 2014-03-24 15:19:15 -07:00
Behdad Esfahbod 343a0e4e74 Add "make built-sources" 2014-03-21 14:37:27 -07:00
Konstantin Ritt b96af03c20 Fix build with --coretext on iOS
On iOS CoreText and CoreGraphics are stand-alone frameworks
2014-03-21 10:29:34 -07:00
Behdad Esfahbod 09732cc669 Remove dead warning 2014-03-19 12:00:17 -07:00
Behdad Esfahbod a949cd329e Don't use "register" storage class specifier
Fixes warnings.
https://bugzilla.mozilla.org/show_bug.cgi?id=984081
2014-03-16 20:22:42 -07:00
jfkthame 0082dbeae6 wrap definition of free_langs() with HAVE_ATEXIT
...to avoid an unused function warning; see mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=984081.
2014-03-16 13:40:33 -07:00
Behdad Esfahbod a9e25e90a4 [coretext] Add hb_coretext_face_create()
Not tested.
2014-03-14 19:55:46 -07:00
Behdad Esfahbod c79865f90f [coretext] Add coretext_aat shaper
This is a higher-priority shaper than default shaper ("ot"), but
only picks up fonts that have AAT "morx"/"mort" table.

Note that for this to work the font face's get_table() implementation
should know how to return the full font blob.

Based on patch from Konstantin Ritt.
2014-03-14 19:38:58 -04:00
Behdad Esfahbod af1aa362ca If HAVE_ICU_BUILTIN is defined, use hb-icu Unicode callbacks
Useful for Android / Chrome / etc when ICU is built in the same
library as harfbuzz itself.
2014-03-14 15:54:13 -07:00
Behdad Esfahbod 853daf857f Remove old cruft 2014-03-14 15:49:18 -07:00
Behdad Esfahbod bb8ffb581b Use AM_MISSING_PROG for ragel and git 2014-03-04 13:03:51 -08:00
Behdad Esfahbod a82165248c Only do fallback Hebrew composition if no GPOS 'mark' available
Apparently some modern fonts have proper GPOS mark positioning
tables, but undesirable precomposed forms!  See thread
"Hebrew composition to presentation forms" and:

  http://tex.stackexchange.com/questions/156775/having-trouble-with-vowel-positioning-in-ezra-sil-xelatex

Test case: U+fb1d,05d9,05b4
2014-02-18 15:53:56 -05:00
Werner Lemberg db068d81cd typo in ucdn's Makefile.am 2014-02-10 13:05:48 -05:00
Behdad Esfahbod fbb2847f54 Improve MemoryBarrier() implementation
See thread "[HarfBuzz] compilation error of 0.9.26 with MinGW"
started by Werner.
2014-02-05 08:22:06 -05:00
Jonathan Kew 7691a154e5 Ensure hb_script_t can safely hold any hb_tag_t value it's given.
Fixes https://github.com/behdad/harfbuzz/pull/21
2014-01-29 16:09:16 -05:00
Behdad Esfahbod c29993a181 [coretext] Handle surrogate pairs when generating notdef glyphs
Fixes github.com/behdad/harfbuzz/pull/19
2014-01-28 17:29:42 -05:00
Behdad Esfahbod 748b2782e4 [coretext] Minor optimization 2014-01-28 17:10:05 -05:00
Konstantin Ritt 24e6b11f12 Fix double destruction in case of OOM 2014-01-28 11:21:18 -05:00
Konstantin Ritt 083225916a Micro optimizations 2014-01-28 11:14:12 -05:00
Konstantin Ritt c9522de233 Make it possible to disable the fallback shaper at configure time
The OT shaper supersedes the fallback shaper in every case
and the latter become an extra weight for 99.9% of users.
2014-01-28 11:13:53 -05:00
Behdad Esfahbod 6775da3a7c Fix clang warning 'private field 'xxx' is not used
Fixes https://github.com/behdad/harfbuzz/pull/16
2014-01-23 14:18:49 -05:00
Behdad Esfahbod 62299826f4 Fix typo in _hb_buffer_serialize_glyphs_text()
Fixes https://github.com/behdad/harfbuzz/pull/17
2014-01-23 14:11:03 -05:00
Behdad Esfahbod ae23c24c32 [arabic] Disable 'cswh' by default
I believe Windows 8 disables it, and spec update dated
Jan 2014 also clearly says it's disabled by default:

  http://www.microsoft.com/typography/OpenTypeDev/arabic/intro.htm#features
2014-01-22 11:03:02 -05:00
Behdad Esfahbod 08cf5d75ef [ot] Don't try to compose if normalization is off 2014-01-22 07:53:55 -05:00
Behdad Esfahbod 0596343bfe Merge pull request #13 from jfkthame/hangul-shaper
Tone-mark reordering and improved Old Hangul support
2014-01-22 04:43:51 -08:00
Jonathan Kew 62cb28dfc6 fixup for 64-bit windows build 2014-01-22 07:31:54 -05:00
Jonathan Kew 83d7e7915a [hangul] Fix ordering of dotted circle with Hangul tone mark (reported by Dohyun Kim). 2014-01-20 19:49:47 +00:00
Jonathan Kew deef186265 [hangul] Don't force zero-width for marks - this is not wanted for the Jamo Filler glyphs. 2014-01-20 10:38:27 +00:00
Jonathan Kew 391934db0a [unicode] Exclude the Jamo Filler characters from Default_Ignorable, as some fonts want these to be visible/spacing glyphs. 2014-01-20 10:37:32 +00:00
Jonathan Kew 7244b3fc3b [hangul] Reorder Hangul tone mark to beginning of syllable, unless font implements it using a zero-width glyph. 2014-01-20 10:35:51 +00:00
Jonathan Kew 103436838d [hangul] Apply the appropriate *jmo features to decomposed syllables, including Old Hangul sequences that don't have Unicode compositions. Merge clusters in decomposed syllables. 2014-01-20 10:35:07 +00:00
Behdad Esfahbod 8fc1f7fe74 [ot/hangul] Don't decompose Hangul even when combining marks present
As discussed on
https://github.com/behdad/harfbuzz/pull/10#issuecomment-31442030
2014-01-02 17:04:04 +08:00
Behdad Esfahbod 64426ec73a [ot] Simplify composing
Not tested.  Ouch.
2014-01-02 14:33:10 +08:00
Behdad Esfahbod 8de20b1e8a Add font->has_glyph() 2014-01-02 14:30:45 +08:00
Behdad Esfahbod f6298e55ae [fallback] Minor 2014-01-02 14:23:56 +08:00
Behdad Esfahbod 29ea403d67 [hangul] Fix decomposition logic
Seems to be working now.
2014-01-02 14:20:00 +08:00
Behdad Esfahbod bdb20dafc3 [hangul] Fix decomposition
Part of https://github.com/behdad/harfbuzz/pull/10
2014-01-02 14:04:30 +08:00
Behdad Esfahbod 32478656ce [hangul] Tighten up character categories
I had tried to expand to fill the blocks, but that sounds wrong in
retrospect.
2014-01-02 14:01:56 +08:00
Behdad Esfahbod f14bb7de63 [ot] Separate out hebrew and tibetan shapers from default
Now default shaper is truly no-op.
2013-12-31 16:49:15 +08:00
Behdad Esfahbod 6300cd7253 [ot] Define HB_OT_SHAPE_ZERO_WIDTH_MARKS_DEFAULT 2013-12-31 16:38:47 +08: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 c98b7183f7 [ot] Add Hangul shaper
Not exhaustively tested, but I think I got the intended logic
right.

The logic can perhaps be simplified.  Maybe we should disabled
normalization with this shaper.  Then again, for now focusing on
correctness.
2013-12-31 16:23:48 +08:00
Behdad Esfahbod 15f67048e4 Reorder Tai Tham SAKOT to ensure it comes after any tone marks 2013-12-27 19:33:28 -05:00
Behdad Esfahbod 3216e44feb [uniscribe] Fix scratch-buffer accounting 2013-12-23 14:39:23 -05:00
Behdad Esfahbod beeb12c9af Add TODO item 2013-12-22 22:53:27 -05:00
Luis de Bethencourt fbd4acc58a Clean ht-ob headers 2013-12-22 22:52:57 -05:00
Behdad Esfahbod 5497a8a274 Cache various masks on the shape plan 2013-12-22 20:48:53 -05:00
Behdad Esfahbod 02f909664f Minor correction to kern mask checking 2013-12-22 19:35:27 -05:00
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