Commit Graph

3005 Commits

Author SHA1 Message Date
Behdad Esfahbod df99976398 [gobject] Skip _HB_SCRIPT_MAX_VALUE
Fixes https://github.com/behdad/harfbuzz/pull/38
2014-07-19 17:31:23 -04:00
Behdad Esfahbod f1a8d50a87 [win] Don't define visibility attribtue under Cygwin 2014-07-19 16:52:32 -04:00
Behdad Esfahbod 9c77027d64 [win] Turn STRICT on for including windows.h 2014-07-19 16:37:22 -04:00
Behdad Esfahbod db30828048 [win] Consolidate windows.h include tips and tricks 2014-07-19 16:32:04 -04:00
Behdad Esfahbod f26d59d468 More fixing MemoryBarrier() on Mingw32
Set requested windows header to Vista.  See discussion:

fbb2847f54 (commitcomment-7054700)
2014-07-19 16:10:21 -04:00
Behdad Esfahbod 385cf37cf0 Fix hb_in_range() unused-var warning on Windows 2014-07-17 18:22:07 -04:00
Behdad Esfahbod e3b42f1af4 [arabic] Disable 'cswh' again
Ouch!
2014-07-17 17:13:54 -04:00
Behdad Esfahbod 82f4d9d53f [arabic] Add note re disabled 'cswh' 2014-07-17 15:57:37 -04:00
Behdad Esfahbod 615d00ea25 [arabic] Apply init/medi/isol/fini/... in separate stages
Follows the order of the Arabic/Syriac specs.  Also don't stop
between rlig and calt in non-Arabic scripts.

Micro-tests for Arabic and Mongolian added for the latter.
2014-07-17 15:50:13 -04:00
Behdad Esfahbod 7cd33f2304 Micro optimization 2014-07-17 14:39:07 -04:00
Behdad Esfahbod 164c13d73f Another try to fix Mongolian free variation selectors
This reverts bf029281 and fixes it properly.  That commit
was not enough as it was only inheriting the shaping_action
for prev_action, but not curr_action.

Micro-test added.

https://code.google.com/p/chromium/issues/detail?id=393896
2014-07-17 14:28:04 -04:00
Behdad Esfahbod 5209c50506 Revert "Show U+FFFD REPLACEMENT CHARACTER for invalid Unicode codepoints"
We now handle U+FFFD replacement in hb_buffer_add_utf*().  Any other
manipulation can happen in user callbacks.  No need for this.

efe74214bb (commitcomment-7039404)

This reverts commit efe74214bb.

Conflicts:
	src/hb-ot-shape-normalize.cc
2014-07-17 12:23:44 -04:00
Dominik Röttsches 9e7c720100 Fix CoreText build after a8b89a09f6 2014-07-17 12:18:08 -04:00
Behdad Esfahbod a4d643755a Minor 2014-07-16 20:15:45 -04:00
Behdad Esfahbod 976c8f4552 New API: hb_buffer_[sg]et_replacement_codepoint()
With this change, we now by default replace broken UTF-8/16/32 bits
with U+FFFD.  This can be changed by calling new API on the buffer.
Previously the replacement value used to be (hb_codepoint_t)-1.

Note that hb_buffer_clear_contents() does NOT reset the replacement
character.

See discussion here:

6f13b6d62d

New API:

  hb_buffer_set_replacement_codepoint()
  hb_buffer_get_replacement_codepoint()
2014-07-16 15:34:20 -04:00
Behdad Esfahbod bcba8b4502 New API hb_buffer_add_codepoints()
Like hb_buffer_add_utf32, but doesn't do any Unicode validation.
This is like what hb_buffer_add_utf32 used to be until a couple
commits ago.
2014-07-16 14:59:04 -04:00
Behdad Esfahbod 625dbf141a [buffer] Templatize UTF-* functions 2014-07-16 14:52:59 -04:00
Behdad Esfahbod e634fed428 [buffer] Validate UTF-32 input
Same as what we do for UTF-8 and UTF-16.
2014-07-16 14:17:26 -04:00
Behdad Esfahbod b98c5db32d Minor refactoring 2014-07-16 13:44:01 -04:00
Behdad Esfahbod 3b861421a7 Fix Mongolian Variation Selectors for fonts without GDEF
Originally we fixed those in 79d1007a50.
However, fonts like MongolianWhite don't have GDEF, but have IgnoreMarks
in their LigatureSubstitute init/etc features.  We were synthesizing a
GDEF class of mark for Mongolian Variation Selectors and as such the
ligature lookups where not matching.  Uniscribe doesn't do that.

