Commit Graph

92 Commits

Author SHA1 Message Date
Behdad Esfahbod 16c6a27b4b [OT] Port complex_shaper to planner/plan 2012-08-02 09:38:28 -04:00
Behdad Esfahbod 1e7d860613 [GPOS] Adjust mark advance-width zeroing logic
If there is no GPOS, zero mark advances.

If there *is* GPOS and the shaper requests so, zero mark advances for
attached marks.

Fixes regression with Tibetan, where the font has GPOS, and marks a
glyph as mark where it shouldn't get zero advance.
2012-07-31 23:41:06 -04:00
Behdad Esfahbod 2bc3b9a616 [OT] Zero mark advances if the shaper desires so
Enabled for all shapers except for Indic.
2012-07-31 23:17:22 -04:00
Behdad Esfahbod 693918ef85 [OT] Streamline complex shaper enumeration
Add a shaper class struct.
2012-07-30 21:08:51 -04:00
Behdad Esfahbod 7e34601ded Unbreak Hangul jamo composition
When we removed the separate Hangul shaper, the specific normalization
preference of Hangul was lost.  Fix that.  Also, the Thai shaper was
copied from Hangul, so had the fully-composed normalization behavior,
which was unnecessary.  So, fix that too.
2012-07-30 14:53:41 -04:00
Behdad Esfahbod f860366456 [OT] Gain back some lost speed 2012-07-30 03:16:38 -04:00
Behdad Esfahbod d8942dcbb4 Apply Tibetan (global) features.
Fixes all Tibetan failures.  All 180k of them!

Merges back Hangul into the default shaper.
2012-07-18 16:34:10 -04:00
Behdad Esfahbod d96838ef95 Allow complex shapers overriding common features
In a new callback...  Currently unused by all complex shapers.
2012-07-16 20:26:57 -04:00
Behdad Esfahbod 0594a24484 Cleanup TRUE/FALSE vs true/false 2012-06-05 20:35:40 -04:00
Behdad Esfahbod 7f852b644b Fix compiler warnings 2012-05-11 23:10:31 +02:00
Behdad Esfahbod cee7187447 [Indic] Move syllable tracking from Indic to generic layer
This is to incorporate it into GSUB/GPOS processing.
2012-05-11 11:41:39 +02:00
Behdad Esfahbod ef24cc8c8e [Indic] Towards multi-cluster syllables and final reordering 2012-05-09 18:10:20 +02:00
Behdad Esfahbod d1deaa2f5b Replace zerowidth invisible chars with a zero-advance space glyph
Like Uniscribe does.
2012-05-09 15:04:13 +02:00
Behdad Esfahbod 5b12609093 Minor 2012-05-09 12:37:27 +02:00
Behdad Esfahbod acd88e659f In Arabic fallback shaping, check that the font has glyph for new char 2012-04-10 18:02:20 -04:00
Behdad Esfahbod 3b26f96ebe Add Thai shaper that does SARA AM decomposition / reordering
That's not in the OpenType spec, but it's what MS and Adobe do.
2012-04-10 10:52:07 -04:00
Behdad Esfahbod c9a841f445 Add simple Hangul shaper that recomposes Jamo when feasible
Previously, we were NOT actually recomposing Hangul Jamo.  We do now.
The two lines in:

test/shaping/texts/in-tree/shaper-default/script-hangul/misc/misc.txt

Now render the same with the UnDotum.ttf font.  Previously the second
linle was rendering boxes.

We can also start applying OpenType Jamo features later.  At this time,
I have no idea how the 'ljmo', 'vjmo', 'tjmo' features are supposed to
work.  Maybe someone can explain them to me?
2012-04-07 15:06:55 -04:00
Behdad Esfahbod 11138ccff7 Add normalize mode
In preparation for Hangul shaper.
2012-04-05 17:25:19 -04:00
Behdad Esfahbod cad3821f3d More sorting by Unicode version
This is the most convenient way to browse scripts.
2012-03-07 17:13:25 -05:00
Behdad Esfahbod 317b9504d7 Minor 2012-03-07 16:51:29 -05:00
Behdad Esfahbod f91136cb52 Route three Unicode 6.1 scripts through Indic shaper 2012-03-07 12:56:22 -05:00
Behdad Esfahbod 183224684a Use generic shaper for Buhid
As requested by Jonathan Kew.

