Commit Graph

74 Commits

Author SHA1 Message Date
Laurenz 3fcf466b7b [hb-shape-fallback] Use signed int for correction 2020-10-16 17:57:38 -07:00
Evgeniy Reizner 34ed8e7218 Prefer _hb_glyph_info_is_unicode_mark where possible. 2019-12-13 08:55:34 +03:30
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
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 fca2786041 [config] Make HB_DISABLE_DEPRECATED actually compile
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-11 00:37:01 -07:00
Behdad Esfahbod 227d85e138 Minor 2019-05-10 23:16:14 -07:00
Behdad Esfahbod 414c5de26b Add HB_NO_OT_SHAPE_FALLBACK
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 10:12:11 -04: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
Behdad Esfahbod cff4c6087f Fix vertical fallback space sign
Ouch!

Follow-up to cf203af8a3

Fixes https://github.com/harfbuzz/harfbuzz/issues/1343
2018-11-16 15:04:41 -08:00
Behdad Esfahbod 0c3b061ac2 [kern] Apply erlier, where GPOS/kerx are applied 2018-11-07 13:58:41 -05:00
Behdad Esfahbod c038f5be6b [fallback] Minor 2018-11-07 13:35:06 -05:00
Behdad Esfahbod d0f8f4c200 [kern] Move kern machine to hb-kern.hh 2018-11-07 10:25:25 -05:00
Behdad Esfahbod cf203af8a3 Implement space fallback in vertical direction
Fixes https://github.com/harfbuzz/harfbuzz/issues/1343
2018-10-31 18:27:09 -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 661340c475 [kern] Scale kern pairs before applying
Fixes https://github.com/harfbuzz/harfbuzz/issues/1255
Fixes https://github.com/harfbuzz/harfbuzz/issues/1252
2018-10-16 13:24:29 -07:00
Behdad Esfahbod 8d00c39bfc [kern] Minor 2018-10-10 10:19:07 -04:00
Behdad Esfahbod 754cf440bf Minor 2018-10-10 10:19:07 -04:00
Behdad Esfahbod e4f27f368f Try fixing older bots 2018-10-09 08:20:10 -04:00
Behdad Esfahbod a51958819f Apply TrueType/OpenType kern table when GPOS kern feature is not available
Fixes https://github.com/harfbuzz/harfbuzz/issues/250
2018-10-08 23:57:45 -04:00
Behdad Esfahbod 09ad2613c8 Separate fallback kern vs mark positioning 2018-10-08 23:30:24 -04:00
Behdad Esfahbod 3c23ff9b7c [kern] Add kerning driver to TT kern table 2018-10-08 23:26:26 -04:00
Behdad Esfahbod 683c3a9533 [kern] Abstract away kerning machine 2018-10-08 23:09:48 -04:00
Behdad Esfahbod 1d1734e985 Shuffle code around 2018-10-02 13:04:05 +02:00
Behdad Esfahbod 5c65ed800d Fix bug introduced in 9b0b40b3c1
Also discovered by msan bot.
2018-09-30 17:49:33 +02:00
Behdad Esfahbod 9b0b40b3c1 Fix fallback kerning to check for current glyph's mask 2018-09-28 20:53:23 -04:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Ebrahim Byagowi f24b0b9728 Update the links and revive the dead ones 2018-04-12 13:44:32 +04:30
Behdad Esfahbod c1ab95dd90 Fix overflow in space fallback shaping
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=657466
2018-02-08 17:22:07 -06:00
Behdad Esfahbod b220b5a444 Avoid undefined-behavior in fallback mark positioning
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5584
2018-02-08 17:14:52 -06:00
Behdad Esfahbod fd03449094 Rename hb_apply_context_t to hb_ot_apply_context_t 2018-01-19 16:40:13 -08:00
Behdad Esfahbod 5f94b4cc39 [kern] Mark unsafe-to-break 2018-01-10 02:50:49 +01:00
Behdad Esfahbod 8d55340593 Fix fallback positioning of double diacritic marks
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=787284
2017-11-20 19:43:22 -08:00
Unknown 97145df249 Trivial typos
Found using `codespell -i 3 -w -I '../harf-whitelist.txt'`
whereas the whitelist contents were:
```
beng
iff
pres
ot
te
teh
```
2017-11-03 15:31:21 +02:00
Behdad Esfahbod a7c4972cce [unsafe-to-break] Flag during fallback positioning 2017-08-10 20:16:15 -07:00
Behdad Esfahbod 8b5bc141cd Add get_nominal_glyph() and get_variation_glyph() instead of get_glyph()
New API:
- hb_font_get_nominal_glyph_func_t
- hb_font_get_variation_glyph_func_t
- hb_font_funcs_set_nominal_glyph_func()
- hb_font_funcs_set_variation_glyph_func()
- hb_font_get_nominal_glyph()
- hb_font_get_variation_glyph()