I tried with more sophisticated fixes, like, if there is no GDEF and
a lookup-flag mismatch happens, instead of rejecting a match, try
skipping that glyph.  That surely produces some interesting behavior,
but since we don't want to support fonts missing GDEF more than we have
to, I went for this simpler fix which is to always mark
default-ignorables as base when synthesizing GDEF.

Micro-test added.

Fixes rest of https://bugs.freedesktop.org/show_bug.cgi?id=65258
2014-07-16 13:30:26 -04:00
Behdad Esfahbod 878a25375b Minor 2014-07-16 13:21:59 -04:00
Behdad Esfahbod ec181e5014 Minor moving around 2014-07-16 13:10:03 -04:00
Behdad Esfahbod e7ce50d9eb [indic] Fix access past end of array 2014-07-16 12:30:39 -04:00
Behdad Esfahbod 73e23b0acf Whitespace 2014-07-15 18:43:49 -04:00
Behdad Esfahbod b7bc0b671d Simplify / speed up UTF-8 code 2014-07-11 16:22:13 -04:00
Behdad Esfahbod af2490c095 Only accept well-formed UTF-8 sequences
Enable tests that were disabled before, and adjust one test,
and add more tests.
2014-07-11 16:22:13 -04:00
Behdad Esfahbod 7323d385cc Simplify hb_utf_prev<16> to call hb_utf_next<16> 2014-07-11 16:22:13 -04:00
Behdad Esfahbod c09a607a84 Use hb_in_range() for arabic and indic tables
Though, looks like gcc was smart enough to produce the same code
before...
2014-07-11 16:22:13 -04:00
Behdad Esfahbod 7627100f42 Mark unsigned integer literals with the u suffix
Simplifies hb_in_range() calls as the type can be inferred.
The rest is obsessiveness, I admit.
2014-07-11 16:22:13 -04:00
Behdad Esfahbod a8b89a09f6 Simplify hb_in_range()
It's both faster and produces smaller code.  Now I feel stupid for
not writing it this way before.
2014-07-11 14:18:01 -04:00
Behdad Esfahbod db8934faa1 Simplify hb_utf_prev<8> to call hb_utf_next<8> 2014-07-11 13:58:36 -04:00
Behdad Esfahbod efe74214bb Show U+FFFD REPLACEMENT CHARACTER for invalid Unicode codepoints
Only if the font doesn't support it.  Ie, this gives the user to
use non-Unicode codepoints as private values and return a meaningful
glyph for them.  But if it's invalid and font callback doesn't
like it, and if font has U+FFFD, show that instead.

Font functions that do not want this automatic replacement to
happen should return true from get_glyph() if unicode > 0x10FFFF.

