Qunxin Liu
e51c7f8e79
[subset] COLRv1: add ClipList/ClipRecord/ClipBox struct definition
2021-10-23 11:22:39 -07:00
Qunxin Liu
2e5636eeaf
[subset] add DeltasetIndexMap struct definition
2021-10-23 11:22:39 -07:00
Qunxin Liu
d2e986fead
[subset] update COLRv1 table struct definitions
2021-10-23 11:22:39 -07:00
Khaled Hosny
792ca307b0
[meson] Add graphite2 option and deprecate graphite
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3241
Should be better handled when we can use https://github.com/mesonbuild/meson/pull/9184
2021-10-23 10:59:02 -07:00
Behdad Esfahbod
c6557747ef
[style] Use head->macStyle.isExtended in style fallback
...
https://github.com/harfbuzz/harfbuzz/issues/3263
2021-10-21 09:56:47 -06:00
Behdad Esfahbod
f3f848b506
[head] Add is_expanded() internally
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3263
2021-10-21 09:54:02 -06:00
Garret Rieger
d17155f5d2
[repacker] use possibly updated root idx after isolate_subgraph.
...
isolate_subgraph can change the root indices in some cases. So operations after the isolation need to use the roots from the output of isolate_subgraph.
2021-10-13 14:40:00 -07:00
Behdad Esfahbod
a7a3608553
[docs] Rename overflow_resolution to repacker
2021-10-12 16:11:25 -07:00
Behdad Esfahbod
9bd7ba5019
Err on -Wbitwise-instead-of-logical
...
Part of https://github.com/harfbuzz/harfbuzz/pull/3256
2021-10-12 16:10:31 -07:00
Garret Rieger
6bc64317ca
Add a writeup of the overflow resolution algorithm in harfbuzz.
2021-10-12 17:10:07 -06:00
Nico Weber
96299d70ed
Fix Wbitwise-instead-of-logical warnings
...
`a || b` only evaluates b if a is false. `a | b` always evaluates
both a and b. If a and b are of type bool, || is usually what you
want, so clang now warns on `|` where both arguments are of type bool.
This warning fires twice in harfbuzz. In both cases, `|` is used
intentionally, with a comment explaining this.
Slightly reorder the code a bit to make the compiler happy, and to
make it obvious even without a comment that both calls should be evaluated.
No intended behavior change.
2021-10-12 08:56:54 -06:00
Qunxin Liu
36ed56b6e8
[subset] code cleanup
...
- rename copy() method if it takes extra parameter
- get rid of same code blocks
2021-10-09 13:37:20 -06:00
David Corbett
3e635cf5e2
[USE] Categorize characters that only have AJT
2021-10-09 07:53:48 -06:00
David Corbett
ae193cd182
[USE] Insert dotted circles before lone viramas
2021-10-09 07:50:09 -06:00
David Corbett
641296b5eb
[USE] Categorize U+11046 BRAHMI VIRAMA as HALANT
2021-10-09 07:50:09 -06:00
David Corbett
bb50aae9b4
[USE] Document customizations of USE categories
2021-10-08 13:25:46 -04:00
David Corbett
7287125c58
[USE] Merge the categories S and O
2021-10-08 13:14:33 -04:00
David Corbett
8eaee2f887
[USE] Only skip default ignorables within CCSes
2021-10-08 10:15:08 -06:00
David Corbett
4645c3b47c
Update comments for U+180F FVS4
2021-10-07 08:52:02 -04:00
Garret Rieger
5b882c420a
[repacker] performance optimizations for topological sorting.
...
- Presize the output sorted graph and write it once in the correct order to avoid needing to reverse.
- Swap the old/new graph vectors instead of copying.
- Use a boolean vector for tracking visited instead of a set.
2021-10-06 11:43:47 -07:00
Garret Rieger
ff7a86e9b0
[repacker] remove clone buffer, they are unnessecary.
...
When nodes are duplicated it's fine to just reuse head, tail from the node being cloned since we don't modify the contents.
2021-10-06 10:51:45 -07:00
Garret Rieger
8cae8b653d
[repacker] add missing fini for parents vector.
2021-10-05 14:03:02 -07:00
Garret Rieger
7f0ede4f04
[repacker] refactor resolve overflow tests to use a helper.
2021-10-05 13:10:01 -07:00
Garret Rieger
7883b7ed95
[repacker] Add additional splitting spaces test.
...
Fix issues it uncovered.
2021-10-05 12:46:59 -07:00
Garret Rieger
6265663de4
[repacker] add test for splitting spaces.
2021-10-05 11:30:04 -07:00
Garret Rieger
d97bd4268a
[repacker] when assigning spaces use post isolation node indices.
...
isolate_subgraph can result in some of the roots being duplicated and moved to new indices, so do subgraph isolation before assign roots to spaces.
2021-10-05 10:53:05 -07:00
Behdad Esfahbod
ccfc048153
[indic] Apply 'calt' and 'clig' across syllable boundaries
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3244
2021-10-05 07:00:50 -06:00
Behdad Esfahbod
d58f1685ce
[ot-shape] Tweak table order some more; apply GPOS with morx
...
During 5bc05ba155
accidentally GPOS was disabled when morx was
enabled. Fix that.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2757#issuecomment-933531978
2021-10-04 08:40:24 -06:00
David Corbett
f8ebb8a657
[USE] Update the data files
...
This uses the data files from
<c355d04194/USE
>.
2021-10-04 08:14:20 -06:00
David Corbett
564afc425a
[USE] Remove overrides for hieroglyphic categories
2021-10-04 08:14:20 -06:00
David Corbett
8c65442069
[Unicode 14] Handle U+180F FVS4
2021-10-04 08:14:20 -06:00
Garret Rieger
375a6c8f81
[repacker] add the ability to move subgraphs from a shared space into their own space.
...
Used to resolve overflows during manual resolution.
2021-09-29 18:14:57 -07:00
Garret Rieger
0dccbf368f
[repacker] Handle the case where a subgraph root has an incoming 32 and 16 bit edge.
...
In this case the entire subgraph from that root will be duplicated.
2021-09-29 14:28:27 -07:00
Qunxin Liu
794b00db4b
[subset] fuzzer fix: https://oss-fuzz.com/testcase-detail/6616166961905664
2021-09-29 10:29:06 -06:00
Garret Rieger
816c5302a7
[repacker] restrict 32 bit subgraph connected component search to only nodes reachable via directed links.
2021-09-28 16:04:27 -07:00
Garret Rieger
67eb222b8e
[repacker] when assigning each connected subgraph a space, also isolate it.
...
This will break any links coming from space 0 (ie. the 16 bit offset only space).
2021-09-28 13:54:54 -07:00
Garret Rieger
307acf7fb0
[repacker] add space assignment based on connected components.
...
Assign each connected component that is underneath one or more 32 bit offsets into a unique space. This ensures that 32 bit subgraphs which are connected are packed into the same space.
2021-09-28 12:08:18 -07:00
Garret Rieger
c77bdf1dcf
[repacker] begin storing each nodes parents.
...
Will be used for connected component search.
2021-09-27 14:42:54 -07:00
Garret Rieger
a52c6df38a
[subset] Fix bug in composite operation counting.
...
Adding the result of add_gid_and_children to operation count over counts the number of operations.
2021-09-27 14:18:36 -06:00
Garret Rieger
efda2f14e1
[repacker] fix bug in subgraph isolation.
...
Prior to this fix id remapping at the end of the isolation operation was fed the old subgraph instead of the new one. Which results in object indices being remapped for the nodes outside of the new subgraph. Adds a test which detects this problem.
2021-09-24 17:53:08 -06:00
Behdad Esfahbod
6f19094398
[getn-hb-version.py] Open old output in UTF-8 mode as well
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3227
2021-09-23 08:39:29 -06:00
Garret Rieger
9247d24d7f
[repacker] s/0/HB_TAG_NONE
2021-09-22 18:18:50 -06:00
Garret Rieger
fe155de989
[repacker] handle a couple of duplication edge cases.
...
- Detect cases where there are multiple links from a parent to a child. Don't duplicate that child if those are the only remaining links to the child.
- Correctly handle isolating a subgraph where the root idx has multiple incoming links.
2021-09-22 18:18:50 -06:00
Garret Rieger
c19ec97da7
[repacker] reduce the bits used by order by 2 to give more bits to distance.
2021-09-22 18:18:50 -06:00
Garret Rieger
d0daa7a59b
[repacker] add a couple more complex isolation tests.
2021-09-22 18:18:50 -06:00
Garret Rieger
62c502cd9d
[repacker] correctly update incoming_edges in duplicate.
2021-09-22 18:18:50 -06:00
Garret Rieger
a57ef8df7e
[repacker] default space to 0.
...
Since vector push() init's new objects to all zeros.
2021-09-22 18:18:50 -06:00
Garret Rieger
58facaade1
[repacker] put each 32 bit subgraph into it's own packing space.
...
Each subgraph pointed to by a 32 bit offset should be packed into it's own space. This adds a space property to vertices which affects the distance calculation. This effectively places the distances for all of the nodes of a 32 bit subgraph into a distinct range. Thus all of the nodes of the subgraph will be packed together.
2021-09-22 18:18:50 -06:00
Garret Rieger
543a3f9733
[repacker] Add repacker test for subgraph isolation.
2021-09-22 18:18:50 -06:00
Garret Rieger
7147f169d6
[repacker] recursively duplicate nodes during isolation.
...
If a node is duplicated during isolation then any children it has will have incoming links from outside the subgraph (from the duplicated node and the original node), so they must be duplicated too.
2021-09-22 18:18:50 -06:00
Garret Rieger
41bbf2812e
[repacker] do extension subtable isolation before starting resolution attempts.
2021-09-22 18:18:50 -06:00
Garret Rieger
8d8b7458a4
[repacker] extract overflows processing into its own method.
2021-09-22 18:18:50 -06:00
Garret Rieger
b14b3f13ba
[repacker] begin implementing the ability to isolate extension subtables.
...
Adds isolate_subgraph operation to the repacker. This severs any links from outside a subgraph by duplicating the affected vertices. This will be used to isolate the subgraphs of a extension subtable from the rest of object graph. Thus allowing the extension subtable to be packed far away from the rest of the objects.
2021-09-22 18:18:50 -06:00
Garret Rieger
02c4a516db
Add a debug message when offset overflow resolution fails.
2021-09-22 18:18:50 -06:00
Ben Wagner
cb2d71c648
[mutex] Add hb_mutex_t std::mutex implementation
...
Instead of failing...
2021-09-22 18:43:58 -04:00
Behdad Esfahbod
67b3962fa5
[atomic] Cannot fail anymore
2021-09-22 18:43:58 -04:00
Qunxin Liu
ca7b9daef0
[subset] subset MATH table
2021-09-22 18:08:30 -04:00
Garret Rieger
c2cc566c9d
[subset] Fix subset_offset_array adding unused space to serializer.
...
ArrayOf.serialize_append allocates space for the new item, but ArrayOf.pop() does not recover the allocated space. So in the case where the revert path was entered the extra space added by serialize_append gets left in the serialization buffer. This moves the snapshot to before ArrayOf.serialize_append is called so that revert cleans up the buffer extend.
2021-09-22 16:07:18 -06:00
Qunxin Liu
8c5c81746d
[subset] fix find_duplicate_features
...
We should check each feature against all other features with the same
tag for duplicates.
2021-09-22 15:35:38 -06:00
Qunxin Liu
1afc3874e0
[subset] add closure_glyphs () method for MATH table
2021-09-22 12:06:59 -04:00
Behdad Esfahbod
3b2929e8a9
[set-digest] Use using instead of typedef
2021-09-21 12:21:17 -06:00
Simon Cozens
5694561f75
Add support for Pwo Karen / Ason Chin medial la
...
https://github.com/harfbuzz/harfbuzz/pull/3217
2021-09-20 17:01:40 -04:00
Behdad Esfahbod
bff5685432
[khmer] Towards separating Khmer from Indic table
2021-09-20 13:25:58 -06:00
Behdad Esfahbod
5d957ffe74
[myanmar] Towards separating Myanmar from Indic table
2021-09-20 11:33:01 -06:00
Khaled Hosny
6db4b56e05
Make the file UTF-8 again
...
GitHub web interface failed to show the encoding change.
2021-09-20 19:18:39 +02:00
Behdad Esfahbod
14a2df7bc2
Add stub HBUINT15
2021-09-19 23:06:09 -04:00
Behdad Esfahbod
c852b86841
Rename HBGlyphID to HBGlyphID16
2021-09-19 16:30:12 -04:00
Garret Rieger
74f96d9d4b
[repacker] fix heap use after free in repacker.
...
Don't store a reference to the link in overflow records as the link object may be freed if the sorted graph vector is resized.
2021-09-19 09:06:17 -06:00
ActuallyaDeviloper
7143c8333b
Make the code able to compile with MSVC++ from Visual Studio 2015 (Version 14.0.25431.01, Update 3) sucessfully again.
2021-09-19 09:05:52 -06:00
Khaled Hosny
b36f1510ec
[doc] Add missing version tags
2021-09-18 23:09:07 +02:00
Khaled Hosny
9c387e20d6
3.0.0
2021-09-17 21:32:30 +02:00
Behdad Esfahbod
e0d5fe740a
Centralize math include
...
https://github.com/harfbuzz/harfbuzz/pull/3212
2021-09-17 06:41:07 -06:00
Khaled Hosny
a59e7ec993
[meson] Add ragel_subproject option
...
Add an option to build fallback ragel subproject when no suitable ragel
version is found, and make it off by default since most builder don’t
need ragel at all.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3208 (hopefully)
2021-09-17 06:12:14 -06:00
Garret Rieger
d700646c33
[subset] In preperation for 3.0.0 release remove legacy subsetting api methods.
2021-09-16 15:31:29 -06:00
Behdad Esfahbod
ae14537854
[style] Change tag type to hb_style_tag_t
...
https://github.com/harfbuzz/harfbuzz/pull/3201#discussion_r708914354
2021-09-15 07:46:33 -04:00
David Corbett
470686e817
[USE] Send Khitan Small Script and Yezidi to USE
2021-09-14 19:42:29 -06:00
Khaled Hosny
22cbd038d3
[meson] Add ragel subproject
...
If ragel 6.10 is not found, build it from source.
Seems to work, except that ragel uses exceptions and we configure
HarfBuzz build to not use exceptions, and I can’t find away to enable
exceptions only for the ragel subproject. I had to remove cpp_eh=none
from default options and try to disable exceptions in MSVC manually
(other compilers are already handled).
2021-09-14 18:46:33 -06:00
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