Commit Graph

9595 Commits

Author SHA1 Message Date
Khaled Hosny 5898a9618c [ragel] Regenerate state machine files with 6.10 2021-09-14 18:46:33 -06:00
Khaled Hosny 7e9ac8fea2 [meson] Require ragel 6.10
Ragel 7 is also not stable from upstream's point of view.

This uses “version” argument find_program(), which was introduced in
meson 0.52.0, so I raised the minimum required meson version
accordingly.
2021-09-14 18:46:33 -06:00
David Corbett f1493357f7 [Unicode 14] Update the Arabic joining script list 2021-09-14 18:46:50 -04:00
David Corbett 2c3e4b279b [Unicode 14] Send all the new scripts to USE 2021-09-14 18:31:42 -04:00
David Corbett 20736d9bb3 [Unicode 14] Update the USE table 2021-09-14 18:25:38 -04:00
David Corbett 35ac0de42b [Unicode 14] Update the emoji table 2021-09-14 18:14:20 -04:00
David Corbett ec5688f50f [Unicode 14] Update the vowel constraint table 2021-09-14 18:09:05 -04:00
David Corbett 11d5334d8e [Unicode 14] Update the Indic table 2021-09-14 18:07:38 -04:00
David Corbett 18a46eeafb [Unicode 14] Update the Arabic table 2021-09-14 18:07:38 -04:00
David Corbett 7b05eec054 [Unicode 14] Update the script direction list 2021-09-14 18:07:38 -04:00
David Corbett 26e1498e76 [Unicode 14] Update the UCD table 2021-09-14 18:07:29 -04:00
David Corbett 67f1aa4d21 [Unicode 14] Add new `hb_script_t` values 2021-09-14 18:05:08 -04:00
Behdad Esfahbod bda3238c89 Add fallback atexit implementation using template descrutors
Fixes https://github.com/harfbuzz/harfbuzz/issues/3197
2021-09-14 08:12:48 -04:00
Behdad Esfahbod 9c27045158 [style] Fix another float conversion warning 2021-09-14 07:50:35 -04:00
Behdad Esfahbod 5a1a6f1fe3 [ot-shape] Enabled two more features: 'Harf' and 'Buzz'
Considered 'required', as opposed to existing 'HARF' and 'BUZZ',
consider them discretionary.

See discussion in https://github.com/harfbuzz/harfbuzz/issues/3200
2021-09-14 07:14:56 -04:00
Behdad Esfahbod ed1163208d Call atexit() via hb_atexit()
Part of https://github.com/harfbuzz/harfbuzz/issues/3197
2021-09-14 07:11:46 -04:00
Behdad Esfahbod ad4df20dd6 [style] Fix float conversion warning 2021-09-14 07:11:46 -04:00
Behdad Esfahbod c5cc23a9b5 [style] Change private slant tag
https://github.com/harfbuzz/harfbuzz/issues/3200#issuecomment-918352162
2021-09-13 12:14:06 -04:00
Khaled Hosny d748586a18 [style] Try harder to fix MSVC build
https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-160
2021-09-13 10:10:10 -06:00
Khaled Hosny e275f0d7ed [style] Try to fix MSVC build 2021-09-13 10:10:10 -06:00
Khaled Hosny eb4075a1ed [style] Fix documentation
Message documentation a bit to get it working.
2021-09-13 10:10:10 -06:00
Khaled Hosny 4d9b7de0b6 [style] Prepare for release 2021-09-13 10:10:10 -06:00
Khaled Hosny 34ff2d3ea6 Fix build with -Dexperimental_api=true
../src/hb-style.cc:102:32: error: no matching function for call to 'hb_style_get_value'
    return _hb_angle_to_ratio (hb_style_get_value (HB_STYLE_TAG_SLANT_ANGLE));
                               ^~~~~~~~~~~~~~~~~~
../src/hb-style.cc:99:1: note: candidate function not viable: requires 2 arguments, but 1 was provided
hb_style_get_value (hb_font_t *font, hb_tag_t tag)
^

and