Replaces https://github.com/behdad/harfbuzz/pull/27
2014-07-11 11:59:48 -04:00
Behdad Esfahbod 6f13b6d62d When parsing UTF-16, generate invalid codepoint for lonely low surrogate
Test passes now.
2014-07-10 19:39:39 -04:00
Behdad Esfahbod 6334495ac1 Use zh-Hans / zh-Hant when converting OT language tag to hb_language_t 2014-07-10 19:22:07 -04:00
Behdad Esfahbod f381e320df Fix lang matching logic
Previous code was broken logically, but harmless.
2014-07-10 19:20:35 -04:00
Behdad Esfahbod ee5350d667 Accept BCP 47 zh-Hans / zh-Hant language tags 2014-07-10 19:18:56 -04:00
Behdad Esfahbod 8b16ff1259 [uniscribe] Fix build after recent changes to Offset 2014-07-09 17:41:09 -04:00
Behdad Esfahbod 73f7f8919e Define _POSIX_C_SOURCE only if it is not defined
Fixes https://github.com/behdad/harfbuzz/pull/45
2014-07-09 17:17:18 -04:00
Behdad Esfahbod 0cd94491b9 [ucdn] Update to Unicode 7.0.0 data
From http://github.com/behdad/ucdn
2014-07-09 16:53:06 -04:00
Behdad Esfahbod 68f724484b [indic] Remove some more now-unused special-cases 2014-06-30 15:46:53 -04:00
Behdad Esfahbod e79c948980 [indic] Remove special-casing of U+1CF2,1CF3
These were introduced in a498565ced,
but IndicSyllabicCategory has had the correct value already, so the
special code was never needed.
2014-06-30 15:39:39 -04:00
Behdad Esfahbod d743ce78e1 [indic-table] Update to Unicode 7.0 data
Touch code just enough to preserve previous syllable structure
and functionality as closely as possible.  Many further cleanups
coming later.
2014-06-30 15:24:45 -04:00
Behdad Esfahbod 5fa21b3ab7 [indic-table] Fix category frequency counts in comments 2014-06-30 14:30:54 -04:00
Behdad Esfahbod 5c4e3e9a57 Whitespace 2014-06-30 14:25:18 -04:00
Behdad Esfahbod af528b6674 Fix typo; ouch! 2014-06-27 18:07:00 -04:00
Behdad Esfahbod 7d4ada66c9 Mark unsed members with a "Z" suffix
There may be more.  There are members that are by definition
redundant or reserved and not needed, NOT what we *currently*
don't use.

I'm sure there's more...
2014-06-27 17:32:56 -04:00
Behdad Esfahbod 23afcff1d1 [ot-font] Implement Unicode variation selectors 2014-06-27 17:22:36 -04:00
Behdad Esfahbod a5a4736916 [cmap] Implement subtable format 14 2014-06-27 17:22:31 -04:00
Behdad Esfahbod 586b60622c Minor: final bits of cleanup 2014-06-27 15:39:47 -04:00
Behdad Esfahbod 51d9ba09bc Minor 2014-06-27 15:27:15 -04:00
Behdad Esfahbod 3084767e92 Minor: Remove LongArrayOf 2014-06-27 15:24:35 -04:00
Behdad Esfahbod 41ea594950 Minor: Remove LongSortedArrayOf 2014-06-27 15:23:18 -04:00
Behdad Esfahbod bb6ecf2ce5 Minor: Remove LongOffsetArrayOf and LongOffsetLongArrayOf 2014-06-27 15:21:08 -04:00
Behdad Esfahbod 99d2817123 Minor: Remove GenericOffset 2014-06-27 15:19:15 -04:00
Behdad Esfahbod 9da552dcc5 Minor: Remove some GenericXXX templates 2014-06-27 15:18:36 -04:00
Behdad Esfahbod 36073ede5b Minor: Reorder template parameter order 2014-06-27 15:18:26 -04:00
Behdad Esfahbod 0394ec1bfb Minor: Introduce GenericOffset 2014-06-27 15:18:08 -04:00
Behdad Esfahbod 0d1b3419a7 Minor: Use template parameter default values for OffsetTo 2014-06-27 15:17:47 -04:00
Behdad Esfahbod 546b1adcdc Minor: Use template parameter default values for hb_prealloced_array_t 2014-06-27 15:17:01 -04:00
Behdad Esfahbod 911ca38645 Add back API removed recently
Add hb_ot_layout_language_get_required_feature_index() again, which
is used in Pango.  This was removed in
da13293798 in favor of
hb_ot_layout_language_get_required_feature().

API changes:

  - Added hb_ot_layout_language_get_required_feature_index back.
