Behdad Esfahbod
85fc6c483f
[Indic] Move more stuff to the shape_plan
...
Almost done. Need to add per-script static tables.
2012-08-02 12:21:44 -04:00
Behdad Esfahbod
914ffaa40f
[Indic] Move more repeated work into shape_plan
2012-08-02 11:05:32 -04:00
Behdad Esfahbod
a8c6da90f4
[OT] Add per-complex-shaper shape_plan data
...
Hookup some Indic data to it. More to come.
2012-08-02 10:46:34 -04:00
Behdad Esfahbod
8bb5deba96
[OT] Pipe shape_plan down to pause_callbacks
2012-08-02 10:07:58 -04:00
Behdad Esfahbod
3e38c0f288
More massaging
2012-08-02 09:44:18 -04:00
Behdad Esfahbod
16c6a27b4b
[OT] Port complex_shaper to planner/plan
2012-08-02 09:38:28 -04:00
Behdad Esfahbod
5393e3a62b
[OT] Minor refactoring
2012-08-02 09:24:35 -04:00
Behdad Esfahbod
24eacf17c8
[Indic] Move consonant-position-setting into initial_reordering()
2012-08-02 08:42:51 -04:00
Behdad Esfahbod
afbcc24be0
[GSUB] Wire the font, not just the face, down to substitute()
...
We need the font for glyph lookup during GSUB pauses in Indic shaper.
Could perhaps be avoided, but at this point, we don't mean to support
separate substitute()/position() entry points (anymore), so there is
no point in not providing the font to GSUB.
2012-08-02 08:36:40 -04:00
Behdad Esfahbod
b0e6a26a10
[OT] Hide some API
...
It was impossible to meaningfully use them from the outside these days.
2012-08-02 08:11:14 -04:00
Behdad Esfahbod
305246744e
Minor
2012-08-02 08:08:04 -04:00
Behdad Esfahbod
8ef3d53255
[Indic] More refactoring of consonant position peeking in the font
...
To be moved to initial_reordering next...
2012-08-02 07:59:19 -04:00
Behdad Esfahbod
3eb6f81fd3
[Indic] Refactor
...
Move all the logic that needs to eventually move into the indic table
into hb-ot-shape-complex-indic-private.hh.
2012-08-02 07:38:39 -04:00
Behdad Esfahbod
3614ba242f
[Indic] Rename
2012-08-02 07:23:42 -04:00
Behdad Esfahbod
610e5e8f71
[Indic] Streamline feature would_apply()
...
Comes with some 10% speedup for Devanagari even!
2012-08-02 05:41:18 -04:00
Behdad Esfahbod
1d002048d5
[Indic] Minor
2012-08-02 05:02:53 -04:00
Behdad Esfahbod
6f76113755
[GSUB/GPOS] Check array size before accessing digests
2012-08-02 04:00:31 -04:00
Behdad Esfahbod
22148b8c4a
Use Coverage digests in would_apply
2012-08-02 03:51:51 -04:00
Behdad Esfahbod
6c459c8fef
Minor
2012-08-02 03:45:53 -04:00
Behdad Esfahbod
e2b8d75fa6
Use wider set digests on 64-bit archs
2012-08-01 22:17:48 -04:00
Behdad Esfahbod
0120ce9679
[GSUB/GPOS] Remove unused get_coverage() methods
2012-08-01 21:56:35 -04:00
Behdad Esfahbod
1336ecdf8e
[GSUB/GPOS] Use Coverage digests as gatekeeper
...
Gives me a good 10% speedup for the Devanagari test case. Less so
for less lookup-intensive tests.
For the Devanagari test case, the false positive rate of the GSUB digest
is 4%.
2012-08-01 21:46:36 -04:00
Behdad Esfahbod
a878c58a8f
[GSUB/GPOS] Add add_coverage()
2012-08-01 21:46:19 -04:00
Behdad Esfahbod
60a3035ac5
Add hb_set_digest_t
...
Implement two set digests, and one that combines the two.
2012-08-01 21:46:19 -04:00
Behdad Esfahbod
c8accf1dd2
[OT] Templatize Coverage::add_coverage()
2012-08-01 21:05:57 -04:00
Behdad Esfahbod
8fbfda920e
Inline font getters
2012-08-01 19:03:46 -04:00
Behdad Esfahbod
6adf417bc1
Use a lookup table for modified_combining_class
2012-08-01 18:07:42 -04:00
Behdad Esfahbod
208f70f055
Inline Unicode callbacks internally
2012-08-01 17:13:10 -04:00
Behdad Esfahbod
7470315a3e
Move unicode accessors around
2012-08-01 17:01:59 -04:00
Behdad Esfahbod
21fdcee001
Add hb_unicode_combining_class_t
2012-08-01 16:28:50 -04:00
Behdad Esfahbod
84186a6400
Add commentary on the compatibility decomposition in the normalizer
2012-08-01 13:32:39 -04:00
Behdad Esfahbod
0834d95201
[hb-old] Adjust mark positioning parameters
...
Fallback mark positioning works now... With hb-ft and hb-view /
hb-shape at least.
2012-08-01 00:21:09 -04:00
Behdad Esfahbod
4ca743dfb8
[old] Implement fontMetrics
2012-08-01 00:03:41 -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
a8842e4a44
Remove some TODO items
2012-07-31 23:17:23 -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
5fecd8b035
[OT] Synthesize glyph classes
2012-07-31 23:17:22 -04:00
Behdad Esfahbod
03b09214c0
[GSUB] Minor
2012-07-31 22:43:58 -04:00
Behdad Esfahbod
f0fc1df8fc
[hb-old] Implement getGlyphMetrics()
...
Still working on it.
2012-07-31 22:43:32 -04:00
Behdad Esfahbod
378d279bbf
Implement Unicode compatibility decompositions
...
Based on patch from Philip Withnall.
https://bugs.freedesktop.org/show_bug.cgi?id=41095
2012-07-31 21:36:16 -04:00
Behdad Esfahbod
321ec29cc2
Remove unused function
2012-07-31 21:10:16 -04:00
Behdad Esfahbod
69cc492dc1
[buffer] Minor
2012-07-31 14:51:36 -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
c2e42c3db6
Minor
2012-07-30 19:54:50 -04:00
Behdad Esfahbod
03f67bc012
More refactoring glyph class access
2012-07-30 19:47:53 -04:00
Behdad Esfahbod
300c7307eb
[OT] Don't crash if no GDEF available
2012-07-30 19:37:44 -04:00
Behdad Esfahbod
3dcbdc2125
Minor
2012-07-30 19:32:42 -04:00
Behdad Esfahbod
05bd1b6342
[GSUB/GPOS] Move glyph props matching around
2012-07-30 19:30:01 -04:00
Behdad Esfahbod
2fca1426ca
[GSUB] Don't erase glyph classes if GDEF does not have glyph classes
2012-07-30 18:46:41 -04:00
Behdad Esfahbod
fd42257f8c
Minor
2012-07-30 18:44:10 -04:00
Behdad Esfahbod
7fbbf86efe
[GSUB] Minor
2012-07-30 18:36:42 -04:00
Behdad Esfahbod
713914d320
[Uniscribe] Clean up a bit
2012-07-30 17:54:38 -04:00
Behdad Esfahbod
301168dae7
[CoreText] Port to shape_plan infrastructure
2012-07-30 17:48:04 -04:00
Behdad Esfahbod
6cdfd14bb1
Fix build on Mac
2012-07-30 17:22:17 -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
7afb14407e
[Indic] Recategorize Telugu length marks
...
Fixes 8 more Telugu tests. Failures at 15 (0.00154548%).
2012-07-30 13:54:46 -04:00
Behdad Esfahbod
f2377155e3
[hb-old] Fix misc leaks
...
Backport (forward-port?!) from upstream:
commit 3ab7b37bdebf0f8773493a1fee910b151c4de30f
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Mon Jul 30 10:50:22 2012 -0400
Fix misc leaks
https://bugs.freedesktop.org/show_bug.cgi?id=31992
https://bugs.freedesktop.org/show_bug.cgi?id=31993
https://bugs.freedesktop.org/show_bug.cgi?id=31994
https://bugs.freedesktop.org/show_bug.cgi?id=31995
2012-07-30 10:50:57 -04:00
Behdad Esfahbod
3f4764bb56
Don't lock user_data set during destruction if empty
2012-07-30 10:06:42 -04:00
Behdad Esfahbod
4ba647eecf
Fix leak
2012-07-30 09:53:06 -04:00
Behdad Esfahbod
f860366456
[OT] Gain back some lost speed
2012-07-30 03:16:38 -04:00
Behdad Esfahbod
11f4c87d01
[OT] Remove hb_ot_layout_ensure()
...
I didn't like it from the beginning.
2012-07-30 02:36:46 -04:00
Behdad Esfahbod
578e42182b
Minor
2012-07-30 02:35:07 -04:00
Behdad Esfahbod
a973b5ce86
[GSUB] Further adjustments to mark-attachment vs ligation interaction
...
The d1d69ec52e
change broke Kannada badly,
since it was ligating consonants, pushing matra out, and then ligating
with the matra. Adjust for that. See comments.
2012-07-30 01:47:46 -04:00
Behdad Esfahbod
0aef425e25
[GSUB] Minor
2012-07-30 00:55:15 -04:00
Behdad Esfahbod
d1d69ec52e
[GSUB] Don't ligate glyphs attached to different components of ligatures
...
This concludes the mark-attachment vs ligating interaction fixes (for now).
2012-07-30 00:51:47 -04:00
Behdad Esfahbod
4751dec8be
Minor
2012-07-30 00:42:07 -04:00
Behdad Esfahbod
f24bcfbed1
Minor
2012-07-30 00:39:00 -04:00
Behdad Esfahbod
fe20c0f84f
[GSUB] Fix mark component stuff when ligatures form ligatures!
...
See comments.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=437633
2012-07-30 00:00:59 -04:00
Behdad Esfahbod
2ec3ba46a3
[GSUB/GPOS] Minor
...
Start squeezing more out of lig_id/lig_comp.
2012-07-29 22:16:15 -04:00
Behdad Esfahbod
ef6e9cec33
Fixup bb0e4ba3e9
2012-07-29 21:35:22 -04:00
Behdad Esfahbod
cb3d340631
[GSUB] Don't set new lig_id on mark ligatures
...
If two marks form a ligature, retain their previous lig_id, such that
the mark ligature can attach to ligature components...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676343
In fact, I noticed that we should not let ligatures form between glyphs
coming from different components of a previous ligature. For example,
if the sequence is: LAM,SHADDA,LAM,FATHA,HEH, the LAM,LAM,HEH form a
ligature, putting SHADDA and FATHA next to eachother. However, it would
be wrong to ligate them. Uniscribe has this bug also.
2012-07-29 20:37:38 -04:00
Behdad Esfahbod
a15b70a81a
[hb-old] Fix cluster formation in RTL
...
Unlike Uniscribe, hb-old returns glyphs in logical order, so the logic
does not need to duplicated for RTL.
2012-07-29 20:09:22 -04:00
Behdad Esfahbod
8a7e70ef65
[Minor]
2012-07-29 19:56:54 -04:00
Behdad Esfahbod
bb0e4ba3e9
Minor
2012-07-29 17:34:14 -04:00
Behdad Esfahbod
a00ad60bc0
[Uniscribe] Remove hb_uniscribe_font_ensure()
...
Wasn't a huge fan of putting the burden on the user. Just remove it and
do what we've got to do transparently.
2012-07-28 21:16:08 -04:00
Behdad Esfahbod
5d874d566f
[GPOS] Fix mark-to-mark positioning when one of the marks is a ligature
...
This commit: a3313e5400
broke MarkMarkPos
when one of the marks itself is a ligature. That regressed 26 Tibetan
tests (up from zero!). Fix that. Tibetan back to zero.
2012-07-28 21:05:25 -04:00
Behdad Esfahbod
338fe662b5
[GSUB] Minor
2012-07-28 18:53:01 -04:00
Behdad Esfahbod
e6f7479fe3
[GSUB] Simplify would-apply
2012-07-28 18:34:58 -04:00
Behdad Esfahbod
dadede012e
Minor
2012-07-28 18:13:09 -04:00
Behdad Esfahbod
0b99429ead
[GSUB/GPOS] Add get_coverage() and use it to speed up main loop
...
And use it to speed up the hotspot by checking coverage directly in
the main loop, not 10 functions deep in.
Gives me a solid 20% boost with Indic test suite. Less so for less
lookup-intensive scenarios.
Remove the "fast_path" hack from before.
2012-07-28 17:46:35 -04:00
Behdad Esfahbod
30ec9002d8
Reject lookups with no subTable
2012-07-28 17:25:20 -04:00
Behdad Esfahbod
0981068b75
[GSUB/GPOS] Reject Context/ChainContext lookups with zero input
2012-07-28 17:01:59 -04:00
Behdad Esfahbod
2f87cebe10
Implement shape_plan caching
...
Should give us some performance boost.
2012-07-27 04:20:39 -04:00
Behdad Esfahbod
e9eb9503e9
Add default_shaper_list to shape_plan
2012-07-27 03:16:22 -04:00
Behdad Esfahbod
3b7c4e2706
Don't fail choosing shaper on planning failure
...
Shapers have a chance to reject a font in face shaper_data creation.
No need to allow failing during planning.
2012-07-27 03:12:23 -04:00
Behdad Esfahbod
cfe9882610
Add hb_ot_layout_ensure() and hb_uniscribe_font_ensure()
2012-07-27 03:06:30 -04:00
Behdad Esfahbod
c5b668fb92
Choose one shaper per plan
2012-07-27 02:49:39 -04:00
Behdad Esfahbod
e82061e8db
Move ot shaper completely to shape_plan
2012-07-27 02:29:32 -04:00
Behdad Esfahbod
ea278d3895
Partially switch ot shaper to shape_plan
2012-07-27 02:12:28 -04:00
Behdad Esfahbod
b6b7ba1313
Switch old and uniscribe backends to shape_plan
2012-07-27 01:37:18 -04:00
Behdad Esfahbod
c32c096a42
Switch to shape_plan
...
Not optimized yet. Eats babies. And no shaper uses the shape_plan.
2012-07-27 01:13:53 -04:00
Behdad Esfahbod
5b95c148cc
Start implementing shape_plan
2012-07-27 01:02:24 -04:00
Behdad Esfahbod
bd26b4d21f
Minor
2012-07-26 22:18:24 -04:00
Behdad Esfahbod
027857d041
Start adding a unified shaper access infrastructure
...
Add global shape_plan. Unused so far.
2012-07-26 21:14:02 -04:00
Behdad Esfahbod
fa2dfcd560
Fix visibility warnings with MinGW32
2012-07-26 16:06:16 -04:00
Jonathan Kew
ac2085d4b3
[CoreText] Ensure cluster indices in output buffer are non-decreasing.
...
Does not provide Uniscribe-compatible results, but should at least avoid
breaking hb-view due to out-of-order cluster values.
For RTL runs, ensure cluster values are non-increasing (instead of
non-decreasing).
2012-07-26 15:58:45 -04:00
Behdad Esfahbod
441d3bb7de
Minor
2012-07-26 12:01:12 -04:00
Behdad Esfahbod
2e7f223054
[hb-old] Fix Arabic cursive positioning
...
Backporting from upstream:
commit b847f24ce855d24f6822bcd9c0006905e81b94d8
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Wed Jul 25 19:29:16 2012 -0400
[arabic] Fix Arabic cursive positioning
This was clearly broken in testing. Who knows... Fixes for me.
Test with a Nastaleeq font, or with Arabic Typesetting.
Backporting from Chromium.
2012-07-25 19:30:15 -04:00
Behdad Esfahbod
9550a8c4e8
[hb-old] Fixup not-enough-space handling
2012-07-25 19:22:57 -04:00
Behdad Esfahbod
91e721ea86
[hb-old] Fix clusters
...
Unlike its "documentation", hb-old's log_clusters are, well, indeed
logical, not visual. Fixup. Adapted / copied from hb-uniscribe.
2012-07-25 19:20:34 -04:00