Deprecated API:
- hb_font_get_glyph_func_t
- hb_font_funcs_set_glyph_func()

Clients that implement their own font-funcs are encouraged to replace
their get_glyph() implementation with a get_nominal_glyph() and
get_variation_glyph() pair.  The variation version can assume that
variation_selector argument is not zero.
2016-02-24 19:05:23 +09:00
Behdad Esfahbod 49ef630936 Adjust the width of various spaces if font does not cover them
See discussion here:
81ef4f407d

There's no way to disable this fallback, but I don't think it would
be needed.  Let's hope for the best!

Fixes https://github.com/behdad/harfbuzz/issues/153
2015-11-04 17:27:07 -08:00
Behdad Esfahbod 305d2fbf5a Add HB_FALLTHROUGH
Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411
2015-10-21 11:04:28 -02:00
jfkthame 9099e48e29 Don't rely on .cluster field in fallback_position
Fixes tests/cluster.

Fixes https://github.com/behdad/harfbuzz/pull/123
2015-08-08 18:03:38 +02:00
Behdad Esfahbod 365576d246 [layout] Allocate iters in the context
Can be further optimized, but I think I didn't break anything.

Saves another 3% off Roboto shaping.
2015-02-25 15:43:28 -08:00
Behdad Esfahbod 514564f544 [layout] Move skippy_iter setup from constructor into init() 2015-02-25 15:43:27 -08:00
Behdad Esfahbod b051be542a [lookup] Add skippy_iter.reset()
Towards reducing the cost of initializing skippy_iter()
2015-02-25 15:43:27 -08:00
Behdad Esfahbod 696266981d [layout] Merge forward and backward iterators 2015-02-25 15:43:26 -08:00
Behdad Esfahbod 8f3eebf7ee Make sure gsubgpos buffer vars are available during fallback_position
Add buffer var allocation asserts to a few key places.
2014-08-02 19:07:49 -04:00
Behdad Esfahbod 7cd33f2304 Micro optimization 2014-07-17 14:39:07 -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 5497a8a274 Cache various masks on the shape plan 2013-12-22 20:48:53 -05:00
Behdad Esfahbod 02f909664f Minor correction to kern mask checking 2013-12-22 19:35:27 -05:00
Behdad Esfahbod 6b03e3c724 Optimize fallback kerning
Patch from Jonathan Kew.  "These changes seem to yield a small but
just-about-measurable improvement with old fonts that lack GPOS
kerning."
2013-10-27 21:04:55 +01:00
Behdad Esfahbod 0193649ce4 [otfallback] Don't shift down above-marks too much
This seems to generate much better, almost-perfect, positioning for
Arabic as well as Latin above marks.
2013-10-18 18:17:29 +02:00
Behdad Esfahbod dba9580237 [otfallback] Never fallback-position a below-mark upwards
Test with WinXP times.ttf and U+05D9,U+05B5.
2013-10-18 18:17:29 +02:00