2014-06-24 10:20:36 -06:00
Behdad Esfahbod 89e4946929 Add new IndicSyllabicCategory short forms for Unicode 7.0 2014-06-22 11:32:13 -06:00
Behdad Esfahbod dcee838e89 Minor 2014-06-22 11:29:59 -06:00
Behdad Esfahbod f2ad86e605 [indic-table-gen] Minor 2014-06-21 15:31:10 -06:00
Behdad Esfahbod 2ec62279aa [indic-table] Update to Unicode 6.3.0
Was from 6.2.0.  It's a no-op.  Committing for the record.
2014-06-21 15:25:59 -06:00
Behdad Esfahbod 5d4d7384ef Minor: format 2014-06-21 14:53:21 -06:00
Behdad Esfahbod 44243ae590 [arabic-table] Update to Unicode 7.0
Old table was from 6.2.  Remove hard-coded Mongolian and Phags-pa data.
This completes support for new scripts Manichian and Psaltar Pahlavi.
2014-06-21 14:19:34 -06:00
Behdad Esfahbod cd86ab9b4f [arabic-table] Add ZWJ/ZWNJ now that table is segmented 2014-06-21 14:16:54 -06:00
Behdad Esfahbod 2390d9b67e [arabic-table] Further tune
In anticipation of Unicode 7.0 data coming in the next commit.
2014-06-21 14:07:02 -06:00
Behdad Esfahbod a133e6067a [indic-table] Minor 2014-06-20 18:01:34 -04:00
Behdad Esfahbod b900fa2c8c [arabic-table] Use segmented table
No functional change.
2014-06-20 17:59:43 -04:00
Behdad Esfahbod c2e1134046 [indic-table] Make output stable 2014-06-20 17:57:03 -04:00
Behdad Esfahbod 55abfbd2ac [indic-table] Minor
No output change.
2014-06-20 16:47:43 -04:00
Behdad Esfahbod f886707490 [arabic-table] Don't write comments
No functional change.
2014-06-20 16:30:10 -04:00
Behdad Esfahbod 200dfe3eb1 [arabic-table] Use short names for values
No functional change.
2014-06-20 16:20:59 -04:00
Behdad Esfahbod 3f5327a41e [arabic-table] Read Blocks.txt and shuffle code around
No functional change.
2014-06-20 16:17:42 -04:00
Behdad Esfahbod 171f970e4f [indic-table] Black-list Thai, Lao, and Tibetan
We don't need Indic table for those.
2014-06-20 15:30:29 -04:00
Behdad Esfahbod 65ac2dae4f [indic-table] Speed up lookup 2014-06-20 15:29:38 -04:00
Behdad Esfahbod 64442a3f4c [indic-table] Fix compiler warning 2014-06-20 15:29:21 -04:00
Behdad Esfahbod 0436e1d505 [indic-table] Make table more compact by not covering full blocks
-#define indic_offset_total 4416
+#define indic_offset_total 3816

-}; /* Table occupancy: 60% */
+}; /* Table occupancy: 69% */
2014-06-20 15:28:38 -04:00
Behdad Esfahbod 190a251479 [indic-table] Remove block range from data table
No functional change.
2014-06-20 14:42:03 -04:00
Behdad Esfahbod 2b051c6057 Rename HB_VERSION_CHECK and hb_version_check to "atleast"
HB_VERSION_CHECK's comparison was originally written wrongly
by mistake.  When API tests were written, they were also written
wrongly to pass given the wrong implementation... Sigh.

Given the purpose of this API, there's no point in fixing it
without renaming it.  As such, rename.

API changes:

  HB_VERSION_CHECK -> HB_VERSION_ATLEAST
  hb_version_check -> hb_version_atleast
2014-06-20 14:09:57 -04:00
Behdad Esfahbod cabfa538ed Adjust unused doc symbols 2014-06-20 14:02:30 -04:00
Jonathan Kew da13293798 Rework handling of requiredFeature to solve problem with rlig in arial.ttf from winxp
https://bugzilla.mozilla.org/show_bug.cgi?id=986802
Fixes https://github.com/behdad/harfbuzz/pull/39

API Change:

-hb_ot_layout_language_get_required_feature_index
+hb_ot_layout_language_get_required_feature

New API takes an extra pointer argument.  Pass NULL in to get
behavior of previous API.

