Behdad Esfahbod
a756bd1944
[glyf] Use component phantom points after transformation
2022-10-13 17:18:19 -06:00
Behdad Esfahbod
82d19c08fc
Revert "[glyf/Composite] Remove phantom points when not needed anymore"
...
This reverts commit 527e63a3bd
.
2022-10-13 17:17:03 -06:00
Behdad Esfahbod
527e63a3bd
[glyf/Composite] Remove phantom points when not needed anymore
2022-10-13 17:13:40 -06:00
Garret Rieger
f4903defc4
[subset] use the accelerator in the subsetting benchmark.
2022-10-13 21:38:54 +00:00
Garret Rieger
01481db582
[subset] use accelerator unicode to gid map if available.
2022-10-13 21:12:22 +00:00
Garret Rieger
4ec5eb955f
[subset] add a subset accelerator.
...
Can be optionally attached to the face during subsetting. Contains data which can accelerate future subsets.
2022-10-13 19:40:31 +00:00
Garret Rieger
f105c28749
[subset] Suggested flags to enable more performant subset production for use in incxfer.
2022-10-13 18:53:41 +00:00
Behdad Esfahbod
5769d422c5
[type] Add HBFixed template
2022-10-13 12:12:24 -06:00
Behdad Esfahbod
8c29dcaee4
s/HBFixed/F16DOT16/g
2022-10-13 12:06:15 -06:00
Behdad Esfahbod
294b1c9f6e
Use snprintf instead of sprintf
2022-10-13 11:30:02 -06:00
Garret Rieger
9559d3c1c1
[repacker] fix incorrect coverage table size estimation.
...
During splitting of PairPosFormat2 the code was assuming the maximum size of the generated coverage table would be equal too the current size. This is incorrect size the new coverage table may not preserve the ranges found in the original coverage table (since we are splitting based on class, not coverage) and in the worst case may convert from format2 to format1. So use the size of a format1 table as the max size.
2022-10-11 14:06:04 -06:00
Khaled Hosny
3ce4b8f5c9
5.3.0
2022-10-08 19:10:07 +02:00
Garret Rieger
99f4668e19
[repacker] use mutable copies of Coverage/ClassDef in MarkBasePos shrink operation.
...
Also make mutable copies (when needed) of the top level subtables during a split operation.
2022-09-30 10:58:50 -06:00
Garret Rieger
8f1bf23cc9
[subset] optimize glyf subsetting w/ retain gids.
...
When retain gids is enabled the subset plan may require the output of many empty glyphs. This change optimizes the glyf subsetting code when the number of retained glyphs << number of output glyphs. Unnessecary lookups to the glyph map are reduced by iterating through the glyph map instead of the output glyph set.
2022-09-29 15:44:49 -06:00
Qunxin Liu
e94fe2adf3
[instance] minor optimizations to glyf instancing
2022-09-29 12:14:43 -06:00
Qunxin Liu
b90ce34a25
[instance] fix for non-empty .notdef glyph metrics update
...
we need pass in source glyph's outline data to calculate boundaries, and
then drop the outline data if notdef-outline is specified.
Also disable shifting points for instancing in get_points () API
2022-09-29 12:14:43 -06:00
Qunxin Liu
b706c6f77e
[instance] update FeatureList with variations
2022-09-29 12:14:43 -06:00
Qunxin Liu
8f3a7017c3
[instance] support FeatureVariations table
2022-09-29 12:14:43 -06:00
Qunxin Liu
f4813e3b7f
[instance] update collect_lookups/prune_features()/closure_features() with variations
...
Some features will be substituted with variations, so we do not collect
lookups from the original feature tables.
2022-09-29 12:14:43 -06:00
Qunxin Liu
64e2f2fc58
[instance] store active featurevariation record/condition idxes in the plan
2022-09-29 12:14:43 -06:00
Qunxin Liu
0a6c16a313
[instance] instantiate fvar table
...
Added an old->new axes_indices mapping in the subset plan
2022-09-29 12:14:43 -06:00
Behdad Esfahbod
486fc2271a
[cplusplus] Add missing const
2022-09-28 15:11:45 -06:00
Qunxin Liu
c335bf469f
support dereferencing shared_ptrs and unique_ptrs
2022-09-27 15:44:29 -06:00
Garret Rieger
8cd7d1c3fe
[subset] Allow table ordering on the face builder to be overriden.
2022-09-22 16:52:14 -06:00
Behdad Esfahbod
b70032edda
[layout] Fix typo in docs
2022-09-22 15:59:16 -06:00
Khaled Hosny
d2966d3919
[ot-font] Try CBDT extents before outline tables
...
Like we do for sbix table.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3827
2022-09-22 15:50:27 -06:00
Behdad Esfahbod
1fdf046427
Merge pull request #3799 from harfbuzz/optical-bounds
...
Optical bounds
2022-09-22 12:03:17 -06:00
David Corbett
3ca5fbda76
[USE] Update the data files
...
This uses the data files from
<3254c94606/USE
>
and closes #3817 .
2022-09-21 16:28:02 -06:00
Behdad Esfahbod
b78d4b1e58
[color] Fix documentation re UPEM vs PPEM
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3826
2022-09-21 13:27:12 -06:00
Behdad Esfahbod
56c4670935
[subset] Fix compiler warning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3823
2022-09-20 17:40:13 -06:00
Behdad Esfahbod
c02a1a4adc
[ot-font] Remove unused include
2022-09-20 17:40:13 -06:00
David Corbett
d7cc82ad48
Update the language system tag registry URL
2022-09-20 10:37:50 -06:00
Jonathan Kew
f54d2b3e2c
[aat] Map 'rlig' to AAT required-ligatures setting.
...
Fixes #3819 .
2022-09-20 10:37:27 -06:00
Khaled Hosny
d827a5ee40
[subset] Skip glyph closure for any dropped table
...
If COLR or MATH tables are being dropped, there is no point in closing
glyphs over them, just like it is done for GSUB.
2022-09-19 13:49:42 -06:00
Khaled Hosny
4a1d891c63
5.2.0
2022-09-17 03:19:29 +02:00
Qunxin Liu
2b766e8ade
[subset] No need to collect_features twice
2022-09-06 13:41:51 -06:00
David Corbett
09b9a1ffdd
[USE] Allow ZWNJ at the end of a cluster
2022-09-06 11:33:12 -06:00
Qunxin Liu
a3e6dbbb43
[subset] skip the script if it's not included in the final subset
2022-09-06 11:29:34 -06:00
Behdad Esfahbod
752060a49c
[layout] Document hb_ot_layout_lookup_get_optical_bound()
2022-09-01 13:47:12 -06:00
Behdad Esfahbod
71c6cba097
[layout] Rename API:
...
-hb_ot_layout_get_optical_bound()
+hb_ot_layout_lookup_get_optical_bound()
2022-09-01 13:43:19 -06:00
Behdad Esfahbod
3892128a1f
[layout] Add HB_NO_LAYOUT_RARELY_USED
2022-09-01 13:41:50 -06:00
Behdad Esfahbod
8e88653f05
[layout] Move code around
2022-09-01 13:39:26 -06:00
Behdad Esfahbod
4bf9621113
[optical-bounds] Optimize
2022-09-01 13:36:26 -06:00
Behdad Esfahbod
5d6f1a88e4
[layout] Add hb_ot_layout_get_optical_bound()
2022-09-01 13:36:26 -06:00
Behdad Esfahbod
14eb3d37ad
[layout] Improve annotations
2022-09-01 13:18:42 -06:00
Qunxin Liu
f8ddb9998b
[instance] Fix os/2 table width to widthclass mapping
2022-09-01 09:44:28 -07:00
Qunxin Liu
8f84c58a34
[instance] don't copy phantom points from component
...
No need to consider USE_MY_METRICS for instancing
2022-09-01 09:44:28 -07:00
Qunxin Liu
58dbc00162
[instance] Fix compiling Composite glyph bytes
...
The x/y offset encoded with int8 originally might overflow after deltas
are applied. So we cannot just copy and update old values.
2022-09-01 09:44:28 -07:00
Qunxin Liu
8b7e2a1373
[instance] we need to update hmtx/vmtx values even for empty glyphs
...
Update metrics using the 4 phantom points
2022-09-01 09:44:28 -07:00
Qunxin Liu
7d7b492344
[instance] move _normalize_axes_location to the beginning of
...
subset_plan_create
pinned_at_default flag decides whether delta will be collected as well
when collecting layout variation indices
2022-09-01 09:44:28 -07:00
Qunxin Liu
6de0a6f0b7
[instance] update GPOS ValueRecord table
2022-09-01 09:43:46 -07:00
Qunxin Liu
61636d4efe
[instance] update GPOS AnchorFormat3 table
2022-09-01 09:37:00 -07:00
Qunxin Liu
9ab6605f20
[instance] update GDEF table
2022-09-01 09:35:22 -07:00
Qunxin Liu
b72995ff16
[instance] GDEF table: collect both varidxes and deltas
2022-09-01 09:33:02 -07:00
Qunxin Liu
e03043bd0b
[subset] don't let VariationStore subset() produce inner_maps
...
Make it a subset-planning object so VariationStore can subset to
specified inner_maps.
Also add a layout_variation_idx_delta_map in subset_plan
2022-09-01 09:32:41 -07:00
Matthias Clasen
29d5c7f67a
docs: Improve docs for some apis
...
Various functions take hb_tag_t arrays. Those
arrays are expected to be 0-terminated. Document
that.
2022-08-31 14:54:12 -06:00
Behdad Esfahbod
c96bfca380
[get-alternates] Minor simplify
2022-08-31 08:05:14 -06:00
Behdad Esfahbod
41aa02ae72
[layout] Improve get_feature_tags documentation
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3798
2022-08-29 11:17:22 -06:00
David Corbett
14e754cd2c
[Unicode 15] Update the Arabic joining script list
2022-08-27 19:11:19 -04:00
David Corbett
29386d963c
[Unicode 15] Send the new scripts to USE
2022-08-27 19:11:19 -04:00
David Corbett
cc0e0f7056
[Unicode 15] Update the USE table
2022-08-27 19:11:19 -04:00
David Corbett
e93c2d1309
[Unicode 15] Update the emoji table & cluster test
2022-08-27 19:11:19 -04:00
David Corbett
f0da4a587a
[Unicode 15] Update the vowel constraint table
2022-08-27 19:11:19 -04:00
David Corbett
a223a61209
[Unicode 15] Update the Indic table
2022-08-27 19:11:19 -04:00
David Corbett
8467e12a74
[Unicode 15] Update the Arabic table
2022-08-27 19:11:19 -04:00
David Corbett
d0c32c5a0e
[Unicode 15] Update the UCD table
2022-08-27 19:11:16 -04:00
David Corbett
893512219e
Add a target to download Blocks.txt
2022-08-27 19:08:02 -04:00
David Corbett
b68d0af889
[Unicode 15] Add new `hb_script_t` values
2022-08-27 15:41:07 -04:00
David Corbett
f9d48150e1
Regenerate files using Ragel
2022-08-27 15:39:39 -04:00
Khaled Hosny
371c88678f
Add few missing since tags
2022-08-23 22:30:39 +02:00
Behdad Esfahbod
84d33a1ed8
[glyf] Fix compiler warning
2022-08-23 13:13:13 -06:00
Qunxin Liu
f887ee0c67
[instance] update post.italicAngle
...
Add tests for instancing glyf/hmtx
2022-08-22 09:30:09 -07:00
Qunxin Liu
4882c717b5
[instance] update OS/2.usWeightClass and OS/2.usWidthClass
2022-08-22 09:30:09 -07:00
Qunxin Liu
ac0e22fa8e
[instance] update glyf/hmtx/vmtx tables
2022-08-22 09:29:37 -07:00
Behdad Esfahbod
23461b7502
[hb-ft] Only apply FT_Face's transform if we created FT_Face
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3788
https://github.com/harfbuzz/harfbuzz/issues/3790
2022-08-19 10:28:30 -06:00
Behdad Esfahbod
4f59211762
Merge pull request #3787 from harfbuzz/split_mark_base_bos
...
[repacker] Add support for splitting MarkBasePosFormat1 in the packer.
2022-08-18 16:33:44 -06:00
Behdad Esfahbod
2eda2ab3bb
[object] Forward hb_object_create() arguments to constructor
2022-08-18 16:15:54 -06:00
Behdad Esfahbod
df040de9b4
[array] Add a std::forward
2022-08-18 16:15:00 -06:00
Behdad Esfahbod
c606978ee0
[array] Remove unused type pack
2022-08-18 16:13:56 -06:00
Garret Rieger
37d61afd5e
[subset] add destructor to subset plan.
...
This ensures that it's members get destructed before the plan itself is destructed, as hb_object_destroy calls the destructor for plan.
2022-08-18 16:09:36 -06:00
Garret Rieger
a91bfeeda5
[repacker] comment cleanup.
2022-08-18 22:01:48 +00:00
Garret Rieger
015ca5bc3c
[repacker] fix compiler alignment warning.
2022-08-18 21:52:55 +00:00
Behdad Esfahbod
de37b2650d
[object] Only destruct object if it's not trivially-destructible
...
Such that we're legally free to access the object to destruct its
(pointer) fields ourselves afterwards. For things like hb_font_t,
hb_face_t, etc.
2022-08-18 15:21:48 -06:00
Garret Rieger
683c5dd21e
[repacker] further reduce base count.
2022-08-18 20:57:04 +00:00
Garret Rieger
5ddf41fc9c
[repacker] speed up MarkBasePos test case by using a smaller basecount.
2022-08-18 20:28:05 +00:00
Garret Rieger
bf28b84ae8
[repacker] cleanup unused base_array_id.
2022-08-18 01:51:37 +00:00
Garret Rieger
31976bfb50
[repacker] cleanup unused base_array_links.
2022-08-18 01:50:35 +00:00
Garret Rieger
6f5c52b604
[repacker] optimize AnchorMatrix::clone.
...
Previous runtime is O(n^2) reduced to O(n).
2022-08-18 01:48:10 +00:00
Garret Rieger
29e3b2467e
[repacker] optimzie remove_real_links as it's a hot method.
2022-08-18 01:19:54 +00:00
Garret Rieger
46b5dbd7ce
[repacker] optimize index_for_offset.
2022-08-18 01:18:16 +00:00
Garret Rieger
52303638b9
[repacker] correct size calculation for MarkBasePosFormat1.
2022-08-18 01:10:42 +00:00
Garret Rieger
ac1a853abc
[repacker] implement sanitize methods for MarkBasePos.
2022-08-18 00:55:47 +00:00
Garret Rieger
a3ed9f9099
[repacker] fix graph comparison, and mark base pos generation for the tests.
2022-08-17 23:39:11 +00:00
Garret Rieger
19c51ed35c
[repacker] Get mark base pos test working.
2022-08-17 19:15:55 +00:00
Garret Rieger
b46ced9562
[repacker] correct MarkArray size calculation.
2022-08-17 17:51:29 +00:00
Garret Rieger
36c76c27c6
[repacker] when clearing links in MarkArray, also clear parents of the children.
2022-08-17 17:30:21 +00:00
Garret Rieger
8c3db8bdfd
[repacker] more progress on MarkBasePos tests.
2022-08-17 00:36:23 +00:00
Garret Rieger
1405f96b6f
[repacker] change run_resolve_overflow_test to check for graph equivalence.
...
Replaces a check for an exact match on the final serialized bytes. The previous check enforced equivalent topological sorting between result and expected, but we only really care that the graph's are equivalent and don't overflow.
2022-08-15 23:48:00 +00:00
Garret Rieger
07fd0528c0
[repacker] add graph equality check.
...
Does not compare topological sorting, but looks for equivalence of the two graphs.
2022-08-15 23:16:51 +00:00
Garret Rieger
5cf2a25a60
[repacker] Expose on internal method in the repacker that allows the caller to pass in/out a graph.
...
Will be used in testing so we can compare graphs instead of packed result.
2022-08-15 22:49:24 +00:00
Garret Rieger
c414ef292b
[repacker] Implement MarkArray::shrink.
2022-08-15 22:10:37 +00:00
Behdad Esfahbod
4ab7e579cb
Make HB_BORING_EXPANSION opt-in instead of opt-out
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3757
2022-08-12 12:23:48 -06:00
Garret Rieger
f8b5520556
[repacker] Add AnchorMatrix::shrink.
2022-08-11 23:09:36 +00:00
Garret Rieger
bbe14417ad
[repacker] Begin implementing MarkBasePosFormat1::shrink.
2022-08-11 22:53:30 +00:00
Garret Rieger
c9ddf0815a
[repacker] Implement AnchorMatrix::clone.
2022-08-11 22:34:59 +00:00
Garret Rieger
5ea3c0be8f
[repacker] Implement MarkArray::clone.
2022-08-11 22:21:28 +00:00
Garret Rieger
0083fd109c
[repacker] add as_table() helper to graph.
2022-08-11 22:09:46 +00:00
Garret Rieger
b00eb77682
[repack] Add add_link helper to graph.
2022-08-11 20:33:21 +00:00
Garret Rieger
1acd2a8bf9
[repacker] implement MarkBasePosFormat1::clone_range.
2022-08-11 20:22:31 +00:00
Garret Rieger
cf817f3d99
[repacker] Hook up MarkBasePos splitting.
2022-08-11 19:26:59 +00:00
Garret Rieger
4418beac93
[repacker] start implmenting MarkBasePos splitting.
2022-08-11 19:08:04 +00:00
Behdad Esfahbod
f4f7d691af
Merge pull request #3779 from harfbuzz/split_pair_pos_2
...
[repacker] Add PairPosFormat2 table splitting in the repacker.
2022-08-09 22:23:23 -06:00
Garret Rieger
fa46dbca9d
[repacker] Make actuate_subtable_split internal.
2022-08-08 17:07:14 +00:00
Garret Rieger
fe15f2559f
[repacker] use position instead of memory address as key in device_tables map.
2022-08-08 16:57:28 +00:00
Garret Rieger
163fbf0be1
[repacker] Check for nullptr's before sanitizing.
2022-08-05 23:37:11 +00:00
Garret Rieger
13253233f7
[repacker] in PairPosFormat2 splitting use the max estimated coverage/classdef size for sizing serialization buffers.
2022-08-05 23:15:10 +00:00
Garret Rieger
dde0a2b071
[repacker] track estimated coverage size during PairPosFormat1 split point analysis.
2022-08-05 22:30:37 +00:00
Garret Rieger
b37e8bef0e
[repacker] count size of the current class at the split point in the next segment.
2022-08-05 22:16:20 +00:00
Qunxin Liu
7fde6ab025
fuzzer fix: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49790
2022-08-05 15:10:31 -06:00
Behdad Esfahbod
a4e0fd1685
[MultipleSubst] Rewrite serialize signature as single iterator
2022-08-05 15:05:51 -06:00
Behdad Esfahbod
65d28bc5a7
[MultipleSubst] Rewrite serialize() in terms of iterators
...
Unused still, and hence untested
2022-08-05 14:56:07 -06:00
Behdad Esfahbod
b57ea3b053
Revert "[iter] Use && in uses of is_source_of"
...
This reverts commit ccbba667a9
.
2022-08-05 14:29:27 -06:00
Garret Rieger
0e48a65d32
[repacker] estimate size of classDef1 and coverage during PairPos2 split point analysis.
2022-08-05 20:19:11 +00:00
Garret Rieger
2264df6da3
[repacker] add utility that can calculate the size of Coverage+ClassDef via incremental class inclusion.
2022-08-05 18:33:03 +00:00
Behdad Esfahbod
ccbba667a9
[iter] Use && in uses of is_source_of
2022-08-05 11:51:51 -06:00
Behdad Esfahbod
8fb7cc1c63
[iter] Use && in is_sink_of uses
2022-08-05 11:49:29 -06:00
Garret Rieger
5d824c09c0
[repacker] during table splits don't mutate shared coverage/classdef in place.
...
If other subtables are sharing coverage with a subtable being split we have to duplicate the coverage/classdef tables before they are modified during the shrink operation.
2022-08-05 01:37:14 +00:00
Garret Rieger
e1ab355056
[repacker] correct lookup link insertion.
2022-08-05 01:25:16 +00:00
Garret Rieger
a733a9afa5
[repacker] insert new subtables immediately after the subtable they split from in the lookup.
2022-08-05 00:32:47 +00:00
Garret Rieger
506547c958
[repacker] Use hb_pair_t constructor instead of hb_pair ().
...
hb_pair was causing corrupted gid values.
2022-08-04 21:36:21 +00:00
Garret Rieger
fdd1952c75
[repacker] PairPosFormat2 splitting - fix coverage and classdef splitting.
...
The old code was splitting based on coverage index, but should have been splitting on class value.
2022-08-04 19:21:16 +00:00
Behdad Esfahbod
c67c1b745b
VarStore: simplify again
2022-08-04 11:42:22 -06:00
Behdad Esfahbod
914542bd18
Whitespace
2022-08-04 11:40:54 -06:00
Behdad Esfahbod
d7adc55e18
[ot-font] Allow 24bit glyphs in advance cache
2022-08-04 11:40:54 -06:00
Behdad Esfahbod
99070a734a
[cache] Use short instead of int if fits
2022-08-04 11:40:54 -06:00
Qunxin Liu
d831e935df
bug fix in VarData get_delta ()
...
when LONG_WORDS flag is set, item row is not computed correctly
lcursor should be interpreted as INT32
2022-08-04 11:40:42 -06:00
Garret Rieger
b154b1e4c3
[repacker] pull out PairPosFormat1,2::do_split() into a common helper method.
2022-08-04 01:37:21 +00:00
Garret Rieger
88e0dd02cb
[repacker] add sanitization for PairPosFormat2.
2022-08-04 01:03:07 +00:00
Garret Rieger
51a5060273
[repacker] add test for splitting a PairPos2 w/ device tables.
2022-08-03 22:30:42 +00:00
Garret Rieger
54fab21cb1
[repacker] get basic pair pos 2 split test working.
2022-08-03 21:57:37 +00:00
Garret Rieger
60d6ffb375
[repacker] always duplicate classDef2 when splitting a PairPos2.
...
Splits are done in a way that it shouldn't be possible to share the classDef2 between split PairPos2's so pre-emptively duplicate it.
2022-08-03 21:01:23 +00:00
Garret Rieger
6be152420f
[repacker] add basic test for PairPos2 splitting.
2022-08-03 19:02:20 +00:00
Behdad Esfahbod
b78546b1d2
[cache] Residual
2022-08-03 13:02:18 -06:00
Behdad Esfahbod
ec90d1e161
[cache] Add a non-threadsafe version
...
Use in hb-ft, since already mutex'ed.
2022-08-03 13:01:04 -06:00
Behdad Esfahbod
f73c15ca6c
[atomic-int] Add operators for relaxed ops
2022-08-03 13:01:04 -06:00
Behdad Esfahbod
86d1e22d4f
[atomic-ptr] Rename get
2022-08-03 13:01:04 -06:00
Behdad Esfahbod
d3f2287e0b
[atomic-int] Rename get/set
2022-08-03 13:01:04 -06:00
Behdad Esfahbod
c80e32972f
[mvar] Use VarIdx
2022-08-03 11:31:34 -06:00
Khaled Hosny
52bdc750c1
Revert "[meson] Use pathlib in gen-harfbuzzcc.py"
...
This reverts commit eaf7e5686c
.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3776
No idea what is going on, but lets restore the old code.
2022-08-03 10:40:57 +02:00
Garret Rieger
65ed82fde5
[repacker] PairPosFormat2::do_split.
2022-08-02 22:22:42 +00:00