We need to devise a better mechanism to choose which scripts to
pass through the Indic shaper.  Moreover, currently we are storing
data for some scripts in the Indic shaper that are not even going
through that shaper.  Need to find a better way...
2012-03-07 12:21:28 -05:00
Behdad Esfahbod 7a4a848db2 Minor 2012-01-19 15:15:21 -05:00
Behdad Esfahbod e8eedf2687 Avoid enum trailing commas
Based on patch from Jonathan Kew.
2012-01-16 16:39:40 -05:00
Behdad Esfahbod bc187e5ac7 Refine Indic scripts, following Martin Hosken's recommendation 2011-09-08 13:35:17 -04:00
Behdad Esfahbod c605bbbb6d Remove C++ guards from source files
Where causing issues for people with MSVC.
2011-08-04 20:00:53 -04:00
Behdad Esfahbod b65c06025d Formalize buffer var allocations 2011-07-28 16:49:29 -04:00
Behdad Esfahbod 02cdf743c2 Add prefer_decomposed() complex-shaper callback
This allows the Indic shaper to request decomposed characters.  This will
handle split matra for free.  Other shapers prefer precomposed
characters.
2011-07-21 12:23:12 -04:00
Behdad Esfahbod d05dded167 More code generation through preprocessor 2011-07-07 23:43:47 -04:00
Behdad Esfahbod 3361c9a323 Minor 2011-07-07 22:35:17 -04:00
Behdad Esfahbod 76f76812ac Shuffle code around, remove shape_plan from complex shapers 2011-07-07 22:25:25 -04:00
Behdad Esfahbod e88bff9b4d Minor, use function typedefs 2011-07-07 22:03:02 -04:00
Behdad Esfahbod 359dcaa0d3 Update copyright headers 2011-07-07 21:55:05 -04:00
Behdad Esfahbod b9ddbd5593 [Indic] Start an Indic shaper
Nothing functional in there yet.

So far, we're parsing IndicSyllabicCategory.txt and IndicMatraCategory.txt
fils from Unicode Character Database and store them in an array to be used
by the shaper.  Also hooked up the shaper, but it does not do anything
right now.
2011-06-02 17:43:12 -04:00
Behdad Esfahbod 90645fb24b [OT] Separate map_builder from the actual map
Respectively, separate planner from the actual plan.
2011-05-27 18:13:31 -04:00
Behdad Esfahbod 2409d5f8d7 Update Copyright headers 2011-04-21 17:14:28 -04:00
Behdad Esfahbod c57d454acc Rename all private sources and headers to C++ files
So we can liberally use the simple features of C++ that parts of the
codebase is already using.
2011-04-20 18:50:27 -04:00
Behdad Esfahbod 62879eebd9 [API] Use ISO 15924 tags for hb_script_t
This simplifies the code, reduces static data, and makes the design
more extensible to future additions of new scripts.
2011-04-18 23:40:21 -04:00
Behdad Esfahbod d86a5b3c57 Bug 32274 - classic mongolian shaper
Add support for classic Mongolian script to the Arabic shaper.

Still work to be done around U+180E MONGOLIAN VOWEL SEPARATOR as it
should not be included in the final glyph stream the same way that
ZWNJ, etc should not appear in the final glyph stream.

But the joining part should be done.

There remains the question of how should the U+18A9 MONGOLIAN LETTER ALI
GALI DAGALGA be handled as it has General Category NSM but a letter
nonetheless.  For now, our generic logic makes this a joining T instead
of joining D as other Mongolian letters are.
2010-12-21 18:36:25 -05:00
Behdad Esfahbod b0e7378fa9 Reroute Mandaic shaping through the Arabic shaper
We added Mandaic joining data to the Arabic shaper a while ago, but
were not actually using the Arabic shaper for Mandaic.  Fixed.
2010-12-21 14:19:32 -05:00
Behdad Esfahbod 13403bc67a Hookup Arabic shaper!
Not tested yet.
2010-10-12 17:23:54 -04:00
Behdad Esfahbod 49baa1f69e Add hb_ot_complex_shaper_t stuff and start hooking Arabic shaper up 2010-10-12 16:50:36 -04:00