Commit Graph

414 Commits

Author SHA1 Message Date
Ebrahim Byagowi a0b4ac4dce Turn 8 spaces to tab across the project
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Khaled Hosny 40aef1b473 [ot-shape] Keep horizontal_features array sorted 2019-08-16 02:17:32 +02:00
Khaled Hosny da5118da77 [ot-shape] Enable abvm/blwm features by default
Core Text seems to apply them to Latin text, but Uniscribe doesn’t.

See https://github.com/harfbuzz/harfbuzz/pull/1908#issuecomment-521819343
2019-08-16 02:17:32 +02:00
Khaled Hosny 2164bd6f29
[ot-shape] Enable dist feature by default (#1908)
Fixes https://github.com/harfbuzz/harfbuzz/issues/1907
2019-08-16 00:28:41 +02:00
Behdad Esfahbod cd65305b05 [config] Don't disable emoji sequences in HB_TINY
It makes sense to disable this code these if editing is not needed.
However, this is also necessary to correctly display emoji sequences
in right-to-left direction.  For that reason, don't auto-disable it.
2019-06-26 14:57:48 -07:00
Behdad Esfahbod 5130c90ac0 [config] Add HB_NO_EMOJI
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-26 14:29:39 -07:00
Behdad Esfahbod 2804790bce [config] Add dependency 2019-06-26 13:38:14 -07:00
Behdad Esfahbod 12092a46d8 [config] Rename HB_NO_SHAPE_AAT to HB_NO_AAT_SHAPE 2019-06-26 13:31:01 -07:00
Behdad Esfahbod 7aad53657e [config] Add HB_NO_OT_SHAPE / HB_NO_OT
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-26 13:21:03 -07:00
Behdad Esfahbod f4de0c7754 [config] Disable AAT map
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 17:09:55 -07:00
Behdad Esfahbod d8bf6723a1 [config] Disable more legacy kerning
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 17:04:16 -07:00
Behdad Esfahbod 43d7048d59 [config] More trak disabling
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 17:02:32 -07:00
Behdad Esfahbod d84932ba50 [config] add HB_NO_OT_SHAPE_FRACTIONS, enabled in HB_LEAN
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 16:57:48 -07:00
Behdad Esfahbod eaf4a7364c [config] Minor trak disable
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 16:51:23 -07:00
Behdad Esfahbod 588697afd0 [config] Add HB_NO_OT_KERN, enabled by HB_MINI / HB_NO_LEGACY
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 16:24:51 -07:00
Behdad Esfahbod 231d025788 [config] Don't compile AAT API if HB_NO_AAT
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-18 14:25:52 -07:00
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