Ebrahim Byagowi
9e7c9c3adb
Fix -Wunused-function on HB_NO_SHAPE_AAT
...
We should add a bot for it
Part of #1652
2019-05-14 15:58:51 +04:30
Behdad Esfahbod
809c587083
[config] Better compile away morx/kerx/trak
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-13 14:45:51 -07:00
Behdad Esfahbod
799c6a5081
[config] Add some
2019-05-10 23:56:40 -07:00
Behdad Esfahbod
2c93f0dee3
Add HB_NO_AAT
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-10 23:35:10 -07:00
Behdad Esfahbod
41248cce0e
Remove MIN/MAX in favor of hb_min/hb_max
2019-05-07 20:54:31 -07:00
Eric Muller
30d7c40f8c
Add a flag to hb_buffer_t to prevent the insertion of dotted circles on incorrect character sequences.
...
Current behavior unchanged if this flag is not set (and it isn't by default).
2019-03-11 16:06:41 -07:00
Behdad Esfahbod
fd0889f903
Comment
2019-01-24 16:12:52 +01:00
Behdad Esfahbod
9f31417733
Form cluster for Emoji sub-region tag sequences
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1556
2019-01-24 16:08:33 +01:00
Behdad Esfahbod
3ecda71041
Adjust mark offsets when zeroing from fallback mark positioning code
...
Adjust tests.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1532
2019-01-24 12:28:24 +01:00
Ebrahim Byagowi
e412008599
Remove redundant void from C++ sources ( #1486 )
2018-12-17 13:01:01 -05:00
Behdad Esfahbod
000d4b128e
Make shaper's override_features() override user features as well
...
The override_features is used to override features that are normally
discretionary features, but in a specific shaper are for various
reasons desired to be bolted on or off, because they've been used
for inherent shaping. As such, it makes sense that they also
override user features. Ie. if user turned 'liga' on, we don't
want Khmer shaping to become broken... Or turn 'clig' off...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1310
2018-11-29 12:32:47 -05:00
Behdad Esfahbod
748962264a
[aat] Disable mark advance zeroing if kern table has state-machines
...
Geeza Pro for example, relies on that for fancy mark positioning.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1405
2018-11-23 11:10:17 -05:00
Behdad Esfahbod
199a0f7b41
[ot-shape] Simplify logic
2018-11-22 17:31:07 -05:00
Behdad Esfahbod
014e4980ed
Move
2018-11-22 16:21:49 -05:00
Behdad Esfahbod
62890dee18
[aat] Zero mark advances if decided so even if there's cross-kerning
...
Cross-kerning can only take care of positioning vertically. It doesn't
adjust mark advance...
2018-11-22 16:20:29 -05:00
Behdad Esfahbod
a201fa74cd
[aat] Tweak fallback positioning logic when applying morx
...
Such that for Indic-like scripts (eg. Khmer), we don't do any fallback mark
advance-zeroing / positioning, but we do for Latin, etc. Reuses preferences
of our script-specific OpenType shapers for those.
Fixes regression: https://github.com/harfbuzz/harfbuzz/issues/1393
Which means, fixes again: https://github.com/harfbuzz/harfbuzz/issues/1264
While not regressing: https://github.com/harfbuzz/harfbuzz/issues/1357
2018-11-22 15:52:29 -05:00
Behdad Esfahbod
7a97f70740
Don't apply GPOS if applying morx
...
That's what Apple does, and it wouldn't degrade our OpenType performance.
Part of https://github.com/harfbuzz/harfbuzz/issues/1348
2018-11-16 14:46:40 -08:00
Behdad Esfahbod
eafd515639
Prefer morx table if GSUB is empty (no scripts)
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1348
2018-11-16 14:45:56 -08:00
Behdad Esfahbod
ce5da0f36a
[shaper] Rewrite shaper data code to be more template-driven than macro-driven
2018-11-16 02:52:20 -05:00
Behdad Esfahbod
c221dc0ba7
[ot-shape] Move code around
2018-11-14 19:57:19 -05:00
Behdad Esfahbod
3c3eb5ea9c
[aat] Disable fallback mark advance zeroing and positioning if morx applied
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1357
2018-11-13 21:10:10 -05:00
Behdad Esfahbod
cc8428756a
[shape-plan] Cache shape plans with variations based on variation indices
2018-11-12 18:48:10 -05:00
Behdad Esfahbod
1082338525
[shape-plan] Only use shape-plan key to initialize hb_ot_shape_plan_t
...
Such that we don't accidentally use info not in the cache key.
2018-11-12 18:05:02 -05:00
Behdad Esfahbod
3e284e02c2
[shape-plan] Minor
2018-11-11 22:51:34 -05:00
Behdad Esfahbod
f521a28b4a
Embed hb_ot_shape_plan_t into hb_shape_plan_t
...
No other shaper will need shape_plan_data, by definition. So, remove
abstraction layer and always create hb_ot_shape_plan_t as part of
hb_shape_plan_t.
2018-11-11 21:54:10 -05:00
Behdad Esfahbod
1beacdded9
Minor
2018-11-11 16:35:28 -05:00
Behdad Esfahbod
385f78b312
[aat] Remove deleted-glyhs after applying kerx/kern
...
Finally: Fixes https://github.com/harfbuzz/harfbuzz/issues/1356
Test case:
$ ./hb-shape GeezaPro.ttc -u U+0628,U+064A,U+064E,U+0651,U+0629
[u0629.final.tehMarbuta=4+713|u064e_u0651.shaddaFatha=1@0,-200+0|u064a.medial.yeh=1+656|u0628.initial.beh=0+656]
The mark positioning (kern table CrossStream kerning) only works if deleted
glyph (as result of ligation) is still in stream and pushed through the
state machine.
2018-11-07 17:20:47 -05:00
Behdad Esfahbod
ca23567f41
Disable fallback mark positioning if kern table has cross-stream kerning
...
Happens even if the cross-stream kerning is for cursive attachment only. Oh well..
2018-11-07 16:19:51 -05:00
Behdad Esfahbod
5cf6f94dfd
Don't apply both kerx and kern
...
Ouch!
2018-11-07 16:07:22 -05:00
Behdad Esfahbod
41cff7afc9
Minor
2018-11-07 16:05:36 -05:00
Behdad Esfahbod
649cc3ef27
[kerx] Don't disable crossKerning if kern feature is off
2018-11-07 14:07:13 -05:00
Behdad Esfahbod
0c3b061ac2
[kern] Apply erlier, where GPOS/kerx are applied
2018-11-07 13:58:41 -05:00
Behdad Esfahbod
914b595f25
[ot-face] Include hb-ot-face directly in hb_face_t
...
Simplifying access coming next.
2018-11-05 23:10:12 -05:00
Behdad Esfahbod
17335a8161
Clean up buffer->swap_buffers() calls
...
That function checks for buffer->successful already. No need
to check at call site.
2018-11-04 02:25:07 -05:00
Behdad Esfahbod
095f5add0b
[kern] Push apply loop to each subtable
2018-11-02 13:23:54 -04:00
Behdad Esfahbod
80d9a427cf
[docs] Document remaining sections
2018-10-27 04:58:32 -07:00
Behdad Esfahbod
39bd07aed5
Fix bunch of unused parameter warnings
...
Show up with gcc -O0.
There's a few more but those are functions that need to be filled in.
Maybe this is a lost battle...
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
f33ad6d692
[aat] Fix up previous commit and add files
2018-10-23 14:31:51 -07:00
Behdad Esfahbod
ffe3478448
[aat] Allow enabling/disabling features
...
Only works at entire-buffer range, not sub-ranges.
Test with:
$ hb-shape Zapfino.dfont Zapfino
[Z_a_p_f_i_n_o=0+2333]
$ hb-shape Zapfino.dfont Zapfino --features=-dlig
[Z=0+416|a=1@-21,0+264|p_f=2+433|i=4+181|n=5+261|o=6+250]
$ hb-shape Zapfino.dfont Zapfino --features=+dlig
[Z_a_p_f_i_n_o=0+2333]
Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 14:14:03 -07:00
Behdad Esfahbod
76324d95ca
Shift code around
2018-10-23 13:09:30 -07:00
Behdad Esfahbod
cf92d6579e
[trak] Allow disabling tracking for ranges of text
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 03:10:56 -07:00
Ebrahim Byagowi
22ecefd88e
Make tracking optout possible using 'trak' ot feature
...
So '--features=-trak' or 'font-feature-settings: 'trak' 0;' can prevent
applying of tracking if used.
2018-10-23 02:57:55 -07:00
Behdad Esfahbod
0b9d60e1a1
[aat] Apply kerx if GPOS kern was not applied
...
Ned tells me this is what Apple does.
2018-10-11 13:26:58 -04:00
Behdad Esfahbod
b59a428af0
Minor
2018-10-11 13:24:17 -04:00
Behdad Esfahbod
d6a12dba6d
[trak] Fix, and hook up
...
Works beautifully! Test coming.
2018-10-11 11:10:06 -04:00
Behdad Esfahbod
34caadc5c7
Ugh. Re-enable accidentally disabled GPOS
2018-10-10 22:17:07 -04:00
Behdad Esfahbod
504cb68fc9
Disable mark advance zeroing as well as mark fallback positioning if doing kerx
2018-10-10 21:29:46 -04:00
Behdad Esfahbod
60f86d32d7
[kerx] Don't loop over kerning subtables if kerning disabled
2018-10-10 18:10:05 -04:00
Behdad Esfahbod
38a7a8a89e
Allow HB_OPTIONS=aat to prefer AAT tables over OT
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/322
2018-10-10 17:44:46 -04:00
Behdad Esfahbod
7727e73756
[kerx] Actually hook up, and fix crash
2018-10-10 13:24:51 -04:00