Reworked by behdad
2014-06-19 16:33:48 -04:00
Behdad Esfahbod df554af99d Rename search() to bsearch() and lsearch()
Such that the complexity of the algorithm used is clear at
call site.
2014-06-19 15:39:18 -04:00
Behdad Esfahbod fb8cc86ff9 Rename sort() to qsort()
In an effort to make the algorithm used clear.
2014-06-19 15:31:09 -04:00
Behdad Esfahbod 577ca48143 [unicode7] Update list of Default_Ignorable codepoints 2014-06-18 12:29:23 -04:00
Behdad Esfahbod 7cfee38276 [unicode7] Route Manichaean and Psalter Pahlavi through Arabic shaper
Still needs update to joining table to fully work.
2014-06-18 12:22:45 -04:00
Behdad Esfahbod a4a7899cd9 [unicode7] Mark right-to-left scripts 2014-06-18 12:22:45 -04:00
Behdad Esfahbod 62587bfc51 [unicode7] Declare Unicode 7 scripts 2014-06-18 12:22:45 -04:00
Behdad Esfahbod dc61294aa9 [unicode7] Add missing ISO 15924 tags 2014-06-18 12:22:45 -04:00
Behdad Esfahbod 7526373e70 [coretext] Remove unused var 2014-06-17 11:45:26 -04:00
Jonathan Kew 798e4185bc When zeroing mark widths for LTR, also adjust offset...
...so that they overstrike preceding glyph.

https://github.com/behdad/harfbuzz/pull/43
2014-06-12 18:34:15 -04:00
Jonathan Kew 80f7405a52 [Thai] set the correct general category on Nikhahit when decomposing Sara-Am. 2014-06-12 18:25:58 -04:00
Behdad Esfahbod 1d634cbb4b Fix base-position when 'pref' is NOT formed
If pre-base reordering Ra is NOT formed (or formed and then
broken up), we should consider that Ra as base.  This is
observable when there's a left matra or dotreph that positions
before base.

Now, it might be that we shouldn't do this if the Ra happend
to form a below form.  We can't quite deduce that right now...

Micro test added.  Also at:

https://code.google.com/a/google.com/p/noto-alpha/issues/detail?id=186#c29
2014-06-12 17:10:35 -04:00
Behdad Esfahbod 04dc52fa15 [indic] Recover OT_H undergone ligation and multiplication
Sometimes font designers form half/pref/etc consonant forms
unconditionally and then undo that conditionally.  Try to
recover the OT_H classification in those cases.

No test number changes expected.
2014-06-09 14:20:06 -04:00
Behdad Esfahbod 39c8201f8e [indic] Improve base re-finding
No test numbers change.
2014-06-09 14:20:06 -04:00
Behdad Esfahbod c04d5f0dd2 [indic] Minor 2014-06-09 14:20:06 -04:00
Behdad Esfahbod 832a6f99b3 [indic] Don't reorder reph/pref if ligature was expanded
Normally if you want to, say, conditionally prevent a 'pref', you
would use blocking contextual matching.  Some designers instead
form the 'pref' form, then undo it in context.  To detect that
we now also remember glyphs that went through MultipleSubst.

In the only place that this is used, Uniscribe seems to only care
about the "last" transformation between Ligature and Multiple
substitions.  Ie. if you ligate, expand, and ligate again, it
moves the pref, but if you ligate and expand it doesn't.  That's
why we clear the MULTIPLIED bit when setting LIGATED.

Micro-test added.  Test: U+0D2F,0D4D,0D30 with font from:

[1]
https://code.google.com/a/google.com/p/noto-alpha/issues/detail?id=186#c29
2014-06-05 20:36:01 -04:00
Behdad Esfahbod b5be231720 [gsub] Adjust single-length ligature subst to act like single subst 2014-06-05 19:00:22 -04:00
Behdad Esfahbod aae69451df [gsub] Minor shuffling 2014-06-05 19:00:08 -04:00
Behdad Esfahbod b6b304f12b [ot] Add TODO re zero-len MultipleSubst sequences 2014-06-05 17:12:54 -04:00
Behdad Esfahbod f1a72fe7bf [ot-font] Fix cmap EncodingRecord cmp order 2014-06-04 19:03:16 -04:00
Behdad Esfahbod ce34f0b07e [ot-font] Use binary search for format12 cmap subtable 2014-06-04 18:57:46 -04:00
Behdad Esfahbod 257d1adfa1 [ot-font] Work around broken cmap subtable format 4 length
Roboto was hitting this.  FreeType also has pretty much the
same code for this, in ttcmap.c:tt_cmap4_validate():

    /* in certain fonts, the `length' field is invalid and goes */
    /* out of bound.  We try to correct this here...            */
    if ( table + length > valid->limit )
    {
      if ( valid->level >= FT_VALIDATE_TIGHT )
        FT_INVALID_TOO_SHORT;

      length = (FT_UInt)( valid->limit - table );
    }