../src/hb-style.cc:80:1: error: unused function '_hb_ratio_to_angle' [-Werror,-Wunused-function]
_hb_ratio_to_angle (float r)
^
2021-09-11 00:12:03 +02:00
Behdad Esfahbod 39c20d2b9e [style] Add HB_STYLE_TAG_SLANT_RATIO 2021-09-10 04:59:16 -06:00
Behdad Esfahbod 201cbe3c66 [style] Rename HB_STYLE_TAG_SLANT to HB_STYLE_TAG_SLANT_ANGLE 2021-09-10 04:59:16 -06:00
Behdad Esfahbod a23ce28977 [style] Fall back to GPOS 'size' feature for optical size in style API 2021-09-10 04:59:16 -06:00
Qunxin Liu 37379f8f7d [subset] fox for (Chain)ContextFormat3: subset lookupRecord
skip copying a lookupRecord if lookup referenced in the lookupRecord is
not retained after subset
2021-09-08 13:55:21 -06:00
Khaled Hosny 9b7af950b3 [docs] Fix subset documentation
List the missing new APIs and unlist all the to be deleted legacy APIs.
2021-09-07 15:05:42 +02:00
Khaled Hosny 505df5abf8 2.9.1 2021-09-07 13:46:43 +02:00
Khaled Hosny 195c05df99 Revert "[ot-shape-normalize] Move buffer out of hb_ot_shape_normalize_context_t"
This reverts commit 8cdbea5580.

For some reason this is causing several tests to crash locally for me
(on macOS), see:
8cdbea5580 (commitcomment-55898088)
2021-09-04 03:41:19 +02:00
David Corbett f4559d2435 Update hb-ot-tag-table.hh 2021-09-03 18:40:47 +02:00
Garret Rieger 2bd911b8b4 [subset] handle cmap4 overflows.
If a cmap4 subtable overflows during serialization drop it and the corresponding EncodingRecord. Don't drop the corresponding cmap12 table if it would have otherwise been removed.
2021-09-02 14:43:17 -06:00
Behdad Esfahbod bf81bbfb35 Revert "[arabic] Do not re-compose Unicode sequences"
This reverts commit ff34c240b0.

https://github.com/harfbuzz/harfbuzz/issues/3179#issuecomment-911242833
2021-09-02 00:16:22 -06:00
Behdad Esfahbod ff34c240b0 [arabic] Do not re-compose Unicode sequences
Fixes https://github.com/harfbuzz/harfbuzz/issues/3179
2021-09-01 23:55:25 -06:00
Alba Mendez 5fadf4c85e Small docs improvement
Mention that the returned strings are always nul terminated for convenience.
2021-09-01 10:04:04 -06:00
Behdad Esfahbod 5c4c173b06
Merge pull request #3146 from googlefonts/set_api
[subset] proposed update to subset set apis.
2021-08-30 16:44:28 -06:00
Garret Rieger de85636581 [subset] s/REPLACE/REPLACEME/ 2021-08-30 14:36:05 -07:00
Garret Rieger 3844e58e14 [subset] remove helper functions for accessing subset input sets. 2021-08-30 11:16:51 -07:00
Behdad Esfahbod 41b9f2abcd [set] Add TODO item 2021-08-29 10:47:20 -06:00
Behdad Esfahbod 93ac700da6 [set] Add copy-constructor/assignment again 2021-08-29 10:47:20 -06:00
Garret Rieger b9a176e268
[subset] speedup cmap4 subsetting for large codepoint counts. (#3178)
glyphIdArray generation implementation was O(n^2). Refactored to use a hashmap to reduce complexity. After the change subset time for a 22k codepoint subset went from 7s to 0.7s.
2021-08-29 10:33:12 -06:00
Garret Rieger 57d6bf8251 [subset] in sets union correctly size the pointer array. 2021-08-27 10:59:28 -07:00
Garret Rieger 102666dab7 [subset] add test for hb_subset_input_set (...). 2021-08-27 10:36:42 -07:00
Garret Rieger 7194c2a2a3 [subset] use anonymous union to hold the input sets instead of a map. 2021-08-27 10:36:42 -07:00
Garret Rieger 05204d7586 [subset] implement hb_subset_input_set (...).
Switch to storing the sets keyed by enum internally.
2021-08-27 10:36:36 -07:00
Garret Rieger 50193262f0 [subset] reorder set enums. 2021-08-27 10:34:59 -07:00
Garret Rieger 3282f540a9 [subset] restore legacy set api methods. 2021-08-27 10:34:58 -07:00
Garret Rieger 1457c1f080 [subset] set enum name changes. 2021-08-27 10:34:58 -07:00
Garret Rieger 1b5e159301 [subset] Remove HB_SUBSET_SETS_COUNT and flags comment. 2021-08-27 10:34:58 -07:00
Garret Rieger 4c389fd9e5 [subset] add unicode and glyph set enums. 2021-08-27 10:34:58 -07:00
Garret Rieger e3e1ae8766 [subset] proposed update to subset set apis. 2021-08-27 10:34:58 -07:00
Garret Rieger 9db494f517
[subset] Update remaining subset input sets to use inversion for all. (#3172)
* [subset] Update remaining subset input sets to use inversion for all.

* [subset] Update flag help for remaining sets to mention -=.
2021-08-26 10:51:38 -06:00
Behdad Esfahbod 99356ea5f0
Merge pull request #3150 from harfbuzz/item-context-tests
[test] Add tests for item context
2021-08-25 17:19:06 -06:00
Behdad Esfahbod 1620698bd5 [subset-input] Minor format 2021-08-25 16:26:58 -06:00
Garret Rieger cd07070e41 [subset] Move plan unicodes and gids population to end of _populate_unicodes... 2021-08-25 14:42:00 -07:00
Behdad Esfahbod 4b5a81f13c [buffer] Fix hb_buffer_append() pre/post-context logic
Part of https://github.com/harfbuzz/harfbuzz/pull/3150
2021-08-25 15:20:54 -06:00
Garret Rieger 8f4f47df7c [subset] use inverted set for all unicodes.
Modify the code that handles input->unicodes to be safe with possibly inverted sets. Also adds --unicodes-= and --unicodes+= flags.
2021-08-25 13:34:05 -07:00
Behdad Esfahbod e9e6d66cd6 [subset] Minor internal parameter rename 2021-08-24 23:22:49 -06:00
Garret Rieger 59deb754b3 [subset] rename _collect_subset_layout to _collect_layout_indices.
Better describes what the function does.
2021-08-24 18:17:07 -06:00
Garret Rieger f2441a4b65 [subset] Remove retain all layout features flag.
Instead use inverted sets to handle requesting all features. Modifies feature collection in subset plan to intersect the set of requested features against the features in the font. This prevents iterating a fully filled feature tag set.
2021-08-24 18:17:07 -06:00
Behdad Esfahbod c90678cbc5 [set] One more try to fix things
That I don't let a "make check -j10" run finish before pushing things
out means either that we need to speed up our build / test process,
or I need a faster laptop...
2021-08-24 11:11:12 -06:00
Behdad Esfahbod 357976963e [set] One more try at fixing clear() on empty set 2021-08-24 10:59:31 -06:00
Garret Rieger fb07f8f876 During subset input creation check for set alloc failures and fail if encountered. 2021-08-24 10:59:14 -06:00
Behdad Esfahbod b5177d2147 [set] Fix seam exposed by previous commit 2021-08-24 10:43:37 -06:00
Behdad Esfahbod f0de40dd61 Whitespace 2021-08-24 10:35:33 -06:00
Behdad Esfahbod 8cdbea5580 [ot-shape-normalize] Move buffer out of hb_ot_shape_normalize_context_t 2021-08-24 10:35:33 -06:00
Behdad Esfahbod 10da9fd20d [ot-map] Whitespace 2021-08-24 10:35:33 -06:00
Behdad Esfahbod d3e09bf465 [set] Make all operators null-safe again
Changed my mind.

Also for hb_map_clear().

Part of https://github.com/harfbuzz/harfbuzz/pull/3162
2021-08-24 10:31:49 -06:00
Khaled Hosny 430224b1a0 [buffer] Handle pre/post-context in buffer_append
Fixes https://github.com/harfbuzz/harfbuzz/issues/1843
2021-08-24 02:11:17 +02:00
Behdad Esfahbod 33c82c7dad [ot-shape] Fix unused-var error when building without AAT
Fixes https://github.com/harfbuzz/harfbuzzjs/issues/45
2021-08-22 22:31:39 -06:00
Qunxin Liu 34e0b28fae [subset] make glyph-names option match fonttools behavior
Don't encode psNames that are contained in standard glyph names set
2021-08-20 01:30:23 -06:00
Behdad Esfahbod 829b0f3353
Merge pull request #3154 from harfbuzz/set-invert
Resurrect hb_set_invert()
2021-08-20 01:28:15 -06:00
Behdad Esfahbod 84c2a30214 [bit-set-invertible] Second try fixing previous() 2021-08-19 16:33:48 -06:00
Behdad Esfahbod 8f88747a5e [bit-set-invertible] Fix previous() iteration 2021-08-19 16:31:01 -06:00
Behdad Esfahbod 1d832693e1 [set] Protect against immutible null set with invertible addition 2021-08-19 16:02:30 -06:00
Behdad Esfahbod dc800ffd6c [bit-set] Remove TODO items we don't intend to finish 2021-08-19 15:41:27 -06:00
Behdad Esfahbod 92908c122b [bit-set-invertible] Remove extra check
We don't expect immutable / null set in this code.
2021-08-19 15:28:26 -06:00
Behdad Esfahbod 1babe80ed2 [bit-set-invertible] Fix last remaining corner-case 2021-08-19 15:18:32 -06:00
Behdad Esfahbod e8911d137c [bit-set-invertible] Implement a couple other missing corner cases
Also, in bit-set, don't compute population in is_equal/is_subset()
if we don't have it computed already.
2021-08-19 15:00:33 -06:00
Behdad Esfahbod 2579dc648f [bit-set-invertible] Move code around 2021-08-19 14:48:27 -06:00
Behdad Esfahbod 2dfc104236 [bit-set-invertible] Implement is_empty() for inverted case as well 2021-08-19 14:47:33 -06:00
Behdad Esfahbod ec4812a7d4 [bit-page] Remove unused inverted code 2021-08-19 13:32:44 -06:00
Behdad Esfahbod 87885e6f02 [bit-set-invertible] Fix next/previous() logic 2021-08-19 13:26:25 -06:00
Behdad Esfahbod ee4e331a6e [bit-set] Remove unused get_min(inverted) 2021-08-19 13:24:15 -06:00
Behdad Esfahbod eec1a25e71 [bit-set-invertible] Rewrite get_min/max() in terms of next/previous() 2021-08-19 13:24:00 -06:00
Behdad Esfahbod f09d5ed0f5 [algs] Remove hb_bitwise_non() 2021-08-19 13:06:10 -06:00
Behdad Esfahbod f4fd7baf7e [bit-set-invertible] Fix subtract() logic 2021-08-19 13:05:12 -06:00
Behdad Esfahbod f317d8e426 [bit-set-invertible] Fix intersect() logic 2021-08-19 13:01:07 -06:00
Behdad Esfahbod b21038d91d [bit-set-invertible] Rewrite next/previous_range() in terms of s.next/previous() 2021-08-19 11:24:17 -06:00
Behdad Esfahbod eb98bc1e32 [bit-set-invertible] Rewrite next/previous() using s.next/previous_range() 2021-08-19 11:19:24 -06:00
Behdad Esfahbod 248ad3bce5 [bit-set-invertible] Implement next/previous
This makes invertible set functionality complete.
2021-08-19 10:17:51 -06:00
Behdad Esfahbod c27f5b1288 [bit-set-invertible] Plug in next_range()/previous_range() 2021-08-19 10:01:24 -06:00
Behdad Esfahbod f6aa37159b [bit-set-invertible] Fix process logic for inverted
[# On branch set-invert
2021-08-19 01:12:25 -06:00
Behdad Esfahbod 060de189ec [bit-page] Fix sanitizer error
This essentially reverts 9449cfeefd

Problem was dereferencing pointer at end of array...
2021-08-19 00:58:34 -06:00
Behdad Esfahbod b119b48079 [bit-set-invertible] Add unlikely() around inverted checks 2021-08-19 00:51:24 -06:00
Behdad Esfahbod b94f24ec79 [bit-set-invertible] Implement set algebra 2021-08-19 00:48:00 -06:00
Behdad Esfahbod 6afefe1dc3 [algs] Remove unnecessary struct tag names 2021-08-19 00:27:03 -06:00
Behdad Esfahbod 8aa92ff8f0 [bit-set-invertible] Implement get_min/max 2021-08-18 23:01:06 -06:00
Behdad Esfahbod 18f50275ed [bit-set] Restructure get_min/max() in prep for adding inverted 2021-08-18 22:08:06 -06:00
Behdad Esfahbod 669b97d949 [bit-set-invertible] Implement iterator 2021-08-18 21:39:04 -06:00