Behdad Esfahbod
acdab17ed3
[cff] Cosmetic in parsed_values_t
2022-05-13 14:14:36 -06:00
Behdad Esfahbod
b46c7faa9c
[cff] Check buf_len, not buf
...
Ouch!
2022-05-13 14:02:54 -06:00
Garret Rieger
19a8db8545
[subset] fix potential integer overflow in gname_t::cmp.
2022-05-13 13:55:39 -06:00
Behdad Esfahbod
2d2f66e1a3
[cff-common] In INDEX, return empty bytes if length is zero
...
Before it was possible to return non-null arrayZ.
2022-05-13 13:53:17 -06:00
Behdad Esfahbod
a2f132f1fc
[cff] Check glyph-name's length, not arrayZ
...
As the latter can be non-null while still zero-length.
2022-05-13 13:49:39 -06:00
Thomas Devoogdt
c657c4e1f8
[meta] fix type traits on gcc 4.9 #3526
...
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
2022-05-13 11:26:12 -06:00
Behdad Esfahbod
e61234c5f7
[vector] Add tests for move constructor/assignment
2022-05-12 13:20:10 -06:00
Behdad Esfahbod
7fa580bc4f
[map] Fix map copy/move constructors to actually work
...
Ouch!
2022-05-12 13:05:32 -06:00
Behdad Esfahbod
a09dd87ca3
[set] Fix set copy/move constructors to actually work
...
Ouch!
2022-05-12 12:58:07 -06:00
Behdad Esfahbod
76fc27713f
[vector] Remove explicit std::move
...
Was confusing compilers. Let them figure it out themselves.
Makes NotoNastaliqu subsetting/1000 benchmark more than twice faster:
Benchmark Time CPU Time Old Time New CPU Old CPU New
------------------------------------------------------------------------------------------------------------------------------------------------------------
BM_subset/subset_glyphs/NotoNastaliqUrdu-Regular.ttf/1000 -0.5064 -0.5065 111 55 110 55
BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/1000 -0.5494 -0.5493 132 59 131 59
2022-05-12 12:14:07 -06:00
Behdad Esfahbod
c81198b5bc
[set] Tweak move operators a bit
...
Should be equivalent.
2022-05-12 12:14:02 -06:00
Behdad Esfahbod
175319cd89
[gsubgpos] Clean up OT::ClassDefFormat2::intersected_class_glyphs 0 case
2022-05-11 13:47:17 -06:00
Behdad Esfahbod
137af3612b
[gsubgpos] Simplify OT::ClassDefFormat2::intersected_class_glyphs()
2022-05-11 13:39:30 -06:00
Behdad Esfahbod
3261e05bdb
[subset] Optimize ClassDef1::intersected_class_glyphs() for class0
2022-05-11 13:16:31 -06:00
Behdad Esfahbod
c78d8ba60b
[subset] Allocate same size as source table for GSUB/GPOS/name
2022-05-11 13:05:41 -06:00
Behdad Esfahbod
2e7f1ae48f
[subset] Use vector.allocated size instead of tracking buf_size
2022-05-11 12:52:27 -06:00
Behdad Esfahbod
f08537963b
[cff-subset] Pre-alloc vector for operator decoding
2022-05-11 12:14:49 -06:00
Behdad Esfahbod
aeb50b8942
[subset] Retain buffer across table subset operations
2022-05-11 12:14:49 -06:00
Behdad Esfahbod
bff78e6515
[cff] Convert interpretation environment to use constructor
2022-05-10 16:50:38 -06:00
Behdad Esfahbod
de053e2efb
[cff] Convert subr_subset_param_t to use constructor
2022-05-10 16:17:20 -06:00
Behdad Esfahbod
96140db485
[cff] Convert cff2_extents_param_t to use constructor
2022-05-10 16:17:20 -06:00
Behdad Esfahbod
54544f2a57
[cff] Convert cff1_extents_param_t to use constructor
2022-05-10 16:17:20 -06:00
Behdad Esfahbod
377befd0c7
[cff] Convert get_seac_param_t to use constructor
2022-05-10 16:17:20 -06:00
Behdad Esfahbod
8fd70362fa
[cff] Use hb_ubytes_t() instead of Null(hb_ubytes_t)
2022-05-10 16:17:20 -06:00
Behdad Esfahbod
9033c7f99d
[cff-common] Optimize INDEX::operator[]
...
Previous try showed slowdown in benchmarks, suprisingly.
Rewrite it keeping the function, hopefully allowing better optimization.
2022-05-10 14:58:53 -06:00
Behdad Esfahbod
3aace2431b
Revert "[cff-common] Optimize INDEX::operator[]"
...
This reverts commit 9edb03ac7a
.
2022-05-10 14:54:04 -06:00
Behdad Esfahbod
b31ef081db
Revert "[cff] Add an unlikely()"
...
This reverts commit 9ba9adb7ed
.
This shows slowdown in benchmarks.
2022-05-10 14:52:40 -06:00
Behdad Esfahbod
9ba9adb7ed
[cff] Add an unlikely()
2022-05-10 14:43:00 -06:00
Behdad Esfahbod
9edb03ac7a
[cff-common] Optimize INDEX::operator[]
2022-05-10 14:43:00 -06:00
Behdad Esfahbod
0a42410dc8
[cff2] Change extents/shape stack to be just a number
...
Do the blending immediately.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3559
Benchmark on AdobeVFPrototype shows 35% speedup. Now we're faster
than FreeType:
Benchmark Time CPU Time Old Time New CPU Old CPU New
------------------------------------------------------------------------------------------------------------------------------------------------
BM_Font/glyph_extents/AdobeVFPrototype.otf/hb -0.3792 -0.3792 1584 983 1581 982
BM_Font/glyph_extents/AdobeVFPrototype.otf/ft +0.0228 +0.0224 1220 1248 1218 1245
BM_Font/glyph_extents/AdobeVFPrototype.otf/var/hb -0.3513 -0.3518 1616 1048 1613 1046
BM_Font/glyph_extents/AdobeVFPrototype.otf/var/ft +0.0172 +0.0169 1232 1254 1230 1251
2022-05-10 13:41:12 -06:00
Garret Rieger
8f9f0c494b
[subset] Enforce cmap12 group ordering constraints in collect_mapping.
...
Fixes fuzzer issue: https://oss-fuzz.com/testcase-detail/6365271012540416
2022-05-10 12:15:09 -06:00
Behdad Esfahbod
1b14d2ff13
[cff] Fix arg-stack peek() impl
2022-05-09 18:15:31 -06:00
Behdad Esfahbod
6106ef8c0f
[cff] Tighten up arg-stack access
2022-05-09 18:15:11 -06:00
Behdad Esfahbod
8c616a6efe
[cff] Allocate stack inline instead of using hb_vector_t
...
Speeds up glyph_extents and glyph_shape benchmarks for CFF by 10
to 16 percent!
2022-05-09 17:50:59 -06:00
Behdad Esfahbod
c941ece60f
[cff] Use using instead of typedef
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
64d63cebe2
[cff-common] Use existing types for str_buff_vec_t
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
e1838ec1f8
[cff-common] Remove unused method
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
8aa54aaca2
[cff] Replace byte_str_t with hb_bytes_t use
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
fe1d85a55a
[cff] Remove custom byte_str_t impl
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
c8a5f1e3c0
[cff-common] Indent
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
be7b2905cb
[cff-common] Remove unused INDEX::serialize() method
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
60390169b6
[cff-common] Write str_buf_t::total_size() as dagger
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
258afb45b7
[cff-common] Use range-based loop in str_buff_vec_t
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
8bb1a3ce9a
[cff-common] Write INDEX offset-size calc using hb_bit_storage()
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
2ccfe84eff
[cff-common] Add assert to INDEX::set_offset_at()
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
4bcab9e99a
[cff-common] Use byte_str_t() instead of Null(byte_str_t)
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
94f7a26322
[cff-common] Fix get_size() for Null object
...
The special-casing didn't make sense.
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
c9cc7d5d21
[cff-common] Inline once-used method in INDEX
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
11482a3a39
[cff-common] Remove unused method from INDEX
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
d1bb3b08f6
[cff-common] Hide more INDEX internals
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
d3b21387fd
[cff-common] Remove redundant operator implementation
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
a96b408d80
[cff-common] Hide INDEX internals
2022-05-09 17:34:58 -06:00
Behdad Esfahbod
335b1d83cf
[cff-common] No need to check max-offset in INDEX
...
The length_at() function makes sure out-of-range offsets
are discarded. We just need to check the last offset.
2022-05-09 17:34:58 -06:00
Garret Rieger
b051f3fa83
[subset] Fix cpal subsetting when there are partial palette overlaps.
...
The existing code doesn't correctly handle the case where palettes partially overlap in the color record array. This changes the subsetting to only share entries in the color record array when palettes have the same first color index. Partially overlapping palettes will be converted to disjoint segments in the color record array.
Updates one of the color tests to use multiple palettes.
Also fixes fuzzer: https://oss-fuzz.com/testcase-detail/5568200165687296 .
2022-05-09 12:25:05 -06:00
Behdad Esfahbod
2884eb97bf
[cff-common] Remove special-casing of count=0 in INDEX serialize
...
The generic code-path now can handle count=0.
2022-05-06 13:33:13 -06:00
Behdad Esfahbod
fc7f51aece
[cff-common] Reduce iterator calls
2022-05-06 13:33:13 -06:00
Behdad Esfahbod
c857b8e3c6
[cff-common] Set INDEX min_size to 2
...
That is what it is, for an empty INDEX.
2022-05-06 13:33:13 -06:00
Behdad Esfahbod
dd71d2c1c3
[gvar] Protect against offset underflow
2022-05-06 13:02:26 -06:00
Behdad Esfahbod
9a6dabd61a
[gvar] Remove sanitize check for data array
...
We are not checking in sanitize that offset array is ascending,
so this check was bogus.
2022-05-06 12:43:45 -06:00
Behdad Esfahbod
38478d1061
[gvar] DEFINE_SIZE_ARRAY instead of DEFINE_SIZE_MIN
2022-05-06 12:43:45 -06:00
Behdad Esfahbod
90d278c92e
[gvar] Remove requirement that num_glyphs matches the font's
2022-05-06 12:43:45 -06:00
Behdad Esfahbod
ca8a0f3ea3
[gvar] Protect against out-of-range access
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47281
Fixes https://oss-fuzz.com/testcase-detail/5508865908670464
2022-05-06 11:54:38 -06:00
Behdad Esfahbod
f10ddb8dd8
[cmap] Use -1 as Unicode sentinel, not U+FFFF in Format12 serialize
2022-05-05 11:21:24 -06:00
Behdad Esfahbod
8a19968c8b
[cmap] Use iterator bool operator
2022-05-05 11:17:23 -06:00
Behdad Esfahbod
8bfeea4828
[subset] Compute set max using previous()
2022-05-05 11:13:57 -06:00
Behdad Esfahbod
00cb8c629d
[subset] Don't go into glyf table if it's empty
2022-05-05 11:13:57 -06:00
Behdad Esfahbod
4fe69bc413
[subset] Use del_range in _remove_invalid_gids
2022-05-05 11:13:57 -06:00
Behdad Esfahbod
2a42edccbe
[subset] Cosmetic; use set bulk array population instead of for loop
2022-05-05 10:35:54 -06:00
Behdad Esfahbod
43938ecdc2
[subset] Remove outdated comment
...
I tried something like that. It was slower because of the allocations.
2022-05-04 16:59:28 -06:00
Behdad Esfahbod
50db78ba83
[subset] In cmap planning, remove a qsort()
2022-05-04 16:18:27 -06:00
Behdad Esfahbod
052812b6ba
Merge pull request #3561 from googlefonts/cmap_opt
...
[subset] Further cmap subsetting speed optimizations
2022-05-04 15:38:30 -06:00
Garret Rieger
7cb36e4222
[subset] Re-introduce size threshold in choosing unicode collection method.
...
Threshold is needed since the unicodes set might be an inverted set.
2022-05-04 21:22:26 +00:00
Garret Rieger
42c54eba83
[subset] Presize unicode to gid list to unicodes + glyphs size.
2022-05-04 20:21:43 +00:00
Garret Rieger
7c7c01d28c
[subset] Remove switch to alternate unicode collection at large subset sizes.
...
Benchmarks show that the first path is always faster even at large subset sizes:
BM_subset_codepoints/subset_roboto/10_median +0.0324 +0.0325 0 0 0 0
BM_subset_codepoints/subset_roboto/64_median +0.0253 +0.0255 0 1 0 1
BM_subset_codepoints/subset_roboto/512_median +0.0126 +0.0128 1 1 1 1
BM_subset_codepoints/subset_roboto/4000_median +0.0500 +0.0491 6 7 6 7
BM_subset_codepoints/subset_amiri/10_median +0.0338 +0.0332 1 1 1 1
BM_subset_codepoints/subset_amiri/64_median +0.0238 +0.0234 1 1 1 1
BM_subset_codepoints/subset_amiri/512_median +0.0066 +0.0063 8 8 8 8
BM_subset_codepoints/subset_amiri/4000_median -0.0011 -0.0012 13 13 13 13
BM_subset_codepoints/subset_noto_nastaliq_urdu/10_median +0.0226 +0.0226 0 0 0 0
BM_subset_codepoints/subset_noto_nastaliq_urdu/64_median +0.0047 +0.0044 20 20 20 20
BM_subset_codepoints/subset_noto_nastaliq_urdu/512_median +0.0022 +0.0021 165 166 165 166
BM_subset_codepoints/subset_noto_nastaliq_urdu/1000_median -0.0021 -0.0023 166 166 166 165
BM_subset_codepoints/subset_noto_devangari/10_median +0.0054 +0.0054 0 0 0 0
BM_subset_codepoints/subset_noto_devangari/64_median +0.0024 +0.0019 0 0 0 0
BM_subset_codepoints/subset_noto_devangari/512_median +0.0089 +0.0090 5 5 5 5
BM_subset_codepoints/subset_noto_devangari/1000_median -0.0028 -0.0019 5 5 5 5
BM_subset_codepoints/subset_mplus1p/10_median +0.0001 +0.0002 0 0 0 0
BM_subset_codepoints/subset_mplus1p/64_median +0.0073 +0.0075 1 1 1 1
BM_subset_codepoints/subset_mplus1p/512_median +0.0034 +0.0034 1 1 1 1
BM_subset_codepoints/subset_mplus1p/4096_median -0.1248 -0.1248 7 6 7 6
BM_subset_codepoints/subset_mplus1p/10000_median -0.0885 -0.0885 13 12 13 12
BM_subset_codepoints/subset_notocjk/10_median +0.0031 +0.0032 2 2 2 2
BM_subset_codepoints/subset_notocjk/64_median -0.0010 -0.0010 2 2 2 2
BM_subset_codepoints/subset_notocjk/512_median -0.0023 -0.0023 9 9 9 9
BM_subset_codepoints/subset_notocjk/4096_median -0.1725 -0.1726 28 23 28 23
BM_subset_codepoints/subset_notocjk/32768_median -0.0277 -0.0287 140 137 140 136
BM_subset_codepoints/subset_notocjk/100000_median -0.0929 -0.0926 162 147 162 147
2022-05-03 22:45:39 +00:00
Garret Rieger
f0c04114bc
[subset] Embed unicode to gid list vector in subset plan.
2022-05-03 22:02:59 +00:00
Behdad Esfahbod
15fa8afb21
Add fast-path for big-endian 32-bit byteswap
...
Speeds up cmap format-12 decoding by some 40% as measured by
the newly added test in perf/benchmark-font!
2022-05-02 16:46:41 -06:00
Behdad Esfahbod
3fff2e9182
[perf/benchmark-font] Cosmetic
2022-05-02 16:42:10 -06:00
Behdad Esfahbod
307d2d8bb6
[cmap] Sprinkle some 'unlikely's
2022-05-02 16:30:22 -06:00
Garret Rieger
85ec5cbcef
[subset] In _populate_unicodes_to_retain populate unicodes in order.
...
Allows the set insert to take advantage of page lookup cache.
2022-05-02 22:29:43 +00:00
Garret Rieger
088133d939
[subset] cache cp to new gid list in subset plan.
...
This avoids having to recompute the ordered list multiple times during cmap generation.
2022-05-02 21:29:16 +00:00
Garret Rieger
6922a2561f
[subset] Change serialize_rangeoffset_glyid back to using iterator.
2022-04-29 23:30:32 +00:00
Garret Rieger
c66fd50c26
[subset] in cmap4 serialization save cp to gid iter to memory.
...
Iterator accesses are slow and it's iterated multiple times.
2022-04-29 23:18:53 +00:00
Garret Rieger
17b98563dc
[subset] In cmap4 serialization reduce unnessecary calls into the iterator.
...
Gives ~20% speedup for large subsets.
2022-04-29 22:49:02 +00:00
Garret Rieger
5e241094bf
[subset] In unicodes cache cleanup if set insert fails.
2022-04-29 22:45:16 +00:00
Garret Rieger
a424a92ce5
[subset] s/void */intptr_t.
2022-04-29 22:14:03 +00:00
Garret Rieger
aad67f5629
[subset] cache results of collect_unicodes.
2022-04-29 22:05:34 +00:00
Garret Rieger
b4236b7de6
[subset] Optimize Cmap4 collect_unicodes.
...
Use set add_range() instead of individual add() calls.
2022-04-29 19:22:00 +00:00
Behdad Esfahbod
067225a86d
[set] Optimize const page_for() using last_page_lookup caching
...
Similar to previous commit.
This speeds up SetLookup benchmark by 50%, but that's because that
lookup always hits the same page...
2022-04-29 13:04:36 -06:00
Behdad Esfahbod
c283e41ce3
[set] Optimize non-const page_for() using last_page_lookup caching
...
This speeds up SetOrderedInsert tests by 15 to 40 percent, and the
subset_mplus1p benchmarks by 9 to 27 percent.
2022-04-29 12:45:48 -06:00
Behdad Esfahbod
d8292b8446
[CFF] Fix parsing of empty Index
...
https://github.com/harfbuzz/harfbuzz/issues/3545#issuecomment-1111047941
2022-04-27 12:38:35 -06:00
David Corbett
6454cec085
[USE] Classify U+10A38 as CONS_MOD_BELOW
2022-04-24 11:41:32 -06:00
Khaled Hosny
f7aee78e90
4.2.1
2022-04-24 05:47:57 +02:00
Behdad Esfahbod
6695bf0560
[gsubgpos] Remove wrong condition in Context application
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3545
2022-04-22 13:48:41 -06:00
Behdad Esfahbod
8575a8f50c
Add _hb_codepoint_is_regional_indicator()
2022-04-21 11:15:34 -06:00
Behdad Esfahbod
c1ee7d28f3
Typo
...
Co-authored-by: Khaled Hosny <khaled@aliftype.com>
2022-04-21 11:15:34 -06:00
Behdad Esfahbod
4d48fae4f2
Enforce Regional_Indicators native direction to LTR
...
And undo the morx direction reversal change introduced in
https://github.com/harfbuzz/harfbuzz/pull/3315
23159084b4
This fixes original bug https://github.com/harfbuzz/harfbuzz/issues/3314
And the reversion in morx code fixes regressions:
https://github.com/harfbuzz/harfbuzz/issues/3528
https://github.com/harfbuzz/harfbuzz/issues/3535
Supersedes:
https://github.com/harfbuzz/harfbuzz/pull/3529
2022-04-21 11:15:34 -06:00
Behdad Esfahbod
a85461b9b6
Add link to Context LookupFlag discussion
...
https://github.com/harfbuzz/harfbuzz/discussions/3538
2022-04-20 12:13:40 -06:00
Simon Cozens
9e59c401e0
[myanmar] Reword confusing comment about masks
2022-04-20 11:25:15 -06:00
Behdad Esfahbod
903cf8cfce
[check-static-inits] Unbreak test
2022-04-13 15:31:51 -06:00
Behdad Esfahbod
ec925ece05
[khmer] Reinstate a pause after basic features
...
This was removed as part of 044d7a06db
,
which caused the regression. Just adding a pause fixes the shaping.
Debugged by just tracing the good/bad shaping and observing the
lookup orders intermingling in the bad shaping.
Test:
hb-shape LeelawUI.ttf --unicodes U+1780,U+17D2,U+179A,U+17BB
Fixes https://github.com/harfbuzz/harfbuzz/issues/3531
2022-04-13 11:54:08 -06:00
Khaled Hosny
88bb746b42
[blob] Return nullptr from create_from_file_or_fail
...
Fix a couple of cases where it would return empty blob, possibly
missed in bdfed8f113
.
2022-04-01 02:38:23 +02:00
Behdad Esfahbod
b179d357a9
[main] Fix unused-variable warnings
2022-03-30 12:59:52 -06:00
Khaled Hosny
9d5730b958
4.2.0
2022-03-30 15:08:34 +02:00
Behdad Esfahbod
044d7a06db
[indic-like] Add per-lookup per-syllable flag
...
This allows mix-and-matching per-syllable and other lookups.
In fact, removes the clear-syllables call completely.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3513
2022-03-28 17:39:54 -06:00
Behdad Esfahbod
61486746d3
Revert "[indic] Clear syllables before presentation features"
...
This reverts commit 90f09b1e87
.
This regressed Indic shaping. See:
https://github.com/harfbuzz/harfbuzz/issues/3513
2022-03-28 15:57:07 -06:00
Behdad Esfahbod
e8f3397f4e
[matcher] Simplify syllable initialization
2022-03-28 13:23:37 -06:00
Behdad Esfahbod
94f5c630fc
[aat] Remove morx deleted-glyphs before GPOS processing
...
Fixes new Apple Color Emoji glyphs sequences rendering.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3512
2022-03-28 13:10:56 -06:00
David Corbett
0dcbdbde9c
[indic] Categorize U+0D04 as Consonant_Placeholder
2022-03-26 21:02:08 -06:00
Behdad Esfahbod
a665e29ed7
[use] Avoid O(n^2) in the machine
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3502
2022-03-25 15:17:55 -06:00
Behdad Esfahbod
ccd9161bfd
[apply-lookup] Try to fix the logic for contextual lookups
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1611
Notably, this fixes Myles's AdditionFont:
https://litherum.blogspot.com/2019/03/addition-font.html
Test with AdditionFont, eg.:
$ util/hb-view AdditionFont.otf =1112112+1113134=
2022-03-25 15:14:40 -06:00
Behdad Esfahbod
fa15fc44bb
[subset] Require exact harfbuzz version in .pc file
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1446
2022-03-25 15:00:36 -06:00
Behdad Esfahbod
b619b05f39
[subset] Adjust name in .pc file
2022-03-25 15:00:36 -06:00
Khaled Hosny
1229078660
[set] Fix annotation
2022-03-25 22:41:25 +02:00
Behdad Esfahbod
3a78cf92c8
[gvar] Fix decoding of private vs shared points
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3506
2022-03-25 13:25:28 -06:00
Behdad Esfahbod
a02fb4a0dc
[glyf] Don't bail rendering glyf even if gvar failed
...
Part of https://github.com/harfbuzz/harfbuzz/issues/3506
2022-03-25 13:25:28 -06:00
Behdad Esfahbod
0a38878549
[set] Minor touch-up on the previous commit
2022-03-25 09:42:36 -06:00
Andrew John
0182988229
[set] Add call to export set contents to an array. ( #3500 )
...
[set] Add hb_set_next_many.
2022-03-25 09:36:44 -06:00
aneejit1
a55a42444d
Meson build writes to the source directory (issue #3507 ) ( #3508 )
...
Don't write to source directory if files did not change
Remove writes to the source directory which cause a meson build failure
if the source directory is read-only.
https://github.com/harfbuzz/harfbuzz/pull/3508
2022-03-24 14:16:41 -06:00
Behdad Esfahbod
bf2a845a17
[ot-layout] Comment
2022-03-24 13:09:53 -06:00
Behdad Esfahbod
a792e16e48
[ot-layout] Change max nesting level of lookups from 6 to 64
2022-03-24 13:08:51 -06:00
Garret Rieger
444c2375a1
[reorg] Use relative includes for hb-ot-layout-gsubgpos.hh
2022-03-23 18:05:24 -06:00
Garret Rieger
b342adeb96
[reorg] Move GSUB into OT::Layout::GSUB namespace.
2022-03-23 18:05:24 -06:00
Garret Rieger
a9910e258f
[reorg] Move SubstLookup and GSUB into the new layout.
2022-03-23 18:05:24 -06:00
Garret Rieger
90af2143d5
[reorg] Move ReverseChainSingleSubst to new layout.
2022-03-23 18:05:24 -06:00
Garret Rieger
403feb3804
[reorg] Move LigatureSubst to new layout.
2022-03-23 18:05:24 -06:00
Garret Rieger
6a369389d6
[reorg] Move AlternateSubst to new layout.
2022-03-23 18:05:24 -06:00
Garret Rieger
dea0681db2
[reorg] Move MultipleSubst into new layout.
2022-03-23 18:05:24 -06:00
Behdad Esfahbod
7243bf3e41
[reorg] Use relative include
2022-03-23 18:05:24 -06:00
Behdad Esfahbod
c180f93766
[reorg] Move sanitize/dispatch and size macros to top
2022-03-23 18:05:24 -06:00
Garret Rieger
f577d02f4a
[reorg] Fix check-* scripts to work with sources files in directories.
2022-03-23 18:05:24 -06:00
Garret Rieger
3ef180db44
[reorg] Move SingleSubst opentype fields to top of the classes.
2022-03-23 18:05:24 -06:00
Garret Rieger
7dfd9e7001
[reorganization] WIP move single substitution into separate files.
2022-03-23 18:05:24 -06:00
Khaled Hosny
c36844d6d9
4.1.0
2022-03-23 07:20:59 +02:00
Behdad Esfahbod
d35c73cd37
[buffer] Whitespace
2022-03-22 13:09:50 -06:00
Behdad Esfahbod
1449498e1d
[ot-font] Vertically center glyph in vertical writing fallback
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/537
2022-03-21 21:40:07 -06:00
Behdad Esfahbod
bf03d7e962
[ot-font] Use ascent+descent for fallback vertical advance
...
This matches what FreeType does.
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/537
2022-03-21 21:27:31 -06:00
Behdad Esfahbod
df42d28d18
[hmtx] Change default advance for horizontal direction to upem/2 again
2022-03-21 21:17:15 -06:00
Behdad Esfahbod
6d0e67dee0
[ot-font] Only use vmtx side-bearing if table exists
...
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/537
2022-03-21 21:07:28 -06:00
Behdad Esfahbod
f41945e313
[cmap] In collect_unicodes() of format 12/13, limit to max Unicode
...
Fixes fuzzer timeout:
https://oss-fuzz.com/testcase-detail/5062368881672192
2022-03-21 18:24:30 -06:00
Behdad Esfahbod
03085132ba
[buffer] Fix out-buffer under memory-alloc failure
...
This was broken in July refactoring of the buffer, and exposed to
ReverseChainSingleSubstFormat1 in 3807061d63
Fixes:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38800
https://bugs.chromium.org/p/chromium/issues/detail?id=1303552
2022-03-21 18:09:06 -06:00
Khaled Hosny
116cc69236
[set] Fix documentation
2022-03-22 00:15:23 +02:00
Behdad Esfahbod
90f09b1e87
[indic] Clear syllables before presentation features
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3488
2022-03-21 15:42:08 -06:00
Behdad Esfahbod
4289684cdb
[set] Fix-up previous commits
2022-03-21 15:37:05 -06:00
Andy John
1176620ba4
Move fn, fix doc.
2022-03-21 15:32:59 -06:00
Andy John
7d802994be
Remove null checks.
2022-03-21 15:32:59 -06:00
Andy John
ef588ea97b
Add option to insert a sorted arrays of values to sets.
2022-03-21 15:32:59 -06:00
Andy John
7a1e79c3ba
Fix typo.
2022-03-21 14:34:22 -06:00
Andy John
4ee00f943f
Use bit shifting instead of multiplying and dividing.
2022-03-21 14:34:22 -06:00
Andy John
3125f5ae33
Add log base 2 versions of constants.
2022-03-21 14:34:22 -06:00
Behdad Esfahbod
1ffe637a0e
[coretext] Remove dead code
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3484
2022-03-21 10:37:42 -06:00
TheBluuDot
7bdc20ec81
restores unintended addition in 43be5ba
...
restores two lines in restore in _hb_allocate_lig_id function that were unintentionally deleted in 43be5ba
2022-03-19 15:12:25 -04:00
Qunxin Liu
7cb002cb58
[subset] bug fix in prune_langsys
...
we should not cache visited langsys cause 2 different Record<Langsys>
could have different Tag while pointing to the same Langsys, a langsys
is redundant in Record<Langsys> A does not mean it's redundant in Record
B. Same thing for visited_script.
Also adding the number of features in the LangSys's feature list to the
visited langsys count so it's more accurate.
Plus some improvement in langsys compare()
2022-03-16 13:08:13 -06:00
Behdad Esfahbod
cad2fe8e63
[baseline] Fix HB_NO_METRICS build
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3482
2022-03-15 10:49:29 -06:00
Behdad Esfahbod
a8a89b80b4
[layout] Whitespace
2022-03-15 10:48:03 -06:00
Behdad Esfahbod
21f5ef56f5
[metrics] Simplify x-height fallback
2022-03-15 10:45:50 -06:00
Behdad Esfahbod
6bf8f0a38f
[baseline] Use ot-metrics fallback API
2022-03-15 10:44:41 -06:00
Dominik Röttsches
965cf1d665
Make load_num_glyphs_from_loca conditional on HB_NO_BORING_EXPANSION
...
Fixes build errors complaining about this function being unused.
2022-03-14 15:16:35 +02:00
David Corbett
49fb8f9072
[USE] Treat visible viramas like dependent vowels
2022-03-13 14:45:27 -06:00
Khaled Hosny
1f79ba9407
4.0.1
2022-03-11 20:19:04 +02:00
Qunxin Liu
a35757c6bc
[repacker] expose hb_subset_repack() API, hb_object_t and hb_link_t structs
2022-03-10 17:26:20 -07:00
Matthias Clasen
e7ab42b246
[layout] Fix handling of baseline variations
...
For BASE table format 1.1, the handling of design
space vs user space coordinates was inconsistent.
We were applying design -> user transformation
twice for the deltas, leading to wrong baseline
values.
Patch by Ebrahim Byagowi <ebrahim@gnu.org>
Fixes : #3476
2022-03-10 09:29:56 -07:00
David Corbett
e5707a440c
Update IANA Language Subtag Registry to 2022-03-02
2022-03-08 13:28:25 -07:00
David Corbett
13bb46cfd5
[USE] Remove obsolete overrides
2022-03-06 16:04:18 -07:00
David Corbett
c33468d48e
[USE] Treat all gc=Cn as independent clusters
2022-03-06 10:44:37 -07:00
David Corbett
e497a8f142
[USE] Remove obsolete symbol/punctuation overrides
2022-03-06 10:44:37 -07:00
David Corbett
854219e056
[USE] Simplify `not_ccs_default_ignorable`
2022-03-06 10:44:37 -07:00
David Corbett
6e059a46b7
[USE] Allow any non-numeric tail in symbol cluster
2022-03-06 10:44:37 -07:00
David Corbett
5b0a59812d
[USE] Restore the category WJ
2022-03-06 10:44:37 -07:00
Florian Pircher
05b3bdb0b3
[aat] Update OT to AAT mappings for hist and vrtr
2022-03-05 20:36:40 -07:00
luz paz
cf3a0f7ab5
Fixed various misc. typos
...
Found via `codespell -q 3 -S ./perf/texts -L actualy,als,ba,beng,clen,crasher,dependant,eachother,fo,gir,inout,ist,nd,ned,ot,pres,ro,statics,te,teh,timne`
2022-03-06 04:59:24 +02:00
Khaled Hosny
8d1b000a3e
4.0.0
2022-03-01 21:27:32 +02:00
Khaled Hosny
6e466256e4
[doc] Typo
2022-03-01 12:01:18 +02:00
Garret Rieger
f6071c16b0
[subset] Rename codepoint -> unicode in subset plan api
2022-02-28 23:45:40 +02:00
Khaled Hosny
1b5a2e0809
[doc] Various fixes to newly added documentation
2022-02-28 10:11:42 -07:00
Behdad Esfahbod
222301bfa4
Merge pull request #3429 from harfbuzz/external_plan
...
[subset] expose subset plan in public subsetting API
2022-02-24 12:55:01 -07:00
Behdad Esfahbod
651c280d0b
[style] Move the negation into the constant
2022-02-18 18:21:46 -06:00
Matthias Clasen
16b232be0e
[hb-style] Fix the sign of slant ratios
...
We want negative slant angles to yield
positive slant ratios. Fix that.
Test included.
2022-02-18 18:10:34 -06:00
Matthias Clasen
e76061a737
[hb-style] Fix synthetic slant values
...
When reporting the slant ratio of a font
that has synthetic slant set, we were
reporting twice the expected value.
Fix that. Test included.
2022-02-18 17:53:54 -06:00
Behdad Esfahbod
56f11ec938
[buffer] Add HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3454
2022-02-18 17:52:27 -06:00
Garret Rieger
fc1548cf71
[subset] document return values.
2022-02-17 17:16:31 -08:00
Matthias Clasen
f6efe34f5e
[ot-metrics] Synthesize missing metrics
...
Add a variant of hb_ot_metrics_get_position that
synthesizes missing values.
New api: hb_ot_metrics_get_position_with_fallback
2022-02-17 18:34:59 -06:00
Behdad Esfahbod
f8e9e315bb
Merge pull request #3437 from matthiasclasen/synthesize-missing-baselines
...
[BASE] Synthesize missing baselines
2022-02-17 14:34:46 -06:00
Behdad Esfahbod
8e900f2cda
Revert "hb-algs.hh: Fix build on Visual Studio 2015"
...
This reverts commit 52c536bb8d
.
See https://github.com/harfbuzz/harfbuzz/pull/3448
2022-02-17 13:29:04 -06:00
Matthias Clasen
95bb2ff719
[ot-layout] Add central baselines
...
Add HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_CENTRAL
and HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_CENTRAL
which are the centers of the ideographic em-box
and face box.
2022-02-16 17:37:35 -06:00
Matthias Clasen
f81578fd86
[ot-layout] Synthesize missing baselines
...
Add a variation of hb_ot_layout_get_baseline that
synthesizes missing baselines, using heuristics in part
taken from the CSS Inline Layout Module, Level 3.
Includes some new tests for synthesized baselines.
The base2.ttf is a subset of Noto Sans Bengali that
includes just the Bengali Ka.
New API: hb_ot_layout_get_baseline_with_fallback
2022-02-16 17:37:33 -06:00
Behdad Esfahbod
5de67c8961
[ot-layout] Remove commented-out prototypes
...
Not gonna happen.
2022-02-16 17:08:19 -06:00
Behdad Esfahbod
d2998faad3
Merge pull request #3410 from harfbuzz/boring-expansion
...
[Boring Expansion] >64k loca & hmtx tables
This does two things:
The num-glyphs reported by the face now is the maximum reported by the maxp and that deduced from the length of the loca table; I think this is the right thing to do anyway; According to OpenType such loca tables are invalid.
The interpretation hmtx tables that have excessive bytes at the end, again, invalid according to OpenType, has changed. Previously we were interpreting those excessive bytes as extra lsb values. Now we interpret them as extra advance values, the last of which is repeated for all missing glyphs. Again, these are tables that are invalid according to OpenType, and the advances are for glyph indices beyond maxp table's num-glyphs.
The combined effect is that the font can have shapes and advances for gid's beyond the maxp limit of 64k. In fact, maxp table becomes optional.
2022-02-16 14:37:09 -06:00
Behdad Esfahbod
98079109e6
[ot-layout] Add +hb_ot_layout_get_horizontal_baseline_tag_for_script()
...
New API:
+hb_ot_layout_get_horizontal_baseline_tag_for_script()
2022-02-16 13:54:22 -06:00
Matthias Clasen
9909e33268
Improve docs for hb_ot_layout_get_ligature_carets
...
Add some relevant details to the documentation
for this function.
Fixes : #3168
2022-02-15 18:48:54 -06:00
Behdad Esfahbod
a396543ae1
Merge pull request #3411 from harfbuzz/draw
...
[draw] Finish and release draw API
2022-02-15 18:47:55 -06:00
Behdad Esfahbod
f567b55619
[face] Use max numGlyphs of maxp and loca
2022-02-15 18:26:43 -06:00
Behdad Esfahbod
c8fd8c1337
[ot-face] Use core tables
2022-02-15 18:13:44 -06:00
Behdad Esfahbod
2a430790ad
[machinery] Add "core table" machinery
...
To be used in subsequent commit; or tried anyway.
2022-02-15 17:53:33 -06:00
Behdad Esfahbod
67eb9acf79
[config] Add HB_NO_BORING_EXPANSION
2022-02-15 17:17:49 -06:00
Behdad Esfahbod
8b7ccc41c4
[hmtx] Implement [boring-expansion] >64k expansion
...
This implements https://github.com/be-fonts/boring-expansion-spec/issues/7
2022-02-15 14:15:12 -06:00
Behdad Esfahbod
431c948ed7
[hmtx] Document
2022-02-14 14:13:04 -06:00
Behdad Esfahbod
be4ddcc30b
[hmtx] Rename internal num_advances to num_long_metrics
2022-02-14 14:12:07 -06:00
Behdad Esfahbod
622cbc485f
[hmtx] Internal rename num_metrics to num_bearings
2022-02-14 14:09:40 -06:00
Behdad Esfahbod
ed6d287d11
[ot-face] Load num-glyphs from `loca` table before `maxp`
...
Implements [boring-expansion] [maxp] Relax
https://github.com/be-fonts/boring-expansion-spec/issues/6
2022-02-14 13:52:30 -06:00
Behdad Esfahbod
93962977bc
Remove return of void
2022-02-13 19:38:59 -06:00
Ebrahim Byagowi
d4588204e5
[draw/glyf] Emit empty contours
...
This makes it actually match freetype behaviour even though rasterizer
should filter such contours specially for stroking.
See https://github.com/harfbuzz/harfbuzz/pull/3411#discussion_r802283827 for the context.
2022-02-13 23:50:53 +03:30
Behdad Esfahbod
94517850dd
[algs] Fix typo in hb_pair_t conversion operator
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2083
2022-02-13 13:39:26 -06:00
Khaled Hosny
f942874fac
[draw] Fix some introspection warnings
2022-02-13 13:21:15 -06:00
Behdad Esfahbod
0858463ac3
[draw/glyf] Don't skip empty contours of size 2
...
See:
https://github.com/harfbuzz/harfbuzz/pull/3411#discussion_r804988217
2022-02-13 13:21:15 -06:00
Behdad Esfahbod
57aa8c3b3a
[draw] Another try at a stable draw moveto semantic
2022-02-13 13:21:15 -06:00
Behdad Esfahbod
151f205819
[draw] Emit move_to immediately, like other operators
2022-02-13 13:21:15 -06:00
Khaled Hosny
628847b5c8
[doc] Link to respective draw callback functions
2022-02-13 13:21:14 -06:00
Khaled Hosny
7245298e25
[doc] Document HB_DRAW_STATE_DEFAULT
2022-02-13 13:21:14 -06:00
Khaled Hosny
8e892bdb54
[doc] Message draw documentation a bit
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
cdf1cb35db
[draw] Destroy callback data
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
c56c13756b
[draw] Document more
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
2376230523
[draw] Flesh out docs a bit
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
bc6c3b8401
[font] Update get_glyph_shape() doc
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
732c749ef7
[font] Adjust synthetic-slant docs
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
59067db9f4
[font/draw] Slant drawings
...
Need to update hb_font_set_synthetic_slant() docs now that we do this.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
aa5c7a3811
[draw-session] Add slant
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
4f2704adb6
[draw] Add more reserved items to hb_draw_state_t
...
Since these are free basically.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
2ce19f2868
[font/draw] Fetch shape from parent font if not implemented in font
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
d6b61dff95
[draw] Minor cleanup
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
6d5b998f25
[ft/draw] Implement hb-draw for hb-ft
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
370bec938b
[draw] Rename internal draw_session_t to hb_draw_session_t
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a357e5d889
[draw] Do quadratic-to-cubic conversion in nil quadratic implementation
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
c681331c3f
[draw] Rename internal draw_helper_t to draw_session_t
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
f1a9a9ccaf
[draw-state] Pass state down to callbacks
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a9dd9f0bae
[draw] Add public move_to/line_to/... API that take a draw-state
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
ebc2a133c3
[draw] Rename internal methods
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
86fcd4fe98
[draw] Simplify start_path
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
1740916ede
[draw] Remove check for no-op
...
This is unnecessary overhead. Up to rasterizers to handle this. Plus,
this throws off point-numbers in uses that rely on it.
Disabled one test that broke with this.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
fc78592e67
[draw-state] Add type and use in draw-helper
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a755f93e8d
[draw] Add TODO
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
cdb1a1fc06
[draw] Add REPLACEME
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
8b4f429000
[draw] Virtualize hb_font_draw_glyph() into hb_font_get_glyph_shape()
...
To be implemented in hb-ft.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
92e6e53b30
[draw] Rename user_data to draw_data
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
3b915389b5
[draw] Remove unneeded roundf() calls
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
2bed4f46fb
[draw] Fix draw signatures
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
e0ac6c587b
Remove remaining traces of HB_EXPERIMENTAL_API
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
27dfd69fc7
[draw] Another Since: tag update
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
7ac23f4e78
[draw] Whitespace
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
e157b50345
[draw] Remove return value of hb_font_draw_glyph()
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
ddc36df332
[draw] Move hb_font_draw_glyph() to hb-draw-glyph.cc
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
9a1508a2be
[draw] Replace API Since tags with REPLACEME
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a428c1193c
[main] Fix compiler warnings
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
35190dc961
[draw] Convert API to float instead of hb_position_t
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
d6e49b8278
[font] Add em_fscalef_[xy] That take and return float
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
6c0b65a6a8
[font] Add em_scaleff() that returns float
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
dd7b6e2c3f
[draw] Remove EXPERIMENTAL_API tag
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
7af165dbf0
Fix compiler warning
2022-02-12 21:25:36 -06:00
Khaled Hosny
0a12996134
3.4.0
2022-02-13 00:30:50 +02:00
Khaled Hosny
41815a0d63
[name] Extraneous (out) annotation in return value
2022-02-13 00:00:01 +02:00
Behdad Esfahbod
b263371b09
Merge pull request #3398 from harfbuzz/buffer-verify
...
Add HB_BUFFER_FLAG_VERIFY
2022-02-12 15:06:47 -06:00
Behdad Esfahbod
42b119edb5
[hmtx] Remove other subset-specific method from hmtx accelerator
2022-02-12 14:22:35 -06:00
Behdad Esfahbod
9ba520b5d1
[hmtx] Remove one subset-specific method from hmtx accelerator
...
Looks ugly but is the right thing to do.
2022-02-12 14:22:35 -06:00
Garret Rieger
27a6c895ba
[subset] Fix memory leak in plan creation.
2022-02-11 16:19:43 -08:00
Garret Rieger
670ef070bd
[subset] Change subset plan create to be or_fail.
2022-02-11 16:01:33 -08:00
Garret Rieger
ae8d373bcf
[subset] add subset plan reference, set/get user data functions.
2022-02-11 14:54:23 -08:00
Garret Rieger
b65e48a786
[subset] Add subset plan to public API.
...
Add the ability to create a subset plan which an be used to gather info on things like glyph mappings in the final subset. The plan can then be passed on to perform the subsetting operation.
2022-02-11 14:37:21 -08:00
Behdad Esfahbod
6893723879
[machinery] Allow using lazy-loader with void*
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3427
2022-02-11 14:28:51 -06:00
Chun-wei Fan
52c536bb8d
hb-algs.hh: Fix build on Visual Studio 2015
...
The compiler does not recognize the std::hash call on
hb_decay<decltype (hb_deref (v)>, so give it a shove so that it is recognized
there.
2022-02-10 13:26:56 -06:00
Alexis King
81754a5a96
[ot-math] Add hb_ot_math_get_glyph_kernings
...
closes #3396
2022-02-09 12:03:07 -06:00
Alexis King
1bc4bad7a5
[ot-tag] Add HB_SCRIPT_MATH (Zmth) and map it to OT ‘math’ tag
...
The ISO 15924 code for mathematical notation is ‘Zmth’, but the
OpenType script is ‘math’.
2022-02-08 12:40:15 -06:00
Khaled Hosny
76cd8a4737
[arabic] Update to AMTRA revision 6
...
https://www.unicode.org/reports/tr53/tr53-6.html#Modifications
2022-02-08 12:38:51 -06:00
Khaled Hosny
ac46c3248e
3.3.2
2022-02-06 15:41:18 +02:00
Behdad Esfahbod
88798ee8be
[GPOS] Disable split-kerning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3408
Reverts https://github.com/harfbuzz/harfbuzz/pull/3235
Fixes https://github.com/harfbuzz/harfbuzz/pull/3235#issuecomment-1029814978
2022-02-04 19:01:57 -06:00
Behdad Esfahbod
9177953720
[atexit] Allow hb_atexit redefinition
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3412
2022-02-04 12:38:45 -06:00
Behdad Esfahbod
8670ffbf4c
[buffer] Comment
2022-02-03 11:19:23 -06:00
Behdad Esfahbod
e59da2871a
[glyf] Don't store face in accelerator
2022-02-01 16:32:39 -06:00
Khaled Hosny
45df259538
3.3.1
2022-01-31 23:06:10 +02:00
Garret Rieger
4e2f409bce
[subset] Don't hold references to members of the active_glyph_stack.
...
These references may get invalidated after the vector for the stack is resized. Fixes: https://oss-fuzz.com/testcase-detail/5422577634377728
2022-01-31 22:58:53 +02:00
Khaled Hosny
98da330638
3.3.0
2022-01-31 18:39:06 +02:00
David Corbett
ae9afd9772
Let BCP 47 tag "mo" fall back to OT tag 'ROM '
2022-01-30 14:32:59 -05:00
David Corbett
a184c5f851
Don’t always inherit from macrolanguages
...
If an OpenType tag maps to a BCP 47 macrolanguage, that is presumably to
support the use of the macrolanguage as a vague stand-in for one of its
individual languages. For example, "ar" and "zh" are often used for
"arb" and "cmn". When the OpenType tag maps to a macrolanguage and some
but not all of its individual languages, that indicates that the
OpenType tag only corresponds to the listed individual languages (which
may be referred to using the macrolanguage subtag) but not the missing
individual languages. In particular, INUK (Nunavik Inuktitut) is mapped
to "ike" (Eastern Canadian Inuktitut) and "iu" (Inuktitut) but not to
"ikt" (Inuinnaqtun), so "ikt" should not inherit the INUK mapping from
its macrolanguage "iu".
2022-01-30 13:28:23 -05:00
Behdad Esfahbod
b47b3b9972
[fallback-kern] Move buffer message to correct position
2022-01-29 10:24:38 -07:00
Behdad Esfahbod
e986c12075
[verify] Show buffer input text when verification fails
2022-01-29 09:08:48 -07:00
Behdad Esfahbod
3972e0a8f1
[buffer] Whitespace
2022-01-29 08:22:19 -07:00
David Corbett
0b1bf89cc2
Replace “[family]” with “[collection]”
...
Not all language collections are language families.
2022-01-29 10:15:23 -05:00
David Corbett
0e31595e0d
Infer tag mappings for unregistered macrolanguages
...
Every macrolanguage not mentioned in the OT language system tag registry
is mapped to every tag of its individual languages, if those have
registered tags.
2022-01-29 10:15:23 -05:00
David Corbett
5a6545940a
Add the language system tag INUK
2022-01-28 21:29:43 -05:00
Garret Rieger
bc899650c7
[subset] Fix for issue #3397 .
...
cur_intersected_glyphs gets modified during recursion leading to incorrect filtering of sub tables in some cases. So don't use cur_intersected_glyphs. Instead just add an additional entry onto the parent_active_glyphs () stack.
Additionaly expands NotoNastaliqUrdu tests to include coverage of the issue from #3397 .
2022-01-28 14:20:33 -08:00
Garret Rieger
f3c1f4f0da
[subset] convert active_glyphs_stack to be a vector of hb_set_t instead of hb_set_t*.
2022-01-28 14:20:33 -08:00
Behdad Esfahbod
476a6377a5
[buffer] Document HB_BUFFER_FLAG_VERIFY
2022-01-28 15:05:10 -07:00
Behdad Esfahbod
5b1d813b69
[config] Enable HB_NO_BUFFER_VERIFY in HB_LEAN
2022-01-28 13:53:44 -07:00
Behdad Esfahbod
61823838f9
[buffer] Add HB_BUFFER_FLAG_VERIFY
...
Move buffer verification code inside the library, from util/.
Part of https://github.com/harfbuzz/harfbuzz/issues/3010
2022-01-28 13:53:44 -07:00
Behdad Esfahbod
7c704d8982
[buffer] Make hb_buffer_append() take a const argument
2022-01-28 13:53:44 -07:00
Behdad Esfahbod
24650624c8
[font] Fix build with no-var configs
2022-01-28 13:53:21 -07:00
Behdad Esfahbod
91b779e23c
Avoid redefinition of HB_NO_SETLOCALE in certain configs
2022-01-28 13:52:15 -07:00
Khaled Hosny
fa29006bfa
[doc] Fix generation of hb_glyph_flags_t docs
...
GTK-Doc does not like the empty lines here, and interprets everything
after the first empty line as the description of the enum itself not a
specific member and the generated text makes no sense.
Removing the empty lines makes the text harder to read (both in source
and HTML), but at least it is correctly organized.
2022-01-26 19:10:23 -08:00
Behdad Esfahbod
e9cc5f6cdb
Merge pull request #3297 from harfbuzz/unsafe-to-concat
...
Implement UNSAFE_TO_CONCAT flag
2022-01-26 12:23:29 -08:00
Behdad Esfahbod
540af548dc
[unsafe-to-concat] Clarify documentation as per feedback
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/3297#discussion_r754395825
2022-01-25 09:10:56 -07:00
Behdad Esfahbod
bad5c94562
[test] Remove HB_UNUSED
2022-01-23 10:53:19 -07:00
Behdad Esfahbod
6c09a8b5b0
[test-serialize] Assert len
2022-01-23 10:52:13 -07:00
Behdad Esfahbod
76c6f4164f
[test] Add test-serialize
2022-01-23 10:43:37 -07:00
Behdad Esfahbod
3324606492
[buffer] Oops
2022-01-22 15:46:13 -07:00
Behdad Esfahbod
20031ddbb8
[unsafe-to-concat] Mark in all other shapers
...
unsafe_to_break() implies unsafe-to-concat; but setting the flag
manually wasn't.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
6e345f709d
Cosmetic
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
374a6f186d
[fallback-shape] Add buffer trace log
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
bcdfedbc09
[unsafe-to-concat] Mark as unsafe in kern machine
...
Fixes that last test. Yay!
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
14d43d1235
[unsafe-to-concat] Adjust end conditions
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
8663eda4fd
[unsafe-to-concat] More annotations for MarkMarkPos
...
Failures down to one:
265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach FAIL
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
6a7d6d4b64
[unsafe-to-concat] More annotations for MarkLigaturePos
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
a575992057
[unsafe-to-concat] Mark LigatureSubst
...
Failures down to two:
209/401 harfbuzz:shaping+aots / gpos6 FAIL 0.06s exit status 1
265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach FAIL 0.06s exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
b443898cce
[unsafe-to-concat] Adjust MarkBasePos
...
A couple more aots tests down. Four failing:
209/401 harfbuzz:shaping+aots / gpos6 FAIL 0.06s exit status 1
261/401 harfbuzz:shaping+aots / gsub4_1_multiple_ligatures FAIL 0.07s exit status 1
265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach FAIL 0.07s exit status 1
267/401 harfbuzz:shaping+aots / lookupflag_ignore_combination FAIL 0.07s exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
95d052a791
[unsafe-to-concat] Adjust GPOS lookbacks
...
Fixes Cursive aots test, fails a couple new aots ones.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
909e34f68a
[unsafe-to-concat] Adjust Arabic-joining start boundary condition more
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
11bdd7a020
[unsafe-to-concat] Adjust CursivePos
...
Doesn't fix the test yet.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
ea1b32c8c1
[unsafe-to-concat] Adjust "interior"ness of "from_out_buffer"
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
4f04baef17
[unsafe-to-concat] Further adjust Arabic joining logic at boundary
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
235c3a1295
[unsafe-to-concat] Adjust Arabic joining logic
...
Test failures done one more. Fixed the mongolian-variation-selector
test. Another test case:
$ util/hb-shape NotoSansArabic-Regular.ttf -u 628,200c,628 --show-flags --verify
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
48c5f26199
[unsafe-to-concat] Fix PairPos2 logic
...
Test failures down from 8 to 6:
113/400 harfbuzz:shaping+in-house / mongolian-variation-selector FAIL 0.06s exit status 1
203/400 harfbuzz:shaping+aots / gpos3 FAIL 0.06s exit status 1
204/400 harfbuzz:shaping+aots / gpos4_lookupflag FAIL 0.06s exit status 1
260/400 harfbuzz:shaping+aots / gsub4_1_multiple_ligatures FAIL 0.06s exit status 1
264/400 harfbuzz:shaping+aots / lookupflag_ignore_attach FAIL 0.06s exit status 1
266/400 harfbuzz:shaping+aots / lookupflag_ignore_combination FAIL 0.06s exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
c0058892be
[unsafe-to-concat] Mark entire buffer unsafe-to-concat if kerx format2
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
60006d3687
[gsubgpos] Adjust chaining unsafe-to-concat application
...
Fixes three tests.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
d98a0fc88e
[buffer] Consolidate glyph-flags implementation
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
f91ce56e08
[buffer] Add default cluster value in find_min_cluster
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
56d081955c
[buffer] Rename _unsafe_to_break_set_mask to _infos_set_glyph_flags
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
78481b32c0
[gsubgpos] Combine input/backtrack/lookahead unsafe-to-concat
...
I feel like this is correct logic. Still have to prove.
Errors unchanged at 10.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
596bc7e939
[unsafe-to-concat] Add to GPOS kerning
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
e1cbd4539f
[unsafe-to-concat] Add annotations to GPOS and kern
...
Failures from 13 to 14.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
3122c2cdc4
[buffer] Add HB_GLYPH_FLAG_UNSAFE_TO_CONCAT
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1463
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
a8b7f18804
[cff] Initialize accelerator members
2022-01-21 07:38:33 -07:00
Behdad Esfahbod
cce37a6f10
[gpos] Fix conditional
2022-01-21 07:31:21 -07:00
Behdad Esfahbod
773cf4fdd3
[post] Initialize variables
2022-01-21 07:30:09 -07:00
Behdad Esfahbod
84aa1a836c
[PairPos] Split GPOS kerning to both sides ( #3235 )
2022-01-20 14:18:19 -07:00
Behdad Esfahbod
ae9fc7f533
Clean accelerators a bit more
2022-01-20 12:37:21 -07:00
Behdad Esfahbod
0ae6659398
Merge pull request #3392 from harfbuzz/auto-accelerators
...
Auto accelerators
2022-01-20 11:28:59 -08:00
Behdad Esfahbod
ac1bb3e39e
[machinery] Move accelerators to constructor/destructor
2022-01-20 12:10:05 -07:00
Garret Rieger
112cb9fe69
[repacker] Fix missing initilization of obj in vertex_t.
2022-01-20 08:03:52 -08:00
Behdad Esfahbod
e062376ef1
[machinery] Make accelerator lazy-loader call Xinit/Xfini
...
Instead of init/fini. To isolate those functions. To be turned into
constructor/destructors, ideally one per commit (after some SFINAE
foo.)
2022-01-19 17:09:34 -07:00
Behdad Esfahbod
2d12fc90a4
[ms-feature-ranges] Pass reference to cmp function
2022-01-19 14:01:34 -07:00
Behdad Esfahbod
ac109c9353
[ms-feature-ranges] Inline code in header file
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3387
2022-01-19 12:22:02 -08:00
Behdad Esfahbod
376738d411
[coretext] Fix lsearch
2022-01-19 11:58:42 -07:00
Behdad Esfahbod
106388e766
[vector] Merge sorted-vector into vector
...
Was easier than I thought!
Let's see what the bot gods think...
2022-01-19 11:38:37 -07:00
Behdad Esfahbod
294d50ff35
[vector] Add sorted template argument
2022-01-19 11:32:14 -07:00
Behdad Esfahbod
cd9799784c
[vector] Remove old find() method
2022-01-19 11:14:25 -07:00
Behdad Esfahbod
849e40b4db
[ms-feature-ranges] Use preferred vector search API
2022-01-19 11:06:33 -07:00
Behdad Esfahbod
7e160dc347
[gpos] Fix unsafe-to-break of mark-attachment
...
This was undetected because most of the time marks were in same
cluster of their base already.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3093
2022-01-19 09:27:55 -07:00
Behdad Esfahbod
c8195dbc01
Merge pull request #3365 from harfbuzz/gdef-fix
...
GDEF fix
2022-01-19 06:56:05 -08:00
Garret Rieger
94ba4d5a44
[subset] Fix bound check when setting overlap bit.
...
length() shouldn't be used again as the end of instruction offset is already included in flags_offset.
2022-01-18 19:16:37 -08:00
Behdad Esfahbod
fe783ac091
[cff] Remove op_str_t nop init/fini
2022-01-18 13:38:28 -07:00
Behdad Esfahbod
8d24ac2662
[cff] Remove init/fini from number_t
2022-01-18 13:14:42 -07:00
Behdad Esfahbod
6ef83c2c31
[vector] Remove .fini_deep()
2022-01-18 13:08:34 -07:00
Behdad Esfahbod
4eb6e6ea16
[cff] Remove some more fini_deep()
2022-01-18 12:07:05 -07:00
Behdad Esfahbod
29f60d1eaa
[cff] Remove init/fini from blend_arg_t
2022-01-18 11:58:16 -07:00
Behdad Esfahbod
213e3f09b1
[vector] Add TODO Emplace?
2022-01-18 11:53:52 -07:00
Garret Rieger
f1dc8b087c
[subset-cff] Convert subr_closures_t to constructor/destructor instead of init/fini.
2022-01-18 10:29:04 -08:00
Behdad Esfahbod
a48aa9850a
[subset-cff] Remove another set of fini_deep
2022-01-18 09:32:58 -07:00
Behdad Esfahbod
07474aa8c6
[subset-cff1] Remove a constructor/destructor pair
2022-01-18 09:29:43 -07:00
Behdad Esfahbod
a1e9a276eb
[subset-cff2] Drop an constructor/destructor pair
2022-01-18 09:27:32 -07:00
Behdad Esfahbod
035f03346d
[str_buff_vec_t] Remove unused fini method
2022-01-18 09:26:30 -07:00
Behdad Esfahbod
de2cef42b4
[bimap] Remove init/fini
2022-01-18 09:21:31 -07:00
Behdad Esfahbod
c3dd21f110
[cff] Remove unneeded init/fini
2022-01-18 09:11:08 -07:00
Behdad Esfahbod
15cceff3d7
[repacker] Replace fini_deep() with fini()
...
Vector calls destructor now.
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
1198fb2468
[vector] Adjust construction criteria
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
c58bfa35fb
[vector] Move semantics in vector remove()
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
5946e945d5
[vector] Destruct in pop()
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
7171917b52
[vector] Construct items when enlarging
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
813eaba6ea
[vector] Start adding destruction
...
Now we need to remove manual destruction, ouch!
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
65a22836f8
[vector] Add XXX markers for remaining places that need work
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
92f179075f
Make hb_coerce static inline
...
That's the pattern we follow.
985b63b3ee (commitcomment-63973544)
2022-01-16 07:51:35 -07:00
Behdad Esfahbod
19793f333b
Better try at previous commit
...
985b63b3ee (commitcomment-63973544)
2022-01-16 07:49:40 -07:00
Behdad Esfahbod
1173ed1f7f
Try fix Mac build
...
985b63b3ee (commitcomment-63973544)
2022-01-16 07:48:02 -07:00
Behdad Esfahbod
c0f57ccc88
[algs] Add default-construtor to hb_pair_t
2022-01-16 07:01:05 -07:00
luz paz
e2e305066a
Fix various typos
...
Found via `codespell -q 3 -S ./perf/texts -L actualy,ba,beng,fo,gir,inout,nd,ot,pres,ro,te,teh,timne`
2022-01-16 05:39:03 -08:00
Behdad Esfahbod
589bea15b7
Fix previous commit
2022-01-15 17:55:10 -07:00
Behdad Esfahbod
b97e4f7084
Further adjust setlocale
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3375#issuecomment-1013783496
2022-01-15 17:47:51 -07:00
Behdad Esfahbod
63affc4eae
[vector] Move semantics when resizing
2022-01-15 12:24:20 -08:00
Behdad Esfahbod
1c50106608
[meta] Include <memory>, for addressof
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3375
2022-01-15 13:09:06 -07:00
Behdad Esfahbod
71e6f742a8
[meta] Remove unused hb_ref()
2022-01-15 13:09:06 -07:00
Garret Rieger
e30511a8de
[map] Correct previous commit, if (...) was reversed.
2022-01-14 16:48:42 -08:00
Garret Rieger
ff4e8c7eac
[map] Fix bad memory access if hb_map.fini() was called twice.
2022-01-14 16:42:39 -08:00
Behdad Esfahbod
8a69e00639
[meta] Use std::addressof() instead of hb_addressof()
2022-01-13 16:17:34 -07:00
Behdad Esfahbod
b7b0a15f7e
[meta] Remove hb_add_const
2022-01-13 15:33:27 -07:00
Behdad Esfahbod
3b2e604237
[meta] Use std::is_const instead of hb_is_const
2022-01-13 15:32:46 -07:00
Behdad Esfahbod
909dde9df1
[meta] Use std::is_reference instead of hb_is_reference
2022-01-13 15:30:10 -07:00
Behdad Esfahbod
47afb3ef04
[meta] Replace hb_is_pointer with std::is_pointer
2022-01-13 15:27:41 -07:00
Behdad Esfahbod
956e0a4d13
[map] Destruct objects
2022-01-13 15:07:10 -07:00
Behdad Esfahbod
bc0a5fdf43
[test-map] Add disabled tests with std::string
2022-01-13 13:34:22 -07:00
Behdad Esfahbod
985b63b3ee
[map] Allow invalid items to be pointer to static object
...
By derefencing them when necessary.
Also, we do not rely on trivially-copyable, so remove that assertion.
2022-01-13 13:33:07 -07:00
Behdad Esfahbod
98b26eedf5
[check-static-inits] Only check library object files
2022-01-13 13:12:10 -07:00
Behdad Esfahbod
1e27f95dc1
[algs] Add hb_coerce()
2022-01-13 13:10:47 -07:00
Behdad Esfahbod
5a91db1135
[map] Remove constexpr invalid items
...
These were non-workable in the general case, eg std::string.
2022-01-13 12:44:48 -07:00
Behdad Esfahbod
114046dc27
[map] Construct objects
2022-01-13 12:38:26 -07:00
Behdad Esfahbod
ca4f56bdc7
[map] Massage some more
...
Towards being able to store arbitrary types.
2022-01-13 12:18:59 -07:00
Behdad Esfahbod
cfe2b66114
[algs] Fix hash chaining to std::hash()
2022-01-13 12:18:59 -07:00
Garret Rieger
87496bf63e
[subset] fix fuzzer timeout if visisted_paint goes into error.
2022-01-13 11:08:24 -08:00
Khaled Hosny
0acf466c44
[doc] Fix hb_font_set_synthetic_slant param name
2022-01-13 01:29:30 +02:00
Behdad Esfahbod
fa12f1ae25
Rename method
2022-01-12 15:08:34 -07:00
Behdad Esfahbod
9408e0d6d1
Rename variable
2022-01-12 15:07:34 -07:00
Behdad Esfahbod
96c969c820
Preserve glyph props
2022-01-12 15:06:40 -07:00
Behdad Esfahbod
0b2c514fb4
More macro cleanup
2022-01-12 11:20:58 -07:00
Behdad Esfahbod
0a42f46ce9
Fix compiler warning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3364
2022-01-12 11:16:17 -07:00
Matthias Clasen
72f0b24ee3
docs: Clarify variation apis ( #3363 )
...
Make it explicit that the variations setters
replace all existing variations, even if
not all axes are included in the provided
values.
Co-authored-by: Matthias Clasen <mclasen@redhat.com>
2022-01-12 11:08:02 -07:00
Matthias Clasen
befe3b5d5a
color: Document empty returns ( #3362 )
...
Document that the SVG and PNG getters return
the singleton empty blob if the glyph has no
color.
Fixes : #1413
Co-authored-by: Matthias Clasen <mclasen@redhat.com>
2022-01-12 11:07:25 -07:00
Behdad Esfahbod
13643934aa
Clean up HB_NO_SETLOCALE
...
https://github.com/harfbuzz/harfbuzz/pull/3358#pullrequestreview-850500143
2022-01-12 10:54:28 -07:00
Behdad Esfahbod
53847dba92
[algs] Call std::hash from hb_hash()
2022-01-12 10:35:28 -07:00
Behdad Esfahbod
74811c501d
[map] Map == / != use correct types
2022-01-12 10:35:28 -07:00
Behdad Esfahbod
ce7f19a2cc
Revert "[map] Actually use k/v invalid types for declaration!"
...
This reverts commit 6f559346ac
.
Err. My bad.
2022-01-10 14:40:27 -07:00
Behdad Esfahbod
6f559346ac
[map] Actually use k/v invalid types for declaration!
2022-01-10 14:29:36 -07:00
Behdad Esfahbod
a45a630539
Fix unintentional locale dependency ( #3358 )
...
Avoid unintentional locale dependency
hb_variation_to_string uses sprintf with %g, which will produce
a locale-dependent decimal point, which is not desired here.
The output is supposed to be compatible with CSS syntax, and
that always uses '.' for the decimal point.
Fix this by changing the per-thread locale to "C" around sprintf call.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3355
Fixes https://github.com/harfbuzz/harfbuzz/pull/3357
Fixes https://github.com/harfbuzz/harfbuzz/pull/3358
Co-authored-by: Matthias Clasen <mclasen@redhat.com>
2022-01-08 16:47:33 -07:00
Matthias Clasen
d70825a6d1
docs: Add some details about coordinates
...
Mention what the effective values are when
coordinates have not been set.
2022-01-08 06:46:22 -08:00
Behdad Esfahbod
0a5c1c9705
[failing-alloc] Make it compile as C++ as well
2022-01-04 14:18:38 -07:00
Behdad Esfahbod
bea5369c6d
[buffer] Rename swap_buffers() to sync()
2022-01-04 10:52:05 -07:00
Behdad Esfahbod
d1e7df5c3f
[buffer] Add enter()/leave() pair around shape()
2022-01-04 07:32:04 -07:00
Behdad Esfahbod
43be5ba442
[buffer] Group shape-related members together
2022-01-04 07:26:53 -07:00
Behdad Esfahbod
52f5711ed0
[buffer] Add hb_buffer_create_similar()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1555
2022-01-03 11:57:42 -07:00
Behdad Esfahbod
f643b81ffc
[buffer] Clean up internal state bookkeeping
...
hb_buffer_reset() was NOT resetting cluster_level. Ouch! Fix that.
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
2022-01-03 11:45:31 -07:00
Behdad Esfahbod
36e9f467a4
[buffer] Overlay segment-properties in hb_buffer_append()
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
2022-01-03 11:23:14 -07:00
Behdad Esfahbod
6a66992842
Add hb_segment_properties_overlay()
...
New API:
+ hb_segment_properties_overlay()
2022-01-03 11:21:29 -07:00
Behdad Esfahbod
165a6073fa
Merge pull request #3338 from harfbuzz/slant
...
[font] Add public API for synthetic slant
2022-01-02 12:02:20 -07:00
Behdad Esfahbod
3fc2e654c0
[metrics] Fix slant calc
2022-01-02 11:56:45 -07:00
Behdad Esfahbod
a7751277e9
[docs] Add hb_font_[gs]et_synthetic_slant()
2022-01-02 11:50:02 -07:00
Behdad Esfahbod
4ab94443bb
[metrics] Ouch. Fix slant code
2022-01-02 11:26:45 -07:00
Behdad Esfahbod
f7d49d9c2b
[metrics] Simplify
2022-01-02 11:16:33 -07:00
Behdad Esfahbod
f1ba1f940f
[metrics] Only scale caret rise/run if font is slanted
2022-01-02 10:58:25 -07:00
Behdad Esfahbod
45c2b6e384
[metrics] Harden math
2022-01-02 10:57:19 -07:00
Behdad Esfahbod
fa008a021f
[metrics] Implement synthetic slant for caret slope
...
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
2022-01-02 10:46:38 -07:00
Behdad Esfahbod
fc329f665f
[metrics] Scale up horizontal caret rise/run
...
Eg. if rise/run are 1/0, we now return upem/0. This is equivalent.
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
2022-01-02 10:43:13 -07:00
Behdad Esfahbod
0df83f52a1
Fix test
2022-01-02 08:01:11 -07:00
Behdad Esfahbod
5b87c30d6b
[font] Mark hb_font_get_var_coords_design() non-experimental
...
Any remaining issue with the API will address later by deprecating it.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1865
2022-01-02 07:53:45 -07:00
Behdad Esfahbod
2d42fc9fbb
[font] Load named-instance if face index top bits are set
...
This matches FreeType behavior.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3348
2022-01-02 07:45:10 -07:00
Behdad Esfahbod
da7dba0002
[face] Clarify face_index handling
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3347
2022-01-01 11:20:20 -07:00
Behdad Esfahbod
6da4b80e5f
[hb-ot-var] Specify normalized 2.14 docs
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3345
2021-12-22 21:51:03 -07:00
Behdad Esfahbod
1b51be57dc
[hb-ot-var] Actually set in/out argument
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/3344
2021-12-22 21:43:48 -07:00
Behdad Esfahbod
06ee40213c
Use invisible-glyph for spaces if font has no ASCII space
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3340
Should add tests ideally.
2021-12-22 21:34:44 -07:00
Behdad Esfahbod
602bd39680
[style] Adjust font slant angle for synthetic slant value
...
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
2021-12-19 21:40:25 -08:00
Behdad Esfahbod
ff697debd8
[GPOS] Apply font synthetic slant
...
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/3196
2021-12-19 21:20:25 -08:00
Behdad Esfahbod
810f5d71c7
[font] Add public API for slant
...
Not hooked up internally to anything.
New API:
+ hb_font_set_synthetic_slant()
+ hb_font_get_synthetic_slant()
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/3196
2021-12-19 21:20:25 -08:00
Garret Rieger
067f90a820
[subset] Fix for fuzzer timeout.
...
Fixes https://oss-fuzz.com/testcase-detail/5549945449480192
In prune_langsys: move LangSys visited check up before any work is done for a LangSys. In this particular case the compare() method is responsible for the majority of the time spent and wasn't being guarded with a visisted check.
2021-12-14 17:34:21 -07:00
Garret Rieger
c4573c2ec7
[repacker] don't infinite loop if visited or roots is in error.
...
Fixes https://oss-fuzz.com/testcase-detail/5205038086094848
2021-12-14 15:57:48 -07:00
Khaled Hosny
be91d2917d
3.2.0
2021-12-12 04:45:54 +02:00
Garret Rieger
77507a1d8d
[subset] Don't double count visit lookups in closure_lookups
...
Each recursed lookup was getting counted once in closure_lookups() and then again in hb_closure_lookups_context_t::recurse.
2021-12-10 15:13:49 -07:00
Garret Rieger
d67025705f
[subset] reset the visited lookup count before each closure iteration.
2021-12-10 15:13:49 -07:00
Behdad Esfahbod
23159084b4
[morx] Reverse graphemese, not whole buffer
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3314
Supersedes https://github.com/harfbuzz/harfbuzz/pull/3315
2021-12-10 15:02:57 -07:00
Behdad Esfahbod
5b995526f7
[buffer] Fix reverse_group() to reverse() at the end
2021-12-10 14:59:56 -07:00
Behdad Esfahbod
21c4fc1011
[buffer] Add optional merge_clusters arg to reverse_groups()
2021-12-10 13:02:43 -07:00
Behdad Esfahbod
e949e51218
[ot-layout] Port foreach_grapheme to buffer foreach_group
2021-12-10 12:58:27 -07:00
Behdad Esfahbod
eb96e69d18
[buffer] Add foreach_group()
2021-12-10 12:55:29 -07:00
Behdad Esfahbod
1b78e04c78
[buffer] Add ::reverse_groups()
2021-12-10 12:45:43 -07:00
Behdad Esfahbod
4cd96e73e4
[buffer] Inline revers_range() / reverse()
2021-12-10 12:33:21 -07:00
Garret Rieger
5914acb3cb
[repacker] Clear distance and position cache when assigning a new space.
...
A change in space will effect the distance assigned to the node and any of it's children so clear the distance cache.
2021-12-10 11:09:03 -07:00
Qunxin Liu
706014f69d
[subset] (Chain)ContextSubst glyph_closure fix
...
- When pos_glyphs is empty, use current full glyphs set as input for
subsequent recursive closure process
- Also increase max_lookup_visit_count to 35000 cause a real font file hit
previous limit 20000 and some lookups are dropped unexpectedly
2021-12-10 11:08:36 -07:00
Garret Rieger
441877f56a
[repacker] add test case for using max priority to resolve an overflow.
2021-12-09 17:46:52 -07:00
Garret Rieger
be2c488e5d
[repacker] Improve vertex priority packing.
...
Previous priority implementation would move a node further back within it's layer, but at max priority was unable to move any further up than that. This updates the implementation to have 3 priority levels:
1. Distance is reduced by half of table size.
2. Distance is reduced by full table size (move to beginning of the layer).
3. Distance is set to 0. Vertex will be packed as soon as possible.
Also makes the iterative resolutions aware of max priority, so it won't keep trying to raise priority beyond the maximum.
2021-12-09 17:46:52 -07:00
David Corbett
2404617a60
Update language system tag registry to OT 1.9
2021-12-09 07:18:57 -07:00
Behdad Esfahbod
002a1f70b8
[ft] Disable vertical funcs if HB_NO_VERTICAL
2021-12-08 10:45:30 -08:00
Behdad Esfahbod
ef14cad736
[GPOS] Disable vertical advance if HB_NO_VERTICAL
2021-12-08 10:43:52 -08:00
Behdad Esfahbod
6ed22de127
[CONFIG] Fix HB_NO_VERTICAL build without HB_TINY
2021-12-08 10:40:40 -08:00
Behdad Esfahbod
53eebc7cd2
[CONFIG] Add HB_NO_VERTICAL
2021-12-08 08:34:20 -08:00
Behdad Esfahbod
9bc5d2903a
[TINY] Don't disable VORG table in any config profile
...
Is needed for vertical layout of CFF fonts.
Fixes https://github.com/harfbuzz/harfbuzz/discussions/3294#discussioncomment-1770313
2021-12-08 08:16:17 -08:00
Garret Rieger
3e4a25098d
[repacker] add a maximum number of roots that can be moved in one iteration.
...
Set to half of the roots in a space. This prevents the repacker from moving all roots in a space to a new space if their are overflows in every root.
2021-12-06 21:27:28 -07:00
Garret Rieger
02b12d7965
[repacker] Move all overflowing roots to a new space simultaneously.
2021-12-06 21:27:28 -07:00
Garret Rieger
fa966bcc29
[repacker] create repacker output buffer after final length is known.
...
Don't rely on a buffer provided by the caller, as it may not be large enough.
2021-12-06 21:27:28 -07:00
Qunxin Liu
51655a078e
[subset] COLR : only include glyphs after COLR closure
2021-12-06 13:29:21 -07:00
Behdad Esfahbod
70f8c57e5c
[buffer] Rename find_min_cluster
2021-12-04 19:49:23 -08:00
Behdad Esfahbod
94d43c008a
[buffer] Merge and rename clear_glyph_flags()
2021-12-04 16:56:39 -08:00
Behdad Esfahbod
b95d252fab
[CONFIG] Add HB_CONFIG_OVERRIDE_H to simplify config overrides
2021-12-03 11:49:55 -07:00
Qunxin Liu
74b46b29e7
[subset] MATH: don't serialize coverage table when iterator is empty
...
when iterator is empty, just set coverage offset to 0.
serialize() in coverage will at lease write out a 16-bit format header.
2021-12-03 08:00:33 -07:00
Garret Rieger
1d9ef3a75a
[subset] Actually fix end_cp unitialized warning.
2021-12-01 11:53:10 -07:00
Garret Rieger
d8635dfe5a
[subset] Fix warning about uninitialized use of end_cp.
2021-12-01 11:17:46 -07:00
Khaled Hosny
7608b19167
[directwrite] Set unsafe to break flag
...
Like the rest of platform shapers. Otherwise hb-shape --verify goes
crazy.
2021-12-01 19:55:48 +02:00
Khaled Hosny
361a438658
Revert "Revert "[hb-directwrite] Don't load dwrit.dll dynamically""
...
This reverts commit ecbe224743
.
It was causing directwrite shaper to crash in MSVC builds.
2021-12-01 19:55:48 +02:00
Khaled Hosny
549e2b7038
Revert "Remove direct link to dwrite from meson scripts"
...
This reverts commit 6ea6c581ed
.
2021-12-01 19:55:48 +02:00
Garret Rieger
071aea42c2
[iter] add specialized implementation for hb_concat forward when iterators are not random access.
2021-12-01 08:37:04 -07:00
Garret Rieger
2e935514d9
[iter] fix forward implementation in hb_concat().
...
Add test coverage for forward.
2021-12-01 08:37:04 -07:00
Garret Rieger
39e76af19e
[subset] add all_links () to object_t.
...
Helper to provide easy access to concatenated real and virtual links iterator.
2021-12-01 08:37:04 -07:00
Garret Rieger
9121ed0cec
[subset] Improve sharing of Ligature subtables.
...
Ligature subtables use virtual links to enforce an ordering constraint between the subtables and the coverage table. Unfortunately this has the sideeffect of prevent the subtables from being shared by another Ligature with a different coverage table since object equality compares all links real and virtual. This change makes virtual links stored separately from real links and updates the equality check to only check real links. If an object is de-duped any virtual links it has are merged into the object that replaces it.
2021-12-01 08:37:04 -07:00
Garret Rieger
ca22741110
[iter] add hb_concat (a, b).
...
Iterates over a, and then over b.
2021-12-01 08:37:04 -07:00
Garret Rieger
95329081c2
[subset] further optimize cmap4 packing.
2021-11-28 07:47:49 -07:00
Garret Rieger
599143824c
[subset] Don't pad glyphs when using long loca.
2021-11-26 18:01:04 -07:00
Garret Rieger
d9660fd58a
[subset] Make cmap4 packing more optimal.
...
The current CMAP4 implementation uses whatever the current codepoint ranges are and then encodes them as indivudal glyph ids or as a delta if possible. However, it's often possible to save bytes by splitting up existing ranges and encoding parts of them using deltas where the cost of splitting the range is less than encoding each glyph individual.
2021-11-26 13:21:50 -07:00
Khaled Hosny
8aed5c21a3
3.1.2
2021-11-26 17:54:18 +02:00
Qunxin Liu
903a6baece
[subset] layout_features filtering fix
...
we should not use get_size (), which returns length * item_size
2021-11-25 11:24:41 -07:00
Khaled Hosny
69d8f27c69
[meson] Require 0.55.0
...
We implicitly require it for building ragel subproject. This new version
requirement should satisfied in both Fedora 33 and Debian bullseye, and
not be too cutting edge for us.
2021-11-22 03:11:36 +02:00
Qunxin Liu
84dc4e85e8
[subset] avoid writing out duplicate extra glyph names in post table
...
Add check for possible duplicate with other name index
2021-11-19 17:22:35 -07:00
Behdad Esfahbod
325f26290e
[array] Fix a couple constexpr warnings
...
./subprojects/harfbuzz/src/hb-array.hh:71:25: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr hb_array_t& operator = (const hb_array_t<U> &o)
^
const
../subprojects/harfbuzz/src/hb-array.hh:72:5: warning: use of this statement in a constexpr function is a C++14 extension [-Wc++14-extensions]
{ arrayZ = o.arrayZ; length = o.length; backwards_length = o.backwards_length; return *this; }
^
../subprojects/harfbuzz/src/hb-array.hh:329:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
constexpr hb_sorted_array_t& operator = (const hb_array_t<U> &o)
^
const
../subprojects/harfbuzz/src/hb-array.hh:330:5: warning: use of this statement in a constexpr function is a C++14 extension [-Wc++14-extensions]
{ hb_array_t<Type> (*this) = o; return *this; }
^
4 warnings generated.
2021-11-19 17:19:09 -07:00
Behdad Esfahbod
98fefd5ded
Merge pull request #3301 from harfbuzz/hashmap-classes
...
Hashmap classes
2021-11-19 13:34:53 -07:00
Qunxin Liu
ca418cac74
[subset] keep features that have FeatureParams and the tag is "size"
2021-11-19 13:31:25 -07:00
Qunxin Liu
e88fc41ef3
[subset] inputSequence could be empty, change the sanity check
2021-11-19 12:57:43 -07:00
Behdad Esfahbod
4731b10736
[array] Mark constructors constexpr
...
../src/hb-map.hh:44:38: note: non-constexpr constructor 'hb_array_t' cannot be used in a constant expression
static constexpr K INVALID_KEY = kINVALID;
^
2021-11-19 12:33:37 -07:00
Behdad Esfahbod
1da7423ed9
[array] Add constructor taking std::nullptr_t
...
Not all impls implement nullptr_t in a way that would automatically
convert to what we were accepting.
In file included from ../src/test-map.cc:27:
../src/hb-map.hh:44:22: error: no viable conversion from 'nullptr_t' to 'const hb_array_t<const char>'
static constexpr K INVALID_KEY = kINVALID;
^ ~~~~~~~~
2021-11-19 12:11:41 -07:00
Behdad Esfahbod
e456922a76
[test] Fix nullptr_t scope issue
2021-11-19 12:04:08 -07:00
Behdad Esfahbod
5157cac0e2
[test] Silence unused-variable erros in test
2021-11-19 12:03:10 -07:00
Behdad Esfahbod
394f772937
[map] Allow storing classes in the hashmap
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3293
The trick was to change the type of the invalid key/value to be non-class.
2021-11-19 11:49:23 -07:00
Behdad Esfahbod
cba17fd101
[array] Add default methods again, this time the full set
...
Should add tests.
2021-11-19 11:49:03 -07:00
Garret Rieger
a75b96f7e5
[sanitize] In lookup sanitize don't try to access subtable 0 if it isn't there.
2021-11-16 15:00:50 -08:00
Behdad Esfahbod
82a9f54410
[colr] Simplify sanitize
2021-11-10 10:50:38 -08:00
Garret Rieger
64b29dbd59
[subset] reuse colrv1 max nesting depth constant for sanitize.
2021-11-10 10:34:46 -07:00
Garret Rieger
ace98cc65f
[subset] Only sanitize recursion depth in COLR.
2021-11-10 10:34:46 -07:00
Garret Rieger
782a7377ad
[sanitize] add a maximum recursion depth for sanitize.
2021-11-10 10:34:46 -07:00
Khaled Hosny
cd5c6cd041
3.1.1
2021-11-08 06:59:55 +02:00
Matthias Clasen
1e07d42aa6
Typo fix
2021-11-07 07:58:28 +02:00
Matthias Clasen
1fd7fd9823
Cosmetics: Avoid confusing indentation
...
This line had me confused for a second because
the condition looked like a cast and the if just
looked misplaced. Add a line break to prevent
such confusion.
2021-11-06 09:19:55 -07:00
Matthias Clasen
3471f8f69e
docs: Clarify a doc comment
...
Reword the docs for hb_ot_layout_script_select_language and
be a bit more specific about the returned index.
2021-11-06 09:19:55 -07:00
Behdad Esfahbod
07dc34bdaf
[mutex] Try work around GCC cast-align error/warning
...
Shouldn't be needed because of the alignas(). Oh well...
Might fix https://github.com/harfbuzz/harfbuzz/issues/3283
2021-11-05 14:45:20 -07:00
Khaled Hosny
77eeec53a9
3.1.0
2021-11-03 23:31:03 +02:00
Behdad Esfahbod
54e7d6267b
[array] Remove defaulted destructor
2021-11-03 14:43:34 -06:00
Garret Rieger
f51b48c8e7
[subset] Fix fuzzer found memory leak.
...
Happens because an insert into a map with an invalid key reports successful, but this causes the set being inserted to be lost.
2021-11-02 17:00:07 -07:00
Behdad Esfahbod
b1cd0dce8e
[map] Add INVALID_KEY and INVALID_VALUE
2021-11-02 17:56:11 -06:00
Qunxin Liu
540f19b6fe
[subset] fix bug in (Chain)ContextFormat2
...
Only keep rulesets for glyphs class numbers that survived in coverage
2021-11-02 16:05:55 -07:00
Qunxin Liu
60e203644b
[subset] use glyphset_gsub instead of glyphset for GDEF
2021-11-02 16:56:52 -06:00
Qunxin Liu
0a7563a53f
[subset] fuzzer fix: https://oss-fuzz.com/testcase?key=6254792024915968
...
Make sure input is valid, each gid has a corresponding offset value in
the map
2021-11-02 15:25:18 -07:00
Qunxin Liu
364b6b3989
[subset] Don't assume FeatureList is sorted
...
Though the spec said FeatureRecords are sorted alphabetically by feature
tag, there're font files with unsorted FeatureList. And harfbuzz is not
able to subset these files correctly because we use binary search in
finding featureRecords when collecting lookups. Also
find_duplicate_features needs to be updated to handle this.
2021-11-02 15:15:02 -07:00
Garret Rieger
49c9392412
[subset] During LigatureSubstFormat1 subsetting always place Coverage last.
...
In Windows 7 on Chrome if the coverage table comes before any of the LigatureSet or Ligature subtables the font won't load. This changes the packing order to always place the Coverage table last. Virtual links are used to ensure the repacker maintains the desired ordering.
Coincidentally fontTools also does the same thing (a3f988fbf6/Lib/fontTools/ttLib/tables/otTables.py (L1137)
) to reduce overflows during packing.
2021-11-02 12:19:13 -06:00
Garret Rieger
9643d77086
[repacker] add more detailed comment about virtual links.
2021-11-02 12:19:13 -06:00
Garret Rieger
5bfc7d1015
[repacker] remove VirtualOffset struct.
...
Make and add_virtual_link () specialization of add_link() instead.
2021-11-02 12:19:13 -06:00
Garret Rieger
bc4c5341d6
[repacker] Add test for virtual links in the repacker.
2021-11-02 12:19:13 -06:00
Garret Rieger
7615b94ecf
[repacker] add 'virtual links' to the serializer.
...
These aren't associated with an offset field, but instead exist solely to add an ordering constraint to the object graph.
2021-11-02 12:19:13 -06:00
Behdad Esfahbod
59d8f6c817
[map] Fix copy assignment operator
2021-11-02 10:33:53 -06:00
Behdad Esfahbod
459e485bab
[meta] Remove otherwise-empty test-meta
2021-11-02 09:36:12 -06:00
Behdad Esfahbod
b8724c6023
[meta] Add in-house impl of hb_is_convertible()
2021-11-02 00:49:40 -06:00
Behdad Esfahbod
7a078c395a
[meta] Use std::conditional instead of hb_conditional()
2021-11-02 00:44:51 -06:00
Behdad Esfahbod
943921cf0c
[meta] Use more std type_traits
2021-11-02 00:26:46 -06:00
Behdad Esfahbod
6d555ce82e
[meta] Use std::forward instead of hb_forward()
2021-11-02 00:18:22 -06:00
Behdad Esfahbod
811f80a701
[algs] Use std::move instead of hb_move()
2021-11-02 00:17:54 -06:00
Behdad Esfahbod
896e0c74a8
[meta] Remove unused traits
2021-11-02 00:06:30 -06:00
Behdad Esfahbod
be42800fc6
[meta] Use std::is_trivially_... instead of internal copies
2021-11-02 00:04:18 -06:00
Behdad Esfahbod
30c05e8b55
[algs] include <new>
2021-11-01 23:57:00 -06:00
Behdad Esfahbod
4c6fd7cdb2
[map] Try moving items when resizing
2021-11-01 23:13:34 -06:00
Behdad Esfahbod
a28ea8d7f3
Simplify swap()
2021-11-01 22:50:54 -06:00
Behdad Esfahbod
94158316d9
[map] Add iterable constructor
2021-11-01 22:47:26 -06:00
Behdad Esfahbod
a03b9b14c9
[map] Add initializer_list and swap()
2021-11-01 22:45:11 -06:00
Behdad Esfahbod
3604f5f248
[algs] Include <initializer_list>
2021-11-01 22:37:42 -06:00
Behdad Esfahbod
c30f6834d0
[map] Add 5 methods
2021-11-01 22:29:14 -06:00
Behdad Esfahbod
38debbab7e
[set] Add successful check in swap()
2021-11-01 22:17:35 -06:00
Behdad Esfahbod
b860b44229
[bimap] Simplify initialization
2021-11-01 22:08:03 -06:00
Behdad Esfahbod
d2c364f6e7
[array] Use default methods
2021-11-01 21:55:14 -06:00
Behdad Esfahbod
6f74d80ed1
[vector] Complete sorted_vector 5-methods
2021-11-01 21:49:32 -06:00
Behdad Esfahbod
a28b5d03b5
[vector] Add swap() friend to hb_sorted_vector_t
2021-11-01 21:43:44 -06:00
Behdad Esfahbod
e97e79967e
Verbiage
2021-11-01 21:34:46 -06:00
Behdad Esfahbod
34fa5e2901
[set] More default operators
2021-11-01 21:25:03 -06:00
Behdad Esfahbod
b6c0b40fc2
[vector] Use default constructor
2021-11-01 21:15:38 -06:00
Behdad Esfahbod
1e3f57c079
[bit-set] Implement standard-5 methods plus swap
2021-11-01 21:14:12 -06:00
Behdad Esfahbod
11eadb5d28
[bit-set-invertible] Implement standard-5 methods & swap
2021-11-01 21:07:09 -06:00
Behdad Esfahbod
dcd18da611
[set] Add standard the 5 standard methods & tests
2021-11-01 20:55:30 -06:00
Behdad Esfahbod
628a0f3796
[vector] Add more tests
2021-11-01 20:36:55 -06:00
Behdad Esfahbod
f15858be5f
[vector] Pre-allocate if iterator has random-access length
2021-11-01 20:26:07 -06:00
Behdad Esfahbod
11135150a7
[vector] Move test code into separate file
2021-11-01 20:23:12 -06:00
Behdad Esfahbod
ee75e716c1
[vector] Add initializer from iterable
2021-11-01 20:19:57 -06:00
Behdad Esfahbod
18a078f968
[vector] Implement move assignment using swap
2021-11-01 20:06:58 -06:00
Behdad Esfahbod
eeda2c549d
[vector] Add initializer_list constructor & tests
2021-11-01 18:50:11 -06:00
Behdad Esfahbod
c484641304
Revert "[vector] Add initializer_list constructor & tests"
...
This reverts commit aa6182453b
.
2021-11-01 18:48:24 -06:00
Behdad Esfahbod
aa6182453b
[vector] Add initializer_list constructor & tests
2021-11-01 18:36:57 -06:00
Behdad Esfahbod
8c05569930
[algs] Add hb_swap() ala, and using, std::swap()
...
Use it in vector.
Use ADL idiom.
2021-11-01 17:59:17 -06:00
Behdad Esfahbod
bbaccf23d9
Better round positions during scaling
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3274
2021-11-01 16:45:36 -06:00
Matthias Clasen
52ccdc78e6
docs: Add a link to the OpenType spec
...
Link to the name table specification in the
hb_ot_name_id_t docs.
2021-10-28 11:58:38 -07:00
Matthias Clasen
8cb2f969d9
Document hb_ot_name_t values
...
Add a short blurb for each value and refer
to the OpenType spec for more information.
Fixes : #3181
2021-10-28 11:58:38 -07:00
Qunxin Liu
85deddb16e
[subset] fuzzer fix: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40406
2021-10-27 16:16:15 -07:00
Behdad Esfahbod
da500568de
[API] Add hb_buffer_[sg]et_not_found_glyph() and --not-found-glyph
...
Instead of using gid=0 when a character is not found in the font,
client can now set a custom value. This is useful for shaper-driven
font fallback and to differentiate that from .notdef glyph.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1360
2021-10-26 08:02:29 -06:00
Cameron Cawley
6ea6c581ed
Remove direct link to dwrite from meson scripts
2021-10-23 13:19:39 -07:00
Cameron Cawley
ecbe224743
Revert "[hb-directwrite] Don't load dwrit.dll dynamically"
...
This reverts commit 6119ff9d80
.
2021-10-23 13:19:39 -07:00
Behdad Esfahbod
4262636926
Merge pull request #3248 from googlefonts/connected_components
...
[repacker] Keep connected subgraphs in the same space.
2021-10-23 13:18:22 -07:00
Qunxin Liu
f55d834736
[subset] Move struct DeltaSetIndexMap into hb-ot-var-common.hh
...
Also fix naming issues in review comments
2021-10-23 11:22:39 -07:00
Qunxin Liu
8c583db9b5
[subset] COLRv1: update subset() method for new strutc ClipList and VarIdxMap
...
Also fix issues in struct PaintTransform definition
2021-10-23 11:22:39 -07:00
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
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
Behdad Esfahbod
c66894d7c9
[bit-set-invertible] Write a subset branch as dagger
2021-08-18 21:24:29 -06:00
Behdad Esfahbod
c39d2f7a76
[bit-set-invertible] Implement add_array / add_sorted_array / intersects
2021-08-18 21:20:54 -06:00
Behdad Esfahbod
0efa614c04
[bit-set] Add del_array/del_sorted_array()
2021-08-18 21:18:32 -06:00
Behdad Esfahbod
48ad9eef1e
[bit-set] Merge page_for_insert() into page_for()
2021-08-18 21:05:21 -06:00
Garret Rieger
280366ba6a
Add TODO to update NN offsets to allow nulls.
2021-08-18 16:52:45 -06:00
Garret Rieger
dc31920bbe
Don't serialize null offsets in CPAL.
...
Fixes https://oss-fuzz.com/testcase-detail/5443213648330752
2021-08-18 16:52:45 -06:00
Khaled Hosny
80ff72f39d
[doc] Misc fixes
2021-08-18 13:16:51 +02:00
Khaled Hosny
9aa6f8a93f
2.9.0
2021-08-18 09:32:04 +02:00
Behdad Esfahbod
f0c3804fa2
[set] Add hb_bit_set_invertible_t and resurrect hb_set_invert()
...
Implementation is NOT complete yet.
2021-08-17 19:53:43 -06:00
Behdad Esfahbod
b5cdbdc030
[set] Turn hb_set_t into instance of template taking implementation t
2021-08-17 10:53:08 -06:00
Behdad Esfahbod
fad452bffb
[set] Move main functionality into hb_bit_set_t
...
To add inversion on top in hb_invertible_set_t and use that as hb_set_t.
2021-08-17 10:47:18 -06:00
Behdad Esfahbod
9cc4da962f
[object] Remove hb_object_is_inert()
2021-08-16 20:17:53 -06:00
Behdad Esfahbod
2d5ef05d67
Use !g_object_is_valid() instead of g_object_is_inert()
2021-08-16 20:13:58 -06:00
Behdad Esfahbod
f6d6eff6a2
[object] Remove unused HB_REFERENCE_COUNT_INIT
2021-08-16 19:41:44 -06:00
Behdad Esfahbod
f245dc4db8
[set] Whitespace
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
9b390f8c40
[set] Move page_t into hb-bit-page.hh
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
0c3e02ee2d
[set] Add "inverted" to page_t::is_empty()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
9bd64fa077
[set] Add "inverted" to page_t::next/prev()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
c88e7ec935
[set] Add page_t::elt_maybe_invert()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
9449cfeefd
[set] Simplify page_t::next/prev()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
4394ee1f1d
[set] Add inverted to page_t::get_min/max()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
0dcd9b15d9
[set] Add page_t::set_range()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
cb273fd17c
[set] Add page_t::set()
2021-08-15 18:59:58 -06:00
Behdad Esfahbod
32bbf53d9c
[set] Minor rewrite one cmp() in term of other
2021-08-15 18:59:58 -06:00
Garret Rieger
cb05c363d7
[subset] add some basic tests for the legacy subset methods.
2021-08-14 10:37:02 -06:00
Garret Rieger
d18aad7ec5
[subset] restore old subsetting api methods.
...
These will be left in place until the 3.0.0 release.
2021-08-14 10:37:02 -06:00
Garret Rieger
c0f3af91b8
[subset] speed up add_gid_and_children and adjust op limit.
...
Fix for fuzzer timeout: https://oss-fuzz.com/testcase-detail/5001604901240832 .
- Operation limit is per glyph, so 100,000 should still be far more than needed.
- Switches from for(...) to while(...) loop for iteration. for(...) calls it.end() which in this case triggers a complete iteration.
- Cache CompositeGlyph size in the iterator to avoid needing to recalculate it.
2021-08-12 14:50:42 -06:00
Garret Rieger
c08f1b8903
[map] fix incorrect population count in hash map.
...
If the same key was set twice the population was being incorrectly incremented.
2021-08-10 14:00:55 -06:00
Garret Rieger
e39c3bde7b
[subset] fix bug in parsing glyf flags.
...
the bytes of the flag stream were being treated as signed integers instead of unsigned as specified in the spec.
2021-08-10 12:57:07 -06:00
Ben Wagner
f5ba1fabce
Fix documentation of hb_subset_flags_t defaults
...
HB_SUBSET_FLAGS_DEFAULT is 0, and hb_subset_input_create_or_fail
initializes its flags to HB_SUBSET_FLAGS_DEFAULT, so currently all flags
are set to false by default. It has been decided that future flags will
also be false by default for simplicity (using NO_ in the name if
needed). Correct and simplify the documentation for hb_subset_flags_t to
reflect this.
2021-08-09 09:05:24 -06:00
Garret Rieger
8c0c217b5a
[subset] fail reference blob in face builder if allocation for table sorting fails.
...
Fixes https://oss-fuzz.com/testcase-detail/5041767803125760
2021-08-06 15:54:41 -06:00
Garret Rieger
e5bfd49ae5
[subset] don't allow table adds for tag == -1.
2021-08-05 17:49:37 -06:00
Garret Rieger
222b74f08f
[subset] don't leak memory for duplicate tables.
2021-08-05 17:49:37 -06:00
Behdad Esfahbod
f7a9c3ea93
[open-file] Use hb_is_source_of instead of hb_is_iterator
2021-08-05 13:05:07 -06:00
Behdad Esfahbod
fa90cb8a31
Whitespace again
2021-08-05 12:31:06 -06:00
Behdad Esfahbod
a110a47eb5
Whitespace
2021-08-05 12:28:39 -06:00
Behdad Esfahbod
2cb8c928d7
[face] Let hashmap derive invalid key/value types
...
Works now with the previous two fixes.
2021-08-05 12:27:22 -06:00
Behdad Esfahbod
95c888e192
[meta] Define hb_int_min for pointer types as nullptr
2021-08-05 12:27:02 -06:00
Behdad Esfahbod
407a112e7b
[meta] Make hb_is_signed/hb_is_unsigned work on all types
...
They were failing if type was non-scalar, eg. pointer.
2021-08-05 12:23:53 -06:00
Behdad Esfahbod
baf2166a24
[meta] Use hb_true_type/hb_false_type more
2021-08-05 12:08:47 -06:00
Behdad Esfahbod
74ad5ddcd7
[face] Minor cleaning of previous commit
2021-08-05 11:51:54 -06:00
Garret Rieger
c2ee1fdd40
[subset] remove unsed table_entry struct.
2021-08-05 11:47:07 -06:00
Garret Rieger
dea0fe5717
[subset] discard extra copies of a table in face builder.
...
Fixes #2361 . Stores tables in the builder in a hashmap so you end up with at most one copy of each table. Table serialization order is now based on tag sort order instead of order of insertion into the builder.
2021-08-05 11:47:07 -06:00
Behdad Esfahbod
368e957887
[ot-shape] Add comment re `vert` feature
2021-08-05 10:41:18 -06:00
Garret Rieger
2c024dc3cb
[subset] prune redundant cmap12 subtables.
...
If the post subset cmap12 table is equivalent to another cmap subtable don't include the 12 table in the final subset. Matches change https://github.com/fonttools/fonttools/pull/2146 from fontTools.
2021-08-04 17:36:24 -06:00
Behdad Esfahbod
09c3b82f5e
[buffer] When shifting forward, leave no gap
...
Trying to see if this fixes the fuzzer issue:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36236
2021-08-04 11:55:53 -06:00
Behdad Esfahbod
a150baf32c
[ot-map] Allocate top mask bit as global bit
...
Avoids undefined-shift of 32 in the following line:
map->mask = (1u << (next_bit + bits_needed)) - (1u << next_bit)
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1219263
2021-08-04 11:53:27 -06:00
Behdad Esfahbod
e80c86ffa6
[coretext] Fix formatting
2021-08-04 10:25:06 -06:00
Simon Cozens
66aef2818e
Support passing variations to coretext shaper
2021-08-04 10:24:40 -06:00
Behdad Esfahbod
62a535f154
[khmer] Fix comment
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3104
2021-08-03 10:11:43 -06:00
Behdad Esfahbod
ee7473b8a4
[mutex] Remove unused HB_MUTEX_IMPL_INIT / HB_MUTEX_INIT
...
https://github.com/harfbuzz/harfbuzz/pull/3100#issuecomment-890089096
2021-07-30 12:55:28 -06:00
Behdad Esfahbod
0e37c07f4c
Revert "Construct user_data in hb_object"
...
This reverts commit a78eb43c79
.
See: https://github.com/harfbuzz/harfbuzz/pull/3100#issuecomment-890088227
2021-07-30 12:52:59 -06:00
Behdad Esfahbod
5dc4cd71cc
[blob] Minor change in destruction
...
No semantic change.
2021-07-30 12:37:40 -06:00
Garret Rieger
b63ac57174
[subset] bail if collection region indices is in error.
2021-07-29 18:30:37 -07:00
Garret Rieger
f9d8e4a976
[subset] switch ..._set_flags to not take a mask.
2021-07-29 18:30:27 -07:00
Garret Rieger
46d4a5e673
[subset] Convert subset plan to use a flags bit set.
2021-07-29 18:02:34 -07:00
Garret Rieger
3d534b146c
[subset] convert subset input flags into bit flags.
...
Store the flags in a bit set. Updates the public api to work with the bit set directly.
2021-07-29 18:02:34 -07:00
Ben Wagner
a78eb43c79
Construct user_data in hb_object
...
hb_object's user_data is created lazily. The previous implementation of
hb_object_set_user_data created space for the user_data but did not
actually construct it. This means that hb_user_data_array_t's lock was
not constructed. If hb_mutex_t is backed by an implementation which
requires that it be constructed (not just zero initialized) then errors
will occur when taking the lock when setting the user data.
Change hb_object_set_user_data to construct the user_data in the created
space and hb_object_fini to call the destructor.
2021-07-29 16:03:56 -06:00
Behdad Esfahbod
30579f5a37
[set] Document & use open-ended del_range()
2021-07-29 11:19:13 -06:00
Behdad Esfahbod
2d54c34680
[subset/VarStore] Fix OOM in fuzzer test
...
The test in question is the one added in c68a00b92e
.
Culprit is that it's allocating lots of memory because of region_indices that
are out-of-range anyway. So, try to filter those out first.
2021-07-29 00:49:36 -06:00
Behdad Esfahbod
ff1fe25a5d
[VarStore] Rename internal get_scalars() to get_region_scalars()
2021-07-29 00:49:36 -06:00
Khaled Hosny
9a7ff54bb7
[test] Write one sequence per-line
...
https://github.com/harfbuzz/harfbuzz/pull/3087#issuecomment-888691436
2021-07-28 18:25:51 -06:00
Khaled Hosny
ddf87ffb22
[test] Add generated tests for emoji clusters
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3017
Uses AdobeBlank2.ttf from:
https://github.com/adobe-fonts/adobe-blank-2
instead of a dummy empty font so that everything maps to GID 1 and
control code points are kept instead of being dropped because there is
not space glyph (otherwise we’d need to identify control code points
somehow when generating the expectations).
2021-07-28 18:25:51 -06:00
Behdad Esfahbod
f0a1892ff9
[serialize] Remove unnecessary pointer indirection
2021-07-28 17:36:22 -06:00
Behdad Esfahbod
1c511ed6f6
[subset] Simplify VarStore serialization
2021-07-28 17:33:26 -06:00
Behdad Esfahbod
ad4c692492
[subset] Simplify VarStore serialize
2021-07-28 17:22:14 -06:00
Behdad Esfahbod
25dee60977
[sanitize] Revert some from c68a00b92e
...
That overflow check was already happening in arrayZ.sanitize().
2021-07-28 13:58:24 -06:00
Behdad Esfahbod
6fe0d7d6e8
[GSUB] If MultipleSubst is applied to a ligature-component, preserve lig-id
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3069
2021-07-28 12:06:49 -06:00
Behdad Esfahbod
b926fb9bb0
Whitespace
2021-07-28 11:58:10 -06:00
Behdad Esfahbod
cc3a7ceea3
Fix macro-in-macro invocation
...
../src/hb-ot-color-colr-table.hh:980:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
\#if COLRV1_ENABLE_SUBSETTING == 1
2021-07-28 11:53:06 -06:00
Behdad Esfahbod
087e2705de
Fix signed-ness error in 0ded6a70c8
2021-07-28 11:42:48 -06:00
Garret Rieger
f3e031539f
Revert "[ci] Bin FontTools version due to recent COLRv1 changes"
...
This reverts commit 163748b505
.
2021-07-28 11:36:34 -06:00
Garret Rieger
acbd8b27dc
[subset] temporarily disable COLRv1 subsetting.
...
Currently COLRv1 spec is being changed so the subsetting implementation is out of sync. Disable subsetting by failing sanitization for COLRv1 tables and disable all colrv1 tests.
2021-07-28 11:36:34 -06:00
Behdad Esfahbod
0ded6a70c8
[subset] Fix another fuzzer issue
...
Addition could overflow on 32bit arch.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36636
Fixes https://oss-fuzz.com/testcase-detail/5072358514753536
2021-07-28 11:35:27 -06:00
Garret Rieger
09474d8d7b
[subset] Fix fuzzer timeout in add_gid_and_children.
...
The composite glyph graph isn't check for max operations by sanitize so track an operations count during the graph traversal.
2021-07-27 13:30:06 -06:00
Behdad Esfahbod
c68a00b92e
[subset] Fix possible overflows in VarRegionList serialize
...
Fixes https://oss-fuzz.com/testcase-detail/5362189182566400
2021-07-27 13:28:09 -06:00
Behdad Esfahbod
7b8464b655
[serialize] Check for overflow in allocate_size()
...
If size was > INT_MAX, then the out-of-room check was failing to perform
as intended.
Part of fixing https://oss-fuzz.com/testcase-detail/5362189182566400
2021-07-27 13:26:00 -06:00
Behdad Esfahbod
bf2c87bfe6
Add hb_memcpy() that does len=0 check
2021-07-27 13:26:00 -06:00
Khaled Hosny
5f801da945
[hb-ms-features] Move code out of header file
2021-07-27 21:07:32 +02:00
Khaled Hosny
990c15dbe5
[hb-ms-features] Rename types to be less general
2021-07-27 21:07:32 +02:00
Khaled Hosny
69199211b7
[uniscribe/directwrite] Move feature setup to shared file
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3070
2021-07-27 21:07:32 +02:00
Garret Rieger
fc7f778120
[subset] add a note to hb-subset on what is and isn't supported ( #3076 )
2021-07-27 11:21:19 -07:00
Khaled Hosny
791a1bf3a4
Don’t disable getenv on Windows
...
The condition is inverted, regression from
40ec187dec
.
2021-07-27 15:22:13 +02:00
Behdad Esfahbod
4762fcb415
Merge pull request #3067 from googlefonts/glyph_names
...
[subset] support option --glyph-names
2021-07-26 11:48:55 -07:00
Behdad Esfahbod
aeec278453
Merge pull request #3068 from harfbuzz/hoi
...
[variations] Support multiple axes with same tag, aka HOI
2021-07-26 11:31:54 -07:00
Khaled Hosny
ec99fdb7e8
[sebset] Use [s|g]et_flag for retain_all_layout_features
...
Looks like this was missed when adding hb_subset_input_[s|g]et_flag()
2021-07-26 19:32:28 +02:00
Khaled Hosny
acc7100a3f
[docs] Improve subset documentation
2021-07-26 02:18:23 +02:00
Khaled Hosny
3e2734cf91
[docs] Don’t use GTK-Doc syntax for internal functions
...
We don’t generate docs for them, reduces the number of warnings.
2021-07-26 02:18:18 +02:00
Qunxin Liu
71b5509c19
[subset] support option --glyph-names
2021-07-23 13:57:39 -07:00
Behdad Esfahbod
b235511ed8
Merge pull request #3021 from googlefonts/stable_api
...
[subset] update hb_subset api with final changes before going stable.
2021-07-23 12:15:15 -07:00
Behdad Esfahbod
a9a607d360
[variations] Support multiple axes with same tag, aka HOI
...
The axes in fvar are in arbitrary order, NOT sorted. Hence have to
lsearch all entries.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1673
Fixes https://github.com/harfbuzz/harfbuzz/issues/2743
Test from https://github.com/ctrlcctrlv/FontForge-Higher-Order-Interpolation
2021-07-23 11:58:58 -07:00
Garret Rieger
1fde80ad28
[subset] update comments referencing hb_subset_input_t parameter.
2021-07-22 16:45:48 -07:00
Garret Rieger
c581d11eba
[set] in hb_set_set() avoid calling memcpy on nullptr.
2021-07-22 14:04:39 -07:00
Garret Rieger
2b9cb29923
[subset] cleanup no_subset_tables on destruction.
2021-07-22 13:26:03 -07:00
Garret Rieger
89fc399eba
[subset] Add hb-subset section documentation.
2021-07-22 13:00:34 -07:00
Garret Rieger
792e2ed61c
[subset] convert no get/set prune unicode ranges to enum.
2021-07-22 12:41:48 -07:00
Behdad Esfahbod
0a44feaeda
[fvar] Make find_axis_index() return a range, not individual value
2021-07-22 12:18:48 -07:00
Garret Rieger
1b6c1aa684
[subset] add hb-subset api to documentation generator.
...
Standardize subset_input parameter to be input.
2021-07-22 12:15:45 -07:00
Garret Rieger
8ce9683412
[subset] add documentation for all hb-subset.h methods.
2021-07-22 12:14:53 -07:00
Garret Rieger
9ab751ac9f
[subset] Remove hb_subset(). Leaving just hb_subset_or_fail().
2021-07-22 12:14:47 -07:00
Garret Rieger
e5c887fc0f
[subset] add documentation for subset input flag enums.
2021-07-22 12:14:09 -07:00
Garret Rieger
372722ceee
[subset] move notdef_outline to the subset input property enum.
2021-07-22 12:14:03 -07:00
Garret Rieger
a6c6cda486
[subset] Add no subset tables and passthrough unrecognized tables to the subset api.
...
Matches fontTools options.
2021-07-22 12:12:37 -07:00
Garret Rieger
668f2bd93e
[subset] Add hb_subset_or_fail () to public subset api.
2021-07-22 12:12:36 -07:00
Garret Rieger
aba2e13141
[subset] Remove hb_subset_input_get/set_overlaps_flag ().
2021-07-22 12:12:36 -07:00
Garret Rieger
7d82191f61
[subset] Remove hb_subset_input_get/set_name_legacy ().
2021-07-22 12:12:36 -07:00
Garret Rieger
942636ae13
[subset] Remove hb_subset_input_get/set_retain_gids.
2021-07-22 12:12:36 -07:00
Garret Rieger
77b4a1cd96
[subset] Remove hb_subset_input_get/set_desubroutinize.
2021-07-22 12:12:36 -07:00
Garret Rieger
8bf5d4d4f7
[subset] Remove hb_subset_input_get/set_drop_hints.
2021-07-22 12:12:36 -07:00
Garret Rieger
9fb3a25633
[subset] Use hb_set_copy in subset input.
2021-07-22 12:12:36 -07:00
Garret Rieger
38de3491a0
[subset] add implementation for get/set flag on subset input.
2021-07-22 12:12:36 -07:00
Garret Rieger
83727837ef
[subset] add proposed enum property get/set method.
2021-07-22 12:12:36 -07:00
Garret Rieger
b38e49dcfa
[subset] add get/set user data methods to subset input.
2021-07-22 12:12:30 -07:00
Garret Rieger
edb57a8d9a
Make subset input const in the subsetting operation. Don't modify the subset input's sets.
2021-07-22 12:11:43 -07:00
Behdad Esfahbod
233c29b302
[font] Call fvar.find_axis_index instead of find_axis_info in set_variations()
2021-07-22 12:00:24 -07:00
Behdad Esfahbod
89018068cd
[fvar] Centralize axis finding logic
...
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/1673
2021-07-22 11:59:23 -07:00
Behdad Esfahbod
0b2280af90
[font] Call fvar table directly, instead of calling public get_axis_info
...
To lighten it up in next commit.
2021-07-22 11:58:14 -07:00
Behdad Esfahbod
b86a45ca55
[fvar] Add TODO
...
Fixing https://github.com/harfbuzz/harfbuzz/issues/1673
2021-07-22 11:46:44 -07:00
Behdad Esfahbod
ba6db26b65
Tolerate unsorted OT table entries for small number of entries
...
See comment.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3065
2021-07-22 11:38:27 -07:00
Behdad Esfahbod
03cd9c5cba
Align lfind() API to match bfind()
2021-07-22 11:38:27 -07:00
Behdad Esfahbod
f54f5c1b16
Fix debug printer of bool
2021-07-22 11:38:27 -07:00
Garret Rieger
6269866bdd
[subset] Keep bimap consistent if only one of the internal maps is in error.
2021-07-19 13:42:00 -06:00
Garret Rieger
48edbef96f
[subset] bail if region_map is in error.
...
Fixes fuzzer case https://oss-fuzz.com/testcase-detail/5499162606043136 .
2021-07-19 13:42:00 -06:00
Behdad Esfahbod
79e8b30609
[ot-shape] Fix application of kern table if GPOS kern is missing
...
Was broken sometime after we implemented kerx and tweaking it.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3043
2021-07-16 16:29:44 -06:00
Behdad Esfahbod
1060b04938
Merge pull request #3060 from googlefonts/unicode_collect
...
[subset] de-duplicate the logic that finds unicodes corresponding to …
2021-07-14 17:50:46 -07:00
Garret Rieger
9aa0ecef3f
[subset] de-duplicate the logic that finds unicodes corresponding to requested glyphs.
...
Move the logic into subset planning and then re-use the results in cmap and OS2 subsetting. Removes depedency on cmap from os2.
2021-07-14 17:31:47 -07:00
Garret Rieger
deee24fbef
[subset] Add missing FontName op code in top dict parsing.
...
Fix for #3058
2021-07-14 16:01:18 -06:00
Behdad Esfahbod
9985ca6491
Merge pull request #3057 from harfbuzz/ci-coverage-macos
...
[ci] Add macOS GitHub workflow
2021-07-13 13:42:09 -07:00
Behdad Esfahbod
95b04f7409
[buffer] Remove unnecessary have_separate_output()
2021-07-12 17:36:38 -06:00
Behdad Esfahbod
3e266e5f64
[buffer] Update comments
2021-07-12 17:36:36 -06:00
Behdad Esfahbod
3807061d63
[ot-layout] Don't remove_output() before reverse substitution
...
No need anymore, because of new swap_buffers() semantics.
Just assert instead.
2021-07-12 17:36:22 -06:00
Behdad Esfahbod
10a9960f0a
[buffer] Restructure swap_buffers()
...
Is more of a "commit" operation now. Will rename when ready.
2021-07-12 17:36:22 -06:00
Khaled Hosny
d56afb750a
[tests] Ignore more symbols
...
These seem to be exported when building with code coverage on macOS.
2021-07-13 01:12:34 +02:00
Behdad Esfahbod
a7f4c985a8
[ot-layout] Always swap_buffers() even if no substitutions happened
2021-07-12 17:00:46 -06:00
Behdad Esfahbod
62b441e6ff
[layout] Use Proxy::inplace instead of table index check
...
Equivalent.
2021-07-12 16:59:34 -06:00
Behdad Esfahbod
431f164003
[layout] Don't call clear_output() before pause-func
2021-07-12 16:57:25 -06:00
Behdad Esfahbod
a623446a34
[shape] Remove stray clear_output() call in hb_shape()
2021-07-12 16:55:54 -06:00
Behdad Esfahbod
05c17787c4
[buffer] Rewind cursor in clear_output()
2021-07-12 16:55:08 -06:00
Behdad Esfahbod
1cb0ca1f2c
Whitespace
2021-07-12 16:52:51 -06:00
Behdad Esfahbod
69310f14a6
[buffer] Change nil buffer have_output to false
...
Seems like a historical artefact that it was true.
2021-07-09 16:45:55 -07:00
Behdad Esfahbod
40884af17e
[ot-layout] Narrow down random feature logic vs safe-to-break
2021-07-09 16:34:08 -07:00
Behdad Esfahbod
33b579d0ad
[ot-layout] Clear random flag for subsequent flags
...
Ouch!
2021-07-09 16:34:08 -07:00
Behdad Esfahbod
29c9833e57
Remove Offset::serialize()
...
Finishing https://github.com/harfbuzz/harfbuzz/pull/2355
2021-07-09 11:58:36 -06:00
Khaled Hosny
63e15eac4f
2.8.2
2021-07-08 23:02:49 +02:00
Behdad Esfahbod
2337f0d047
Internally use hb_malloc/.../hb_free instead of malloc/.../free
...
Redefining those stock names as macros was conflicting with gcc 10
headers.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00
Behdad Esfahbod
bb48bf52a4
Rename misc uses of "free"
...
In preparation for fixing https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00
Qunxin Liu
7416faceeb
[subset] fuzzer fix: https://oss-fuzz.com/testcase-detail/5715464591376384
2021-07-08 09:09:30 -07:00
Garret Rieger
0da9158f62
[subset] Remove OffsetTo::serialize().
...
Convert remaining uses of it to serialize_serialize() which correctly uses the object packer.
2021-06-30 14:05:48 -07:00
Behdad Esfahbod
0969614865
[ot-shape] Rewrite loop without foreach_grapheme()
...
We were not using the graphemes, and that's costlier than just for().
2021-06-26 08:52:53 -06:00
Qunxin Liu
eee7b459ee
[subset] add option --no-prune-unicode-ranges
2021-06-24 11:44:20 -07:00
Khaled Hosny
c3be28ea26
[ot-shape] Numeric runs native direction is LTR
...
See inline comments. Slightly modified version of the code from Jonathan
Kew on the linked issue.
Fixes https://github.com/harfbuzz/harfbuzz/issues/501
2021-06-23 13:11:27 -07:00
Behdad Esfahbod
cc9bb29491
[blob] Fix-up recent mistake in hb_blob_create() destroy(user_data)
...
https://github.com/harfbuzz/harfbuzz/pull/3026#discussion_r653437491
2021-06-20 18:47:03 -06:00
Garret Rieger
bc06af977f
[subset] speed up feature collection when tags are specified.
...
Precompute a feature index filter to avoid needing to iterate the feature tag list for each encountered feature index. For this particular fuzzer case speeds up feature collection from 50s to 2s.
2021-06-20 17:45:19 -07:00
Khaled Hosny
14f220b761
[directwrite] Support feature ranges
...
Code copied from hb-uniscribe.cc and adapted to use DirectWrite types.
May be there is a better way to de-duplicate the code, though I'm not
exactly sure how or if it is worth it.
2021-06-20 17:22:27 -07:00
Garret Rieger
26c80adb61
[subset] do colrv1 glyph closure before glyf composite closure.
2021-06-18 22:34:00 -07:00
Qunxin Liu
d07f789ae3
[subset] support option "--notdef-outline"
2021-06-18 15:35:02 -07:00
Garret Rieger
10ad185932
[subset] add comment to copy_bytes().
2021-06-16 17:35:39 -06:00
Garret Rieger
675ebbeb3a
[subset] don't alloc zero bytes.
...
It will be leaked later since hb_blob_create() won't set up the blob to cleanup since it has length zero.
2021-06-16 17:35:39 -06:00
Behdad Esfahbod
93e6a9bc4e
Revert "Remove unneeded buffer clear_output / remove_output calls"
...
This reverts commit 06175b7143
.
One of the sanitizers is failing. Pushing again as PR to debug.
I have suspicions.
2021-06-15 15:38:49 -06:00
Behdad Esfahbod
06175b7143
Remove unneeded buffer clear_output / remove_output calls
...
Made sure clear_output is always paired with swap_buffers.
Trying to see if we can move towards RAII-like buffer iterators
instead of the buffer keeping an iterator internally.
2021-06-15 14:33:27 -06:00
Behdad Esfahbod
bdfed8f113
[blob] Add failing versions of create API
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2567
New API:
+hb_blob_create_or_fail()
+hb_blob_create_from_file_or_fail()
Use these in util/ to distinguish empty file from not-found file.
Only err on the latter.
2021-06-15 13:56:30 -06:00
Behdad Esfahbod
2fc8d0e6f0
Merge pull request #3020 from googlefonts/serialize_serialize
...
[subset] Always serialize objects point to by OffsetTo to a new serializer object.
2021-06-15 12:56:17 -07:00
Garret Rieger
085aa65e09
[subset] Convert offset serialization in gsubgpos and gdef to serialize_serialize().
2021-06-14 16:47:45 -07:00
Garret Rieger
cc96c4e87e
[shaping] Update shaping substituion lookup serialization to use serializer pop()/pack().
2021-06-14 16:43:23 -07:00
Behdad Esfahbod
d3dd936309
[coretext] Round position info
...
Test:
Before:
$ ./hb-shape /System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc 1 --features="+palt" --shaper=coretext
[gid781=0@-78,0+841]
$ ./hb-shape /System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc 1 --features="+palt" --shaper=ot
[gid781=0@-78,0+842]
After:
$ ./hb-shape /System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc 1 --features="+palt" --shaper=coretext
[gid781=0@-78,0+842]
$ ./hb-shape /System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc 1 --features="+palt" --shaper=ot
[gid781=0@-78,0+842]
I've verified in the font that 842 is correct.
2021-06-14 13:24:23 -07:00
Garret Rieger
8443cc85cb
[subset] Correct OffsetTo serialization in GPOS to use serialize_serialize ().
2021-06-14 12:18:06 -07:00
Garret Rieger
5ba46ed067
[subset] Correct OffsetTo serialization in GSUB to use serialize_serialize ().
2021-06-14 12:18:06 -07:00
Garret Rieger
35458b6b66
[subset] Add serialize_serialize to OffsetTo.
...
Similar to serialize_subset() this will serialize the new object and then link it to the offset.
2021-06-14 12:18:06 -07:00
Behdad Esfahbod
2b0ced28b6
Cluster Regional_Indicator pairs (aka emoji flags)
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2265
2021-06-14 06:34:58 -07:00
Behdad Esfahbod
4e72d5e35d
[src/check-static-init] Ignore objdump "file format not recognized" error
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3019
2021-06-13 05:46:17 -06:00
Behdad Esfahbod
5bc05ba155
Prefer GPOS over kerx, if GSUB was applied
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3008
2021-06-13 05:28:20 -06:00
Behdad Esfahbod
13c6ad980f
[src/check-*] Pickup $(NM), $(OBJDUMP), $(LDD), $(OTOOL)
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3019
2021-06-12 10:13:49 -07:00
Behdad Esfahbod
c61ce962cf
[buffer] In hb_buffer_get_positions(), return NULL if inside message callback
...
As discussed in https://github.com/harfbuzz/harfbuzz/issues/2468#issuecomment-645666066
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/2468
2021-06-10 17:36:38 -06:00
Behdad Esfahbod
855a3f478e
[emoji] Fix emoji table generation
...
Previously, the last of each range having Extended_Pictograph property
was not processed as so. Ouch!
Test:
$ echo x > null; hb-shape null -u U+1f43b,U+200d,U+2744,U+fe0f
Before:
[gid0=0+1000|gid0=2+1000]
After:
[gid0=0+1000|gid0=0+1000]
Caught by https://github.com/harfbuzz/harfbuzz/issues/3017
2021-06-09 15:10:52 -06:00
Behdad Esfahbod
bd5502f09f
[set] Oops. Fix compile
2021-06-09 14:03:25 -06:00
Behdad Esfahbod
3962225a72
[set] Add hb_set_copy()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3016
2021-06-09 14:02:31 -06:00
Behdad Esfahbod
bc33b87f5e
[set] Use references, not pointers, in internal C++ API
2021-06-09 11:54:12 -06:00
Behdad Esfahbod
9cfac093aa
[set] Add copy constructor/assignment
2021-06-09 11:43:35 -06:00
Behdad Esfahbod
a83b9b0fec
Merge pull request #3011 from harfbuzz/directwrite-cleanup
...
Some directwrite cleanups
2021-06-07 16:41:27 -07:00
Khaled Hosny
4811e8f5d7
Trigger doc rebuild
2021-06-07 10:54:36 +02:00
David Corbett
5585ea02eb
[syllabic] Set position of dotted circle for Indic
2021-06-06 10:35:59 -07:00
Khaled Hosny
a9fb6a0c3c
[aat] Add start table/end table to buffer messages
...
Related to https://github.com/harfbuzz/harfbuzz/issues/3008
2021-06-06 10:35:28 -07:00
Behdad Esfahbod
cf9538e808
Removal remaining uses of "blacklist" terminology
2021-06-04 22:33:16 -06:00
Khaled Hosny
6119ff9d80
[hb-directwrite] Don't load dwrit.dll dynamically
...
We already link to it, so I don't see the point of trying to load it
dynamically.
2021-06-05 04:22:46 +02:00
Khaled Hosny
b2070a509c
[hb-directwrite] Don’t override new/delete
...
This is a testing shaper, we don’t care for overridden malloc/free here.
Use malloc/free in the code called from hb_directwrite_face_create().
2021-06-05 04:22:46 +02:00
Khaled Hosny
221d642b19
[hb-directwrite] Remove _hb_directwrite_shape_experimental_width
...
Not used anywhere.
2021-06-05 04:22:46 +02:00
Qunxin Liu
35d6af6943
[subset] fix fuzzer testcase: https://oss-fuzz.com/testcase-detail/5965777994907648
2021-06-04 18:16:23 -06:00
Peter Williams
3d48bfc187
Avoid a deprecation warning in graphite2
...
As of graphite2 1.3.7, `gr_make_face` is deprecated in favor of
`gr_make_face_with_ops`. It's a one-liner to port over to using it.
This is potentially a compatibility break since I'm not sure when the
`with_ops` API was added, but the minimum version of graphite2 that's
supported by Harfbuzz doesn't seem to be documented anywhere anyway.
2021-06-03 09:51:43 -06:00
Qunxin Liu
1b6008ca62
fix fuzzer testcase: https://oss-fuzz.com/testcase-detail/5417934246772736
2021-06-02 17:32:16 -06:00
Garret Rieger
18f61210a4
Add public api methods to get/set the layout features to retain.
2021-06-02 15:18:45 -06:00
Andi-Bogdan Postelnicu
243d056ff1
Removed unused variable `supp_size` from plan_subset_encoding(...).
2021-06-02 07:17:32 -06:00
Qunxin Liu
7ab0f4eda9
fuzzer fix
2021-05-31 12:44:33 -06:00
Qunxin Liu
cb5a6b5a27
[subset] support option --layout-features
2021-05-26 18:04:18 -06:00
Garret Rieger
73ff04a324
[subset] add option to have the subsetter set the mac overlaps flag on each glyph.
2021-05-26 16:04:56 -06:00
Qunxin Liu
f739e1dc6a
[subset] subset both CPAL and COLRv1
2021-05-26 15:39:42 -06:00
Garret Rieger
466e1fdf5d
[subset] remove unnessecary brackets.
2021-05-26 15:26:09 -06:00
Garret Rieger
583237299d
Add cmp() method for major to page map.
2021-05-26 15:26:09 -06:00
Garret Rieger
2c137045dc
[subset] Optimize set iteration by caching the last found page map index.
...
Reuse it if possible on consecutive calls to next(). Will signifcantly speed up cases where the entire set is iterated. In local testing iterating a very large set was 10x faster.
2021-05-26 15:26:09 -06:00
Behdad Esfahbod
9e5738a86a
[set] Okay, giving up on constexpr till C++14
...
../src/hb-set.hh:213:89: error: call to non-'constexpr' function 'const elt_t& hb_vector_size_t<elt_t, byte_size>::operator[](unsigned int) const [with elt_t = long long unsigned int; unsigned int byte_size = 64]'
2021-05-26 15:15:06 -06:00
Behdad Esfahbod
90fa558a5b
[set] Another try at constexpr to make msvc happy
2021-05-26 15:05:48 -06:00
Behdad Esfahbod
bf5d4a6392
[set] Add TODO
2021-05-26 14:27:02 -06:00
Behdad Esfahbod
11d03f1ff9
[set] Mark a couple methods as constexpr
2021-05-26 14:26:05 -06:00
Behdad Esfahbod
d2829ad374
[set] Refactor code into page_t::is_subset()
2021-05-26 14:24:27 -06:00
Behdad Esfahbod
e47e44a858
[set] Whitespace
2021-05-26 14:19:27 -06:00
Kurt Kartaltepe
2000f47ae5
[set] Compute is_subset by comparing pages.
...
Test subsets one page at a time instead of by codepoints. On my machine
this is about 250x faster than the previous implementation.
2021-05-26 14:15:25 -06:00
Dominik Röttsches
1dffb55361
Chromium build fixes for C++ 17 warning and missing _remap_indexes
...
Use class instead of typename, move _remap_indexes out of #ifndef.
Fixes #2979
2021-05-18 08:20:46 -06:00
Jonathan Kew
bbc5fc3731
[aat] If shaping via morx, don't adjust mark positioning when zeroing widths.
2021-05-17 21:44:29 -06:00
Jonathan Kew
4f1e8d2bf7
[aat] Update glyph properties from GDEF if available when doing a replacement.
2021-05-17 21:44:29 -06:00
Garret Rieger
5e0ec33b3d
Error when link width not in [2, 4]
2021-05-12 16:05:11 -06:00
Qunxin Liu
b23f29bf05
[subset] Add subset () method for COLRv1 Paint tables, BaseGlyphV1List and LayerV1List
...
Also add support for Offset24 in serializer and repacker
2021-05-12 16:05:11 -06:00
Garret Rieger
413769bf86
Add hb-ot-color-colrv1-closure.hh to sources list.
2021-05-12 15:29:53 -06:00
Garret Rieger
de0eba20ed
Remove array for visited_paint.
2021-05-12 15:29:53 -06:00
Qunxin Liu
e59ffe5482
[subset] COLRv1 layer/palette indices closure
2021-05-12 15:29:53 -06:00
Garret Rieger
a08900b721
[subset] fix failing colrv0 subsetting when font has composite glyphs.
...
Composite glyph collection was happening along side colrv0 glyph collection which meant it was possible to miss grabbing the component glyphs for a glyph added by colrv0.
2021-05-10 15:33:54 -06:00
tstuefe
b54d9b695a
start
2021-05-07 16:23:09 -06:00
Khaled Hosny
b37f03f16b
2.8.1
2021-05-04 02:07:06 +02:00
Garret Rieger
be50779cda
[subset] correct ClassDef format determination.
...
It was possible for glyph_min to be a glyph mapped to class zero which threw off the number of glyph calculation.
2021-04-30 14:46:57 -06:00
Khaled Hosny
90713f270e
[hb-ot-layout] Document some return values
2021-04-30 14:05:33 -06:00
Garret Rieger
e25efb31f2
[subset] consider all value formats when computing effective format.
2021-04-23 19:09:37 -07:00
Qunxin Liu
84dbfacfec
[subset] fix collect_variation_idx in PairPosFormat2
2021-04-23 18:52:24 -07:00
Garret Rieger
d356d0f79c
[subset] optimize ValueRecord's for PairPosFormat1.
2021-04-23 18:50:34 -07:00
Garret Rieger
f9fbe4817e
[subset] implement value record optimization for PairPosFormat2.
2021-04-23 18:50:34 -07:00