2014-06-04 18:47:55 -04:00
Behdad Esfahbod 51f563579b Move try_set to sanitize context 2014-06-04 18:42:32 -04:00
Behdad Esfahbod 500737e8e1 [ot-font] Don't select a Null cmap subtable
Can happen either in broken fonts, or as a result of sanitize().
2014-06-04 18:17:29 -04:00
Behdad Esfahbod dac86026a6 Fix some cppcheck warnings
Bug 77800 - cppcheck reports
2014-06-03 17:57:00 -04:00
Behdad Esfahbod c306410cab Bug 77732 - Fix unused typedef warning for ASSERT_STATIC with GCC 4.8 2014-06-03 17:00:07 -04:00
Behdad Esfahbod ae2b854eab Move code around 2014-06-03 16:59:09 -04:00
Behdad Esfahbod 17c3b809f4 [indic] Treat U+A8E0..A8F1 as OT_A instead of OT_VD
Apparently they can intermix with other OT_A.

Test: U+0915,A8E2,1CD0
2014-06-02 15:08:18 -04:00
Behdad Esfahbod 6ae13f257c [graphite2] Fix cluster mapping
Patch from Martin Hosken.  I expect this to fix the following bugs:

https://bugs.freedesktop.org/show_bug.cgi?id=75076
https://bugzilla.gnome.org/show_bug.cgi?id=723582
https://bugzilla.redhat.com/show_bug.cgi?id=998812
2014-05-30 17:38:14 -04:00
Behdad Esfahbod 7977ca17aa [indic] Allow decimal and Brahmi digits as placeholders
Tests: U+0967,0951 U+0031,093F
2014-05-29 15:34:26 -04:00
Behdad Esfahbod e8b5d64039 [indic] Do NOT allow reph formation on placeholders
Only allow it on DOTTED CIRCLE.  No effect on test numbers.

Test: U+0930,094D,00A0
2014-05-29 15:20:15 -04:00
Behdad Esfahbod 52b562a6a0 [indic] Clean up a bit
No functional change intended.
2014-05-27 18:19:52 -04:00
Behdad Esfahbod 3bf652b907 [indic] Treat U+002D and U+2010..2014 as placeholders 2014-05-27 18:07:26 -04:00
Behdad Esfahbod e0de95f402 [indic] Treat U+00D7 MULTIPLICATION SIGN as placeholder 2014-05-27 17:58:34 -04:00
Behdad Esfahbod cf78dd483c [indic/myanmar] Rename OT_NBSP to OT_PLACEHOLDER 2014-05-27 17:53:37 -04:00
Behdad Esfahbod 186ece94c8 [myanmar] Use OT_NBSP instead of OT_DOTTEDCIRCLE for OT_GB
No functional change.
2014-05-27 17:49:45 -04:00
Behdad Esfahbod cf71d28c38 [indic/myanmar] Refactor a few macros 2014-05-27 17:47:43 -04:00
Behdad Esfahbod 2307268e01 [indic] Treat U+0A72..0A73 like regular consonants
Unicode 6.x IndicSyllableCategory categorizes them as
placeholders, but they can subjoin.
2014-05-27 17:39:01 -04:00
Behdad Esfahbod e9b2a4cfe5 [indic] Support U+1CED 2014-05-23 15:49:10 -04:00
Behdad Esfahbod d19f8e8570 [indic] Support U+A8F2..A8F7,1CE9..1CEC,1CEE..1CF1 2014-05-23 15:47:36 -04:00
Behdad Esfahbod ddbdfcbf1c [indic] Simplify grammar
No functional change.
2014-05-23 15:39:55 -04:00
Behdad Esfahbod 4e9b1f662b [indic] Always start new syllable for Avagraha
In fact, the previous grammar was ambigious.  No functional
change.
2014-05-23 15:38:42 -04:00
Behdad Esfahbod 9f9bd9bf31 [indic] Rename avagraha cluster to symbol cluster
In anticipation of adding more characters to that class of clusters.
2014-05-23 15:35:38 -04:00
Behdad Esfahbod a498565ced [indic] Support U+1CF2,U+1CF3 2014-05-22 19:39:56 -04:00
Behdad Esfahbod ecb98babba [indic] Support U+1CE2..U+1CE8 2014-05-22 19:36:21 -04:00
Behdad Esfahbod 37bf2c9224 Minor 2014-05-22 19:35:17 -04:00
Behdad Esfahbod 131e17ff9a [indic] Support U+1CF5,1CF6 2014-05-22 19:33:10 -04:00
Behdad Esfahbod 72ead0cc72 [indic] Treat U+1CE1 as a tone-mark too
It's spacing, but otherwise the same as the other ones.
2014-05-22 19:12:10 -04:00
Behdad Esfahbod e848bfae7c [indic] Recategorize U+A8E0..A8F1 as OT_VD
Up to two of them come after all OT_A characters.
2014-05-22 18:50:34 -04:00
Behdad Esfahbod c519536c34 [indic] Allow up to three tone marks
According to Roozbeh, there are valid combinations in Unicode
proposals for up to three.  Previously we were allowing up to two.
2014-05-22 18:43:14 -04:00
Behdad Esfahbod c11fc68339 [indic] Support more extended Devanagari tone marks
Also adjust U+0953,0954 handling.
2014-05-22 18:41:49 -04:00
Behdad Esfahbod 26c836e53d [indic] Handle "Cantillation marks for the Samaveda" 2014-05-21 18:35:48 -04:00
Behdad Esfahbod 29531128f2 [indic] Improve reph formation of Sinhala and Telugu
Sinhala and Telugu use "explicit" reph.  That is, the reph is formed by
a Ra,H,ZWJ sequence.  Previously, upon detecting this sequence, we were
checking checking whether the 'rphf' feature applies to the first two
glyphs of the sequence.  This is how the Microsoft fonts are designed.
However, testing with Noto shows that apparently Uniscribe also forms
the reph if the lookup ligates all three glyphs.  So, try both
sequences.

Doesn't affect test results for Sinhala or Telugu.

https://code.google.com/a/google.com/p/noto-alpha/issues/detail?id=232
2014-05-15 14:04:02 -06:00
Oleg Oshmyan 8c703f13bf Fix build with --coretext on older OS X
Fixes https://github.com/behdad/harfbuzz/pull/40
2014-05-14 17:42:20 -06:00
Behdad Esfahbod 439b05867c [myanmar] Allow MedialYa+Asat in the grammar
The grammar in the OT spec, and the existing Windows implementation
seem to be confused around where to allow Asat around the medial
consonants.

The previous grammar for medial group was allowing an Asat after
the medial group only if there was a medial Wa or Ha, but not if
there was only a medial Ya.  This doesn't make sense to me and
sounds reversed, as both medial Wa and Ha are below marks while
Asat is an above mark.  An Asat can come before the medial group
already (in fact, multiple ones can.  Why?!).  The medial Ya
however is a spacing mark and according to Roozbeh it's valid
to want an Asat on the medial Ya instead of the base, so it looks
to me like we want to allow an Asat after the medial group if
there *was* a Ya but not if there wasn't any.  Not wanting to
produce dotted-circle where Windows is not, this commit changes
the grammar to allow one Asat after the medial group no matter
what comes in the group.

Test: U+1002,103A,103B vs U+1002,103B,103A
2014-05-14 16:44:39 -06:00
Behdad Esfahbod c95587618c [ot] Minor note re cmap subtable format 2 and 8 2014-05-14 00:42:18 -04:00
Behdad Esfahbod b7878cd58e [ot] Implement cmap subtable format 0 2014-05-13 21:47:51 -04:00
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