Behdad Esfahbod
300d82ce2e
Fix compiler warning
2022-12-13 11:01:03 -07:00
Behdad Esfahbod
199345eb29
Merge pull request #3928 from harfbuzz/colrv1-extents
...
COLRv1: use ClipBoxes for extents
2022-12-12 18:37:10 -07:00
Behdad Esfahbod
bd7cb384cf
[VarC] Remove unused variable
2022-12-12 14:10:48 -07:00
Behdad Esfahbod
51d3ce39ba
Merge pull request #3933 from googlefonts/cff
...
[subset] Fix infinite loop when instancing CFF fonts
2022-12-12 14:07:44 -07:00
Behdad Esfahbod
1b278c7658
[VarC] Update for new format
...
https://github.com/harfbuzz/boring-expansion-spec/issues/71
2022-12-12 13:57:05 -07:00
Garret Rieger
64cbe8b962
[subset] Also note that only full instancing works.
2022-12-12 20:41:40 +00:00
Garret Rieger
0da59f86a8
[subset] note that CFF/CFF2 instancing is not yet supported.
2022-12-12 20:26:11 +00:00
Garret Rieger
38a9628885
[subset] simplify handling of table subsetting depedencies.
...
Allow the dependency checker to see all tables that will be subset. Use this to fix the HMTX/VMTX dep check against glyf. Don't delay hmtx/vmtx subsetting if no glyf table is present.
2022-12-12 20:13:17 +00:00
Garret Rieger
0853e5d9d7
[subset] if table dependencies can't be resolved fail the subset.
...
Avoids getting stuck in an infinite loop.
2022-12-12 19:43:31 +00:00
Behdad Esfahbod
6bb478eeeb
[VarC] Clamp after addition
2022-12-12 11:39:06 -07:00
Behdad Esfahbod
80a5011eb6
[VarC] Fix coord setting
...
Those are additive.
2022-12-12 11:37:59 -07:00
Behdad Esfahbod
4e9a6cfb49
[COLR] Use VarStoreInstancer
2022-12-12 10:20:51 -07:00
Behdad Esfahbod
a3a3d37b95
[var] Add VarStoreInstancer
2022-12-12 10:17:41 -07:00
Behdad Esfahbod
c64661b2f8
[COLR] Fix variation code
2022-12-12 10:11:02 -07:00
Behdad Esfahbod
ff332b14ea
[COLR] Handle HB_OT_LAYOUT_NO_VARIATIONS_INDEX
2022-12-11 21:05:14 -07:00
Behdad Esfahbod
9a3f0be291
[COLR] Apply variations in get_extent
2022-12-11 13:40:53 -07:00
Behdad Esfahbod
68964efa55
[COLR] Use bsearch in get_extents
2022-12-11 13:21:01 -07:00
Behdad Esfahbod
d0ee5a452f
[COLR] Return false from get_extents if table version not 1
2022-12-11 13:13:35 -07:00
Behdad Esfahbod
b3d6a5ef86
[colr] Minor no behavior change
2022-12-11 13:12:30 -07:00
Matthias Clasen
7a748ad4ac
COLRv1: use ClipBoxes for extents
...
This is a first step; ultimatively, we
should compute the extents is ClipBoxes
are missing.
2022-12-11 13:12:30 -07:00
Behdad Esfahbod
d36a0f8c42
[COLR] Add TODO
2022-12-11 13:12:19 -07:00
Behdad Esfahbod
a306820681
[colr] Use SortedArray instead of Array
2022-12-11 13:03:55 -07:00
Behdad Esfahbod
b9d5e7a8bb
[colr] Set HB_COLRV1_MAX_NESTING_LEVEL to 16
...
Was 100. That seemed excessive.
2022-12-11 12:54:19 -07:00
Behdad Esfahbod
c17afa48de
[colr] Remove COLRV1_ENABLE_SUBSETTING
2022-12-11 12:53:55 -07:00
Behdad Esfahbod
9ab2c8034e
Revert "[glyf] Use component phantom points after transformation"
...
This reverts commit a756bd1944
.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3929
2022-12-11 12:04:29 -07:00
Behdad Esfahbod
7f73b57bc1
[subset] Graduate L1 instancing API from experimental
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3926
2022-12-10 17:35:52 -07:00
Khaled Hosny
0f4e38cd86
[subset] Small doc fixes
2022-12-10 16:39:26 +02:00
Behdad Esfahbod
bf2e817549
[VarComposites] Support GID24
2022-12-09 23:15:26 -07:00
Behdad Esfahbod
10d38dcdfd
[varc] Change format slightly
...
Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/70
2022-12-09 19:19:57 -07:00
Behdad Esfahbod
af450a757d
[config] Use HB_EXPERIMENTAL_API instead of adhoc HB_EXPERIMENTAL
2022-12-09 19:05:16 -07:00
Behdad Esfahbod
5cf0b9ae7d
[varc] Mark as experimental feature with HB_NO_VAR_COMPOSITES
2022-12-09 18:59:43 -07:00
Behdad Esfahbod
82b4f3791e
[coord-setter] Don't modify font coords
2022-12-09 18:46:33 -07:00
Behdad Esfahbod
e9e503b80b
[Glyph] Pass down coords to get_points
2022-12-09 18:42:46 -07:00
Behdad Esfahbod
8e46870093
[gvar] Take coords in instead of font in apply_deltas_to_points
2022-12-09 18:35:30 -07:00
Behdad Esfahbod
3caa42a4a7
Fix build after rebase
2022-12-09 14:48:41 -07:00
Behdad Esfahbod
bbe59e4211
Whitespace
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
13deea7cbd
[glyf/VarComposite] Clamp axis coordinates
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
a975be4c07
[glyf/VarComposite] Minor rename
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
1e71db2d26
[glyf/VarComposite] Fix transformation
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
1233be61d8
[glyf/VarComposite] Remove unneeded resize
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
1a906162cb
[glyf/coord-setter] Fix memory issue
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
7efd68da39
[glyf/VarComposite] Set coordinates
...
Code is untested but complete!
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
4ec7781497
[glyf] Move coord-setter to its own file
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
dadb4ed71d
[glyf/VarComposite] More, almost there
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
0a939b48a6
[glyf/VarComposite] Implement more
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
65cc3b5e2b
[glyf/VarComposite] More
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
12688ed386
[glyf] Fix distcheck
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
60d959a6e7
[glyf/VarComposite] Add use_my_metrics()
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
575d99406a
[glyf] Flesh out VarCompositeGlyph
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
21f671bc45
[glyf] Add stub VarCompositeGlyph
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
435c5eeffe
[glyf] Split composite-iter
2022-12-09 14:45:29 -07:00
Behdad Esfahbod
1024a013fd
[glyf] Add CoordSetter
2022-12-09 14:45:29 -07:00
Garret Rieger
e66d02126e
[subset] replace subset-processing.md reference with link to it on github.
2022-12-08 16:32:24 -07:00
Garret Rieger
27201ed32b
[subset] fix up hb_subset_preprocess api comment.
2022-12-08 16:32:24 -07:00
Garret Rieger
13b0388351
[subset] link to preprocessing doc from api comment.
2022-12-08 16:32:24 -07:00
Garret Rieger
c097abab52
[subset] set no prune unicode ranges flag in preprocessor.
...
To avoid modifying the original unicode range values in the source font.
2022-12-08 16:32:24 -07:00
Garret Rieger
bc87fe952e
[subset] add note about memory management with preprocessed faces.
2022-12-08 16:32:24 -07:00
Garret Rieger
5e713e99bf
Revert "[map] Speed up is_real()"
...
This reverts commit f5307c3ba8
.
Found to slow down the benchmarks in some cases.
2022-12-08 16:32:24 -07:00
Garret Rieger
eda02c2ebd
[subset] Move hb_subset_preprocess to be non-experimental.
2022-12-08 16:32:24 -07:00
Garret Rieger
76d5482a7c
[subset] always return a valid face from hb_subset_preprocess.
2022-12-08 16:32:24 -07:00
Garret Rieger
35233d2514
[repacker] fix fuzzer reported stack overflow.
...
Fixes https://oss-fuzz.com/testcase-detail/6014493291577344 .
2022-12-07 10:32:56 -07:00
Garret Rieger
f1d3489388
[repacker] bail on failure to alloc assigned_bytes set.
...
Fixes fuzzer issue https://oss-fuzz.com/testcase-detail/5390364397928448 .
2022-12-05 14:13:47 -07:00
Garret Rieger
239a5aca02
[repacker] don't allow references to the null object in graph.
...
Fixes fuzzer issue https://oss-fuzz.com/testcase-detail/6714085985353728
2022-12-05 14:13:47 -07:00
Behdad Esfahbod
4ce0f08897
[coretext] Clamp variation settings to min/max
...
Like our native implementation does; CoreText doesn't itself.
Also fix leak of CFNumber's.
2022-12-05 13:18:34 -07:00
Behdad Esfahbod
22b0390e2d
Revert "[VarData] Don't clear memory we are going to fill in completely"
...
This reverts commit e28e2dad03
.
This made fuzzer unhappy. I'm not sure how.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54044
2022-12-05 09:43:36 -07:00
Behdad Esfahbod
3c497e2458
[harfbuzz-subset.cc] Revert accidental change
...
These extra files are unnecessary, but our generator currently
isn't smart enough to know that. Will fix some time.
2022-12-04 15:35:01 -07:00
Behdad Esfahbod
aa7f5e3742
[subset] Conditionalize call to hb_font_set_variations
2022-12-04 15:33:18 -07:00
Behdad Esfahbod
ad5588e800
[config] If HB_NO_SHAPER then HB_NO_OT_SHAPE
2022-12-04 15:27:59 -07:00
Behdad Esfahbod
1a5c749581
[config] Flesh out HB_NO_SHAPER a bit more
2022-12-04 15:20:51 -07:00
Behdad Esfahbod
2c0abf0258
Revert "[harfbuzz-subset.cc] Trim down!"
...
This reverts commit a335458d57
.
While this can be vastly trimmed down, what I did is not right.
It still depends on hb-face, hb-font, hb-blob, hb-set, and hb-map.
2022-12-04 15:03:36 -07:00
Behdad Esfahbod
a335458d57
[harfbuzz-subset.cc] Trim down!
2022-12-04 14:56:20 -07:00
Behdad Esfahbod
765a3551da
[face-builder] Minor cast
2022-12-04 14:48:32 -07:00
Behdad Esfahbod
3fff6d9084
[face-builder] Initialize face orders to -1
2022-12-04 14:47:38 -07:00
Behdad Esfahbod
805ce9ad3d
[face-builer] Protect against wrong face
...
In hb_face_builder_sort_tables.
2022-12-04 14:43:17 -07:00
Behdad Esfahbod
0acfd2b714
[indic-machine] Regenerate line numbers
2022-12-04 14:01:05 -07:00
Behdad Esfahbod
9704f8354e
Merge branch 'config-header'
2022-12-04 13:58:52 -07:00
Behdad Esfahbod
c1aae14a68
[features.h] Fix autotools build rules
2022-12-04 13:58:39 -07:00
Behdad Esfahbod
0545949f01
[gvar] Minor use array get_size()
2022-12-04 12:44:09 -07:00
Behdad Esfahbod
1bd386515c
[bit-set] Micro-optimize page_for
2022-12-04 12:30:20 -07:00
Behdad Esfahbod
b182e2808a
[bit-set] Don't clear pages when copying set
2022-12-04 12:22:17 -07:00
Behdad Esfahbod
f5307c3ba8
[map] Speed up is_real()
2022-12-04 11:54:16 -07:00
Behdad Esfahbod
301f6e4b47
[Coverage] Remove TODO
2022-12-04 11:46:10 -07:00
Behdad Esfahbod
dbbb8e8006
Revert "[map] Add hb_map_filter_invalid"
...
This reverts commit 8d7e921117
.
Surprisingly this slowed NotoNastaliqUrdu benchmark down by a couple
percent instead of speeding it up.
2022-12-04 11:13:39 -07:00
Behdad Esfahbod
8d7e921117
[map] Add hb_map_filter_invalid
...
Use it in one place.
2022-12-04 11:02:15 -07:00
David Corbett
260df1fa32
[indic] Support <U+0A02, U+0A40>
2022-12-04 10:46:47 -07:00
Behdad Esfahbod
8b533763c0
Use hb_len() instead of .len()
2022-12-03 15:58:12 -07:00
Behdad Esfahbod
e28e2dad03
[VarData] Don't clear memory we are going to fill in completely
2022-12-03 15:56:43 -07:00
Behdad Esfahbod
0e13b4abbc
[VarData] Optimize main loop slightly
2022-12-03 15:50:24 -07:00
Behdad Esfahbod
ad17c0acce
[VarData] Whitespace
2022-12-03 14:56:57 -07:00
Behdad Esfahbod
e7eb445d29
[VarData] Optimize longWord calculation
2022-12-03 14:56:00 -07:00
Behdad Esfahbod
f2c980be29
[VarData] Optimize wordCount calculation
...
6% speedup in RobotoFlex-Variable/900 benchmark.
2022-12-03 14:49:38 -07:00
Behdad Esfahbod
3641b0e01e
[VarData] Optimize serialize()
2022-12-03 14:26:21 -07:00
Behdad Esfahbod
e155f12307
[VarData] Minor save a variable
2022-12-03 14:14:39 -07:00
Behdad Esfahbod
5596a73087
[layout] Speed up ClassDefFormat2 intersects
2022-12-03 13:33:48 -07:00
Behdad Esfahbod
85e7263b38
[VariationStore] Minor access array directly
2022-12-03 13:28:02 -07:00
Behdad Esfahbod
41a8597f38
[layout] Simplify CoverageFormat2 intersects_coverage()
2022-12-03 13:23:26 -07:00
Behdad Esfahbod
1f4d8ccaed
[CoverageFormat2] Optimize intersects()
2022-12-03 13:17:15 -07:00
Behdad Esfahbod
c482b06108
[gpos] Optimize PairPosFormat1::intersects
2022-12-03 13:14:31 -07:00
Behdad Esfahbod
58e9df132f
[Device] Serialize VariationDevice zerocopy
2022-12-03 13:04:00 -07:00
Behdad Esfahbod
071a2bb4f7
[serialize] Support zerocopy while sharing
2022-12-03 13:03:38 -07:00
Behdad Esfahbod
44a5de3a97
[Device] Save a snap/revert
2022-12-03 12:50:32 -07:00
Behdad Esfahbod
93328cedfc
[Device] Save a map get()
2022-12-03 12:49:26 -07:00
Behdad Esfahbod
630b874ae6
[gsubgpos] Add a cache to intersected_class_glyphs
...
30% gain on subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/1400.
2022-12-03 12:13:15 -07:00
Behdad Esfahbod
c044f4af3e
[gsubgpos] Remove wrong const
2022-12-03 11:58:04 -07:00
Behdad Esfahbod
2680be1f22
[gsubgpos] Don't set unnecessary funcs
2022-12-03 11:54:52 -07:00
Behdad Esfahbod
023f595dec
[cmap] Speed up DefaultUVS::copy even more
...
Another 14% on SourceHanSerifVF/10 benchmark.
2022-12-03 11:18:05 -07:00
Behdad Esfahbod
4ca6105108
[cmap] Remove double-min
2022-12-03 11:15:06 -07:00
Behdad Esfahbod
cd29147e30
[cmap] Minor cast
2022-12-03 10:41:42 -07:00
Behdad Esfahbod
4cdb5cc69b
[cmap] Minor change iterator
2022-12-03 10:40:24 -07:00
Behdad Esfahbod
2cdaedaf54
Use hb_enumerate in more places
2022-12-03 10:16:35 -07:00
Behdad Esfahbod
02bc4dd69b
Use hb_enumerate instead of hand-coding
2022-12-03 10:10:01 -07:00
Behdad Esfahbod
4d19c724c0
[CoverageFormat1] Speed up intersects()
...
Speeds up SourceHanSerif/10000 benchmark (not in test suite) by
32%!
2022-12-03 09:57:29 -07:00
Behdad Esfahbod
a2d33779e1
Fix arm bot build
2022-12-03 09:49:00 -07:00
Behdad Esfahbod
dabbf13d40
[cmap] Speed up DefaultUVS::copy
2022-12-03 09:46:11 -07:00
Qunxin Liu
8eadb83640
[subset] Update hb_subset_input_override_name_table API
...
Override the name string for the NameRecord identified by name_id,
platform_id, encoding_id and language_ids specified by the user.
If a record with specified name_id does not exist, this API will create
a new NameRecord with provided info and insert it to the name table.
2022-12-02 18:05:53 -07:00
Behdad Esfahbod
ddeac3658b
[test-multimap] More tests
2022-12-02 16:51:07 -07:00
Behdad Esfahbod
ff419789ef
[subset-plan] Sort unicode_to_new_gid_list when needed
2022-12-02 16:43:33 -07:00
Behdad Esfahbod
1a40da4ad1
[subset-plan] Use add_array instead of add_sorted_array
...
That vector is not declared as sorted.
2022-12-02 16:13:37 -07:00
Behdad Esfahbod
32e049a315
[subset-plan] Use gid-to-unicodes multimap
...
One test fails. Need investigation.
2022-12-02 16:09:10 -07:00
Behdad Esfahbod
da7961b2e8
.
2022-12-02 16:08:40 -07:00
Behdad Esfahbod
7d6893a803
[subset-accelerator] Cache gid-to-unicodes
2022-12-02 15:50:52 -07:00
Behdad Esfahbod
10c8fc5553
[multimap] Add a multimap datastructure
2022-12-02 15:50:49 -07:00
Behdad Esfahbod
a42fc8ec4a
[subset-accelerator] Adjust in_error()
2022-12-02 15:41:18 -07:00
Behdad Esfahbod
65d9630312
[subset-cff2] Whitespace
2022-12-02 14:59:26 -07:00
Behdad Esfahbod
b33297ee26
[cff2] Remove unused typedef
2022-12-02 14:43:37 -07:00
Behdad Esfahbod
3ade2ffaa5
[serialize] Adjust pop_discard for zerocopy
2022-12-02 14:26:36 -07:00
Behdad Esfahbod
043eeb29a3
[subset-cff] Optimize encode_subrs
...
Don't loop over all original subrs. Just walk over closure subrs.
2022-12-02 13:58:36 -07:00
Behdad Esfahbod
0ad5977cd6
[subset-cff] Simplify hinting processing
...
We already have drop_hints in the params.
2022-12-02 13:41:36 -07:00
Behdad Esfahbod
16cbe41bca
Merge pull request #3910 from googlefonts/repacker_fuzz
...
[repacker] Add a fuzzer for the hb-subset-repacker api.
2022-12-02 12:43:13 -07:00
Behdad Esfahbod
2a7a1d5a73
[Coverage] Avoid timeout on broken ranges
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53929
2022-12-02 12:33:24 -07:00
Behdad Esfahbod
c947652768
[subset-cff] Micro-optimize
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
a24d4e9261
[array] Oops. Fix memcpy copy()!
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
5e41766bb9
[array] Fix hb_bytes_t memcpy copy
...
Wasn't being used!
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
a5616227ca
[subset-cff] Fix buffer size calculation
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
015af5a8e5
[subset-cff] Write a couple loops as range-based for
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
bfbbd4af25
[subset-cff] Copy str for call ops
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
c755b3884f
[subset-cff] Pre-alloc enough for check-less copy
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
062e59ae67
[subset-cff] Optimize vector allocation for preprocessed input
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
8e9e94dba9
Revert "[vector] Optimize grow_vector() for size"
...
This reverts commit 1dd9396c7a
.
Is faster indeed.
15% on SourceHanSans/10000 benchmark.
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
2644540a74
[subset-cff] Compact parsed strings if using accelerator
...
Saves 32% on SourceHanSans/10000 benchmark!
Also, use memcmp now for writing out strings since now that our
ops are not super short, that's faster.
This makes cff-japanese test takes super long though; that needs
inspection.
2022-12-02 12:01:35 -07:00
Behdad Esfahbod
6012d3b228
[subset-cff] Write out charstrings zerocopy to serializer
2022-12-01 17:33:53 -07:00
Behdad Esfahbod
36e1a6339c
[cff] Add total_size to INDEX
2022-12-01 17:00:03 -07:00
Behdad Esfahbod
3843000660
[serialize] Add start_zerocopy()
2022-12-01 16:48:22 -07:00
Garret Rieger
de5a621322
[repacker] enforce root node having no incoming edges.
2022-12-01 23:37:16 +00:00
Behdad Esfahbod
a2681c37c1
[cff-subset] Simplify INDEX serialize() more
2022-12-01 16:15:23 -07:00
Behdad Esfahbod
c4b05878cb
[subset-cff] Remove INDEX unused serialize() methods
2022-12-01 15:56:37 -07:00
Behdad Esfahbod
b3ad4d72cc
[cff] Another no-memset in INDEX
2022-12-01 15:46:00 -07:00
Behdad Esfahbod
5fd2f255fc
[open-type] Don't memset 0 in serialize for ArrayOf family
...
Not necessary.
2022-12-01 15:18:59 -07:00
Garret Rieger
30e405e470
[repacker] ensure link obj indices are valid.
2022-12-01 22:12:59 +00:00
Behdad Esfahbod
70ac6dfb28
[subset-cff] Don't memset 0 INDEX and other serialize methods
...
Not necessary.
2022-12-01 14:58:25 -07:00
Garret Rieger
554ed06fac
[repacker] add cycle detection to the graph sort.
...
This allows us to bail early if the graph is not acyclic.
2022-12-01 21:52:37 +00:00
Behdad Esfahbod
a66de336fb
[vector] Minor use get_size() in as_bytes()
2022-12-01 14:32:13 -07:00
Behdad Esfahbod
0b826368fd
[serializer] Don't memset memory in embed
...
Not necessary.
2022-12-01 14:23:25 -07:00
Behdad Esfahbod
3b68c7146f
[array] Don't clear serializer buffer when copying out
...
Not needed.
2022-12-01 14:19:27 -07:00
Behdad Esfahbod
57808609c9
[VarData] Move an unlikely
2022-12-01 14:03:56 -07:00
Garret Rieger
9e99d08470
[repacker] validate link widths during repacker setup.
2022-12-01 20:17:41 +00:00
Garret Rieger
edf7a29595
[repacker] Validate link positions before running the repacker.
2022-12-01 20:17:41 +00:00
Garret Rieger
deca30b268
[repacker] get repacker fuzzer working.
...
Additionally add helper method that allows a graph to be saved as a fuzzer seed.
2022-12-01 20:17:40 +00:00
Garret Rieger
985b19f678
[repacker] begin implementing a fuzzer for the repacker api.
2022-12-01 20:17:39 +00:00
Matthias Clasen
c6d616cc41
Generate and install hb-features.h
...
This header has defines for all the optional
dependendencies that come with their own Harfbuzz
headers, so you can do:
#include <hb-features.h>
#ifdef HB_HAS_DIRECTWRITE
#include <hb-directwrite.h>
#endif
2022-12-01 18:16:55 +08:00
Behdad Esfahbod
8805a866b5
[ClassDef2] Write a few loops as range-based for
2022-11-30 17:18:04 -07:00
Behdad Esfahbod
ac8b232a2d
[gsub] Cache intersects_class results for closure
...
Benchmark Time CPU Time Old Time New CPU Old CPU New
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/10 +0.0246 +0.0240 0 0 0 0
BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/64 -0.5541 -0.5544 4 2 4 2
BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/512 -0.1120 -0.1123 43 38 43 38
BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/1400 -0.1154 -0.1159 43 38 43 38
2022-11-30 17:09:04 -07:00
Behdad Esfahbod
c6a4b60116
[gsubgpos] Add an unlikely
2022-11-30 15:02:42 -07:00
Behdad Esfahbod
32dd9810cf
[subset-cff1] Cache glyph-to-sid-map in the accelerator
...
Benchmark Time CPU Time Old Time New CPU Old CPU New
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/10 -0.0841 -0.0843 0 0 0 0
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/64 -0.1305 -0.1305 0 0 0 0
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/512 -0.1398 -0.1401 1 1 1 1
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/4096 +0.0382 +0.0380 9 9 9 9
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/10000 +0.0213 +0.0211 11 11 11 11
2022-11-30 14:00:33 -07:00
Behdad Esfahbod
72fabef0a4
[SingleSubstFormat2] Speed up closure
2022-11-30 11:37:49 -07:00
Behdad Esfahbod
2dc2e016d4
[cff] Enable an unlikely
2022-11-30 11:25:50 -07:00
Behdad Esfahbod
582a87ef0a
[cff] Speed up FDSelect0 sanitize
2022-11-30 11:20:19 -07:00
Garret Rieger
2658370f00
[subset] make the cmap cache in accelerator const.
2022-11-29 22:04:10 -07:00
Garret Rieger
7551a668e3
[subset] Make cff_accelerator const.
...
This gives more confidence that it won't be accidentally modified by the subset operation using it.
2022-11-29 22:04:10 -07:00
Behdad Esfahbod
d8d0e06694
[array] Comment
2022-11-29 21:35:54 -07:00
Behdad Esfahbod
2fecf2aa19
[ClassDef] Minor rename
2022-11-29 21:25:01 -07:00
Behdad Esfahbod
8f632ca884
[ClassDef] Write another loop as range for
2022-11-29 21:23:35 -07:00
Behdad Esfahbod
87b12aee13
[ClassDef] Write a couple loops as range for
2022-11-29 21:18:48 -07:00
Behdad Esfahbod
ccd40c842c
[ClassDef] Optimize intersected_class_glyphs
2022-11-29 21:15:19 -07:00
Behdad Esfahbod
44c585a6df
[ClassDef] Fix disabled codeblock
2022-11-29 20:52:48 -07:00
Behdad Esfahbod
9b7617d433
[ClassDef2] Use a faster algorithm in subset()
...
Speedup across the board; up to 40% for MPlus1 at small sizes.
2022-11-29 20:29:58 -07:00
Behdad Esfahbod
ae5e6d562b
[ClassDef2] Micro-optimize
2022-11-29 15:48:38 -07:00
Behdad Esfahbod
7129b79406
[open-type] Add faster range-based loop to array types
2022-11-29 15:33:07 -07:00
Behdad Esfahbod
dc82334061
Remove a couple of unneeded .iter() invocations
2022-11-29 15:26:55 -07:00
Behdad Esfahbod
00f2657bb8
[subset] Accelerate sanitize-table-cache
...
Big wins all across small subsets
BM_subset/subset_codepoints/Roboto-Regular.ttf/nohinting/10 -0.1140 -0.1129 0 0 0 0
BM_subset/subset_codepoints/Amiri-Regular.ttf/nohinting/10 -0.4717 -0.4714 0 0 0 0
BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/10 -0.8147 -0.8146 0 0 0 0
BM_subset/subset_codepoints/NotoSansDevanagari-Regular.ttf/nohinting/10 -0.3248 -0.3242 0 0 0 0
BM_subset/subset_codepoints/Mplus1p-Regular.ttf/nohinting/10 -0.1262 -0.1260 0 0 0 0
BM_subset/subset_codepoints/SourceHanSans-Regular_subset.otf/nohinting/10 -0.0308 -0.0309 0 0 0 0
BM_subset/subset_codepoints/SourceSansPro-Regular.otf/nohinting/10 -0.1374 -0.1373 0 0 0 0
BM_subset/subset_codepoints/AdobeVFPrototype.otf/nohinting/10 -0.4555 -0.4555 0 0 0 0
BM_subset/subset_codepoints/MPLUS1-Variable.ttf/nohinting/10 -0.4175 -0.4174 0 0 0 0
BM_subset/subset_codepoints/RobotoFlex-Variable.ttf/nohinting/10 -0.4214 -0.4214 0 0 0
2022-11-29 15:20:13 -07:00
Behdad Esfahbod
33165f4848
[bit-page] Remove ELT_BITS_LOG_2
...
My compiler is smart enough to take care of it.
2022-11-29 15:15:43 -07:00
Garret Rieger
7a004a7ac2
[subset] Cache per subtable cmap unicode mappings.
2022-11-28 19:48:15 -07:00
Behdad Esfahbod
d2a2670e54
[iter] Simplify has() interface implementations
2022-11-28 19:43:09 -07:00
Behdad Esfahbod
cba82829ba
[subset-cff1] Share subrs object
...
Multiple FDs might share the same subrs...
2022-11-28 16:19:54 -07:00
Behdad Esfahbod
c7b998b355
[cff2] Don't share fd-array link
...
No point.
2022-11-28 16:18:21 -07:00
Behdad Esfahbod
3d9e3c2dc7
[subset-cff2] Don't share varstore object
2022-11-28 16:17:09 -07:00
Behdad Esfahbod
c503cf003e
[cmap] Store offset, not pointer, in cmap cache
2022-11-28 15:53:35 -07:00
Behdad Esfahbod
3e151139a8
[PairPos] Optimize get_effective_value_format
...
Speeds up BM_subset/subset_glyphs/SourceHanSans-Regular_subset.otf/nohinting/512
12%.
2022-11-28 14:23:49 -07:00
Behdad Esfahbod
3131aecf9f
[array/hash] Fix asan issue
...
../src/hb-algs.hh:240:43: runtime error: reference binding to misaligned address 0x7ffe91a08b0e for type 'const unsigned int', which requires 4 byte alignment
2022-11-28 14:12:55 -07:00
Behdad Esfahbod
26ad7a6022
[gpos] Minor micro-optimize
2022-11-28 14:12:52 -07:00
Behdad Esfahbod
c769d7e181
[gpos] Whitespace
2022-11-28 14:03:58 -07:00
Behdad Esfahbod
3ea0f37c30
[subset-cff] Move an init to constructor
...
The init was not called anyway.
2022-11-28 13:58:44 -07:00
Behdad Esfahbod
6c92c3e0cf
[subset-cff] Remove unnecessary check
2022-11-28 13:54:24 -07:00
Behdad Esfahbod
7fd300dd9a
[subset-cff] Use constructor for parsed_cs_op_t
2022-11-28 13:51:16 -07:00
Garret Rieger
bd37900e0d
[subset] use a reference to cached global/loca subrs.
...
Previously they were being copied in. Copying is no longer necessary now that hint dropping doesn't mutate the arrays.
2022-11-28 13:43:52 -07:00
Behdad Esfahbod
ded9de9cd8
[cff] bsearch in fdselect
...
Saves 8% in NotoSansCJK / 10000 subset benchmark.
2022-11-28 13:32:08 -07:00
Behdad Esfahbod
0c33aba30c
[subset-cff] Rename drop flag to hinting flag
2022-11-28 12:28:13 -07:00
Behdad Esfahbod
6f5b531986
[subset-cff] Make no-hinting use accelerator as well
2022-11-28 12:24:29 -07:00
Behdad Esfahbod
f51a624e67
[subset-cff] Micro-optimize drop_hints_in_str
2022-11-27 14:54:39 -07:00
Behdad Esfahbod
3860326688
[subset-cff] Write loop more idiomatic
2022-11-27 13:23:13 -07:00
Behdad Esfahbod
3ff502d3ae
[subset-cff] Remove unnecessary initialization
2022-11-27 12:58:04 -07:00
Behdad Esfahbod
6af4985bf9
[subset-cff] No need for bitflag here anymore
2022-11-26 18:20:20 -07:00
Behdad Esfahbod
69ce606d14
[subset-cff] Immediately drop subr numbers instead of marking for skip
...
Seems to work and saves ~2% time.
2022-11-26 18:18:35 -07:00
Behdad Esfahbod
1cf4f3e083
[subset-cff] More comment
2022-11-26 18:15:28 -07:00
Behdad Esfahbod
f68221ff43
[subset-cff] Add comment
2022-11-26 18:12:14 -07:00
Behdad Esfahbod
048ab8a066
[subset-cff] Remove unused bits
2022-11-26 18:00:43 -07:00
Behdad Esfahbod
37cbfc0c7e
[subset-cff] Remove unneeded member
2022-11-26 17:57:44 -07:00
Behdad Esfahbod
46ab15137b
[subset-cff] Add has_calls to parsed charstrings
...
Optimize closure based on it.
2022-11-26 17:49:21 -07:00
Behdad Esfahbod
6d53074e63
[subset-cff] Drop another unused parameter
2022-11-26 17:23:09 -07:00
Behdad Esfahbod
42615561b5
Optimize a couple array references
2022-11-26 17:13:20 -07:00
Behdad Esfahbod
04d23b7ca8
[subset-cff] Micro-optimize collect_subr_refs_in_str
2022-11-26 17:08:00 -07:00
Behdad Esfahbod
9d18180c3c
[array] Use hb_hash instead of handrolling
2022-11-26 15:38:21 -07:00
Behdad Esfahbod
e302b9d5da
Fix build
2022-11-26 15:18:16 -07:00
Behdad Esfahbod
70d97d079b
[subset-cff] Remove unused argument
2022-11-26 15:16:11 -07:00
Behdad Esfahbod
4167e93a15
[subset-cff2] Micro-optimize blend operator
2022-11-26 15:14:52 -07:00
Behdad Esfahbod
f159bf075b
[cff2] Micro-optimize blend operator
2022-11-26 15:11:32 -07:00
Behdad Esfahbod
a331e913dc
[bit-page] Hand-code equality
...
Faster than memcmp() because of alignment.
2022-11-26 14:59:37 -07:00
Behdad Esfahbod
9df06a2695
[bit-set] Fix is_subset() short-circut criteria
...
Ouch!
2022-11-26 14:56:45 -07:00
Behdad Esfahbod
915c1a00cf
[vector] Add remove_unordered
...
Saves 5% in NotoNastaliq/1000 subset benchmark.
2022-11-26 14:48:57 -07:00
Behdad Esfahbod
4b8d8fbee4
[ot-map] Micro-optimize for size
2022-11-26 14:31:15 -07:00
Behdad Esfahbod
93f3a9dbc6
[ot-map] Micro-optimize more
...
Another 500 bytes.
2022-11-26 14:25:21 -07:00
Behdad Esfahbod
f39f049870
[ot-map] Micro-optimize
...
Weird that shrinks size by 500 bytes.
2022-11-26 14:16:15 -07:00
Behdad Esfahbod
60bb32c454
[ot-map] Minor refactor
2022-11-26 14:12:57 -07:00
Behdad Esfahbod
e3cc61838f
[PairPos] Adjust kerning buffer messages
2022-11-26 13:58:04 -07:00
Behdad Esfahbod
a81dd1053d
[layout] Adjust printing feature tags
...
For required-feature, print spaces, not nul bytes.
2022-11-26 13:43:36 -07:00
Behdad Esfahbod
56e3868b52
[layout/buffer-message] Print feature name in lookup buffer messages
2022-11-26 13:14:23 -07:00
Garret Rieger
a5d35fd80a
[subset] use charstrings directly from accelerator cache if mutability isn't needed.
2022-11-25 16:50:55 -07:00
Behdad Esfahbod
026b64ef76
[subset-cff] Avoid set mallocation in hb_plan_subset_cff_fdselect
2022-11-25 14:57:40 -07:00
Behdad Esfahbod
74acf52f33
[subset-cff] Micro-optimize copy_str more
2022-11-25 14:43:44 -07:00
Behdad Esfahbod
d2f3cde7ef
[subset-cff] Micro-optimize copy_str
2022-11-25 14:38:30 -07:00
Behdad Esfahbod
e333223f26
[array] Optimize serializing copy()
2022-11-25 14:26:02 -07:00
Behdad Esfahbod
22990fca1d
Merge pull request #3894 from googlefonts/cff_accel
...
[subset] Cache parsed char strings in CFF accelerator
2022-11-25 14:12:58 -07:00
Garret Rieger
8d5c899b0f
[subset] In cff accelerator hold reference to CFF table instead of the whole font.
2022-11-25 20:53:20 +00:00
Behdad Esfahbod
7b197446ac
[vector] Adjust for HB_OPTIMIZE_SIZE
2022-11-25 13:28:53 -07:00
Garret Rieger
75a99f28ab
[subset] destruct cff accelerator if present.
2022-11-25 20:24:05 +00:00
Behdad Esfahbod
1d474194f0
[subset-cff] Micro-optimize encode_str
2022-11-25 13:21:35 -07:00
Behdad Esfahbod
3c4a610b59
[subset-cff] Micro-optimize copy_str some more
2022-11-25 13:16:30 -07:00
Behdad Esfahbod
535aadb309
[subset-cff] Micro-optimize collect_subr_refs_in_str more
2022-11-25 13:07:42 -07:00
Behdad Esfahbod
00a9df3a43
[subset-cff] Micro-optimize collect_subr_refs_in_str
2022-11-25 13:05:05 -07:00
Behdad Esfahbod
d2a2f5bf4e
[vector] Handroll copy
2022-11-25 12:44:02 -07:00
Behdad Esfahbod
1fed366d5b
[serialize] Shut compiler warning off
2022-11-25 12:37:24 -07:00
Behdad Esfahbod
f2297e6978
[buffer] Documentation
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3889
2022-11-25 11:33:00 -07:00
Garret Rieger
71c23c1c07
[subset] don't copy the entire global/loca subr lists from the accelerator.
...
Instead run a closure on the retained charstrings and copy only the referenced subrs. This significantly speeds up cases with small character sets.
2022-11-25 18:05:39 +00:00
Garret Rieger
4ff09274a8
[subset] In CFF accelerator keep a reference to original face.
...
The charstring objects reference memory from the original face so we need to maintain a reference to prevent it from being destroyed.
2022-11-24 22:47:29 +00:00
Behdad Esfahbod
6aaa16627c
[Coverage] Comment
2022-11-24 14:58:42 -07:00
Behdad Esfahbod
06e2147a48
More call set->next() directly
2022-11-24 14:56:04 -07:00
Behdad Esfahbod
196c9db06f
Call ->next() directly
2022-11-24 14:51:52 -07:00
Behdad Esfahbod
03d64b7469
[bit-set] Remove TODO that would never happen
2022-11-24 14:33:18 -07:00
Behdad Esfahbod
690df8a369
[bit-set] Micro-optimize prev()
2022-11-24 14:32:51 -07:00
Behdad Esfahbod
fe5d9176ae
[bit-set] Micro-optimize size
...
It's silly that this saves size at all. :(
2022-11-24 14:30:18 -07:00
Behdad Esfahbod
cf9b9929df
[bit-set] Micro-optimize process()
2022-11-24 14:26:28 -07:00
Behdad Esfahbod
d77903db7b
[bit-set] Micro-optimize
2022-11-24 14:22:32 -07:00
Behdad Esfahbod
13dd4b464b
[bit-set] Micro-optimize access
2022-11-24 14:20:42 -07:00
Garret Rieger
a3afa61ce8
[subset] use cached parsed char strings if available.
2022-11-24 21:14:00 +00:00
Garret Rieger
47c125845c
[subset] Cache parsed charstrings in the cff accelerator.
2022-11-24 21:14:00 +00:00
Garret Rieger
48b6837074
[subset] add a CFF specific accelerator object.
...
This allows CFF specific accelerator structures to be isolated to the CFF code.
2022-11-24 21:13:59 +00:00
Behdad Esfahbod
d77f346d1a
[subset-cff] Minor rename
2022-11-24 14:02:46 -07:00
Behdad Esfahbod
29a0fa089a
[subset-cff] Micro-optimize
2022-11-24 14:00:59 -07:00
Behdad Esfahbod
d480ae1fac
[cff] Remove unused function
2022-11-24 13:53:43 -07:00
Behdad Esfahbod
73046d53e5
[shaper] Disable dumber shaper if no AAT
2022-11-24 13:49:29 -07:00
Behdad Esfahbod
e9f964c01a
[ot-face] Declare more tables as core
2022-11-24 13:38:53 -07:00
Behdad Esfahbod
5bc27a128d
[machinery] Comment
2022-11-24 13:30:12 -07:00
Behdad Esfahbod
d21bfb0861
[normalize] Remove an unlikely
...
Keep unlikely for truely unlikely scenarios.
2022-11-24 13:14:05 -07:00
Behdad Esfahbod
9e1239f443
[config] Define HB_NO_VERTICAL in HB_LEAN and as such in HB_TINY
2022-11-24 13:00:47 -07:00
Behdad Esfahbod
6f133ccfde
[glyf] Fix build with HB_NO_VERTICAL
2022-11-24 12:59:55 -07:00
Behdad Esfahbod
76420ef769
[machine.rl] Remove unlikely from what happens 1/16 of the time
2022-11-24 12:52:15 -07:00
Behdad Esfahbod
1248574454
[config] Disable Zawgyi shaper in HB_MINI/HB_TINY
2022-11-24 12:46:04 -07:00
Behdad Esfahbod
05aa084e67
[PairPos] Another attempt at fixing unsafe-to-break with ValueFormat2
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116
Test:
$ hb-shape XBRoya34.ttf ' الأ' --show-flags --script=arab
2022-11-24 12:14:09 -07:00
Behdad Esfahbod
54ae3345b2
[buffer] Improve documentation of hb_buffer_add_codepoints()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3889
2022-11-24 12:00:36 -07:00
Behdad Esfahbod
a4a4078632
Merge pull request #3893 from googlefonts/preprocess_test
...
[subset] Fix testing of preprocess
2022-11-24 11:56:58 -07:00
Behdad Esfahbod
0c70bc7f32
[skippy-iter] Fix two logic errors
...
First, a signed underflow.
Second, a wrong condition.
Both were introduced in 42681bdb55
2022-11-24 11:48:48 -07:00
Behdad Esfahbod
3b43096ef3
[buffer] Whitespace
2022-11-23 22:04:02 -07:00
Behdad Esfahbod
094f80738a
[buffer] Handle null buffer in set_message_func
2022-11-23 22:03:26 -07:00
Behdad Esfahbod
1fa64c0c23
[gsubgpos] Conditionalize skippy on unsafe-to-concat
2022-11-23 21:38:51 -07:00
Behdad Esfahbod
42681bdb55
[gsubgpos] No logic-change minor rewrite
2022-11-23 21:36:43 -07:00
Behdad Esfahbod
c15efdec49
[gsubgpos] Comment
2022-11-23 21:14:28 -07:00
Behdad Esfahbod
7ec1c41a55
[gsubgpos] Skippy-iter: Prefer correctness to performance
...
Prefer unsafe-to-concat correctness, over performance.
2022-11-23 21:12:41 -07:00
Behdad Esfahbod
dce3502e10
[array] Add commented-out static asserts
...
They don't work.
2022-11-23 18:34:54 -07:00
Behdad Esfahbod
a7fee43cef
[priority-queue] Minor micro-optimize
2022-11-23 17:46:32 -07:00
Garret Rieger
ff3cac0ccd
[subset] Fix unecessary trailing 0 bytes left by ContextFormat2 pruning.
...
Uneeded rules where beind removed from the count by the bytes for them was being left in the font.
2022-11-23 23:50:49 +00:00
Behdad Esfahbod
f2851e4157
[test-map] Test has() getter with unique-ptr
2022-11-23 16:50:30 -07:00
Behdad Esfahbod
5f3a780614
[font] Protect against div-by-zero
2022-11-23 16:45:46 -07:00
Behdad Esfahbod
060ecac949
[font] Respect subfont slant setting in hb-draw
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3890
2022-11-23 16:31:37 -07:00
Garret Rieger
51028e63e6
[subset] Retain all glyphs in preprocessed face.
2022-11-23 22:51:16 +00:00
Behdad Esfahbod
404cb99d86
[buffer-diff] Fix check for glyph flag equality
...
I'm not sure if the old behavior was intentional, but it was checking
that the glyph flags were a subset of the reference buffer's glyph
flags. I don't see why that is useful. Fix that.
Then make the buffer-verify code ignore flag differences when verifying
buffers, since our unsafe-to-concat flag at least, is conservative and
not guaranteed to be produced the same in fragments. See:
https://github.com/harfbuzz/harfbuzz/issues/3888
2022-11-23 15:37:03 -07:00
Garret Rieger
4c49daf7cd
[subset] actually use the preprocessed face in hb-subset.
...
Tests weren't actually using the preprocessed face due to this typo in util/hb-subset.
2022-11-23 22:33:57 +00:00
Garret Rieger
2c0afde737
[subset] add an inprogress accelerator to plan.
...
This allows subset code to cache information into the accelerator during preprocess subset. Previously the accelerator was created at the end of subsetting.
2022-11-23 13:41:52 -07:00
Garret Rieger
81640fdffe
[subset] fix leaked font in glyf::subset(...)
2022-11-23 13:41:52 -07:00
Behdad Esfahbod
dcce53ddcb
[cff] Micro-optimize fetch_op
2022-11-23 13:20:48 -07:00
Behdad Esfahbod
0bf7d9eb4d
[subset-cff] Micro-optimize encode_byte
2022-11-23 13:20:48 -07:00
Behdad Esfahbod
a23f820427
[subset-cff] Micro-optimize array access
2022-11-23 13:20:48 -07:00
Behdad Esfahbod
1e8f1ac677
[subset-glyf] Micro-optimize array access
2022-11-23 13:20:48 -07:00
Behdad Esfahbod
356d135ed6
[subset-glyf] Reduce roundf calls
...
Saves 7% on MPLUS1-Variable/6000 benchmark.
2022-11-23 13:20:48 -07:00
Garret Rieger
463ae07e99
[subset] In the preprocess subset call always use long loca.
...
Long loca is needed so that we can store the trimmed glyph bytes to allow us to safely skip trimming in the later subset.
2022-11-23 12:52:55 -07:00
Behdad Esfahbod
299ec902eb
[glyf] Move instanciation to serialize()
2022-11-22 16:03:02 -07:00
Behdad Esfahbod
d8d881f22d
[subset-glyf] Don't create a second glyf accelerator
2022-11-22 15:24:16 -07:00
Behdad Esfahbod
7560930070
[glyf] Add _create_font_for_instancing
2022-11-22 15:22:25 -07:00
Behdad Esfahbod
40634ceeb0
[glyf] Adjust data types
2022-11-22 15:07:16 -07:00
Behdad Esfahbod
ba0d28ea36
[glyf] Fix font error check
2022-11-22 15:01:48 -07:00
Behdad Esfahbod
04c525019c
[glyf] Use a malloc instead of calloc
2022-11-22 14:54:55 -07:00
Behdad Esfahbod
024aa81805
[glyf] Micro-optimize encode_coord
2022-11-22 14:51:42 -07:00
Behdad Esfahbod
b6694597f9
[glyf] Micro-optimize encode_flag()
2022-11-22 14:49:01 -07:00
Behdad Esfahbod
d47cfe7936
[glyf] Minor use operator ++
2022-11-22 14:45:04 -07:00
Behdad Esfahbod
03e6bde790
[glyf] Minor adjustment to lastflag handling
...
No logic change.
2022-11-22 14:40:50 -07:00
Behdad Esfahbod
0ca9fda889
[glyf] Remove misplaced comment
2022-11-22 14:39:10 -07:00
Behdad Esfahbod
44be8ef4ce
[gvar] Skip degenerate all-untouched delta-sets
2022-11-22 14:21:25 -07:00
Behdad Esfahbod
656bb223f1
[gvar] Micro-optimize unpack_points
2022-11-22 14:16:40 -07:00
Behdad Esfahbod
a383027262
[gvar] Cosmetic
2022-11-22 14:15:17 -07:00
Behdad Esfahbod
be89919a70
[gvar] is_valid() remove a check
...
I don't know why this check was there, but it doesn't make sense
because that function never returns 0 / false.
2022-11-22 13:56:20 -07:00
Behdad Esfahbod
e8ddf107d0
[gvar] Optimize a loop
2022-11-22 13:29:32 -07:00
Behdad Esfahbod
dd6fcec92c
[gvar] Remove a conditional
2022-11-22 13:27:40 -07:00
Behdad Esfahbod
a02317238a
[gvar] Refactor deltas array access
2022-11-22 13:24:39 -07:00
Behdad Esfahbod
c34c77698c
[gvar] Don't try IUP if all points are specified
2022-11-22 13:21:01 -07:00
Behdad Esfahbod
27c4037e59
[gvar] Micro-optimize boundary-checking
2022-11-22 13:12:22 -07:00
Behdad Esfahbod
ab8346fb6f
[gvar] Add an unlikely
2022-11-22 13:07:39 -07:00
Behdad Esfahbod
1e8a342ea2
[gvar] Micro-optimize int types
2022-11-22 13:04:32 -07:00
Behdad Esfahbod
4afcdf675b
More hb_memcpy
2022-11-22 12:56:48 -07:00
Behdad Esfahbod
58a696d80e
More hb_memset
2022-11-22 12:56:05 -07:00
Behdad Esfahbod
59c45f6deb
Use hb_memcpy instead of memcpy consistently
2022-11-22 12:54:50 -07:00
Behdad Esfahbod
ac0efaf818
Use hb_memset instead of memset consistently
2022-11-22 12:50:36 -07:00
Behdad Esfahbod
44a892a233
[shape] Use hb_memcmp instead of memcmp
2022-11-22 12:48:52 -07:00
Behdad Esfahbod
c53c648127
[subset-cff] Another handrolled memcpy
2022-11-22 12:46:25 -07:00
Behdad Esfahbod
ae578705c2
[array] Write hash as range for loop again
...
Now that our range loop is faster than our own iter.
2022-11-22 12:23:17 -07:00
Behdad Esfahbod
13e1ca9eb5
[cff] Micro-optimize memcpy
2022-11-22 12:19:28 -07:00
Behdad Esfahbod
2968dd7844
[gvar] Optimize as_array() access
2022-11-22 11:57:29 -07:00
Behdad Esfahbod
bb3bb76450
[gvar] Optimize scalar = 1.0 case
2022-11-22 11:53:35 -07:00
Behdad Esfahbod
2d098d5d7f
[gvar] Use memset
2022-11-22 11:51:04 -07:00
Behdad Esfahbod
e630a65e60
[gvar] Micro-optize vector extend
2022-11-22 11:29:13 -07:00
Behdad Esfahbod
49d4f62135
[gvar] Micro-optimize
2022-11-22 11:14:56 -07:00
Behdad Esfahbod
1758ee6646
[glyf] Minor write loop more idiomatically
2022-11-22 10:55:16 -07:00
Behdad Esfahbod
16ec9dcc1b
[gvar] Whitespace
2022-11-22 10:55:16 -07:00
Behdad Esfahbod
b567ce51d3
[subset] Don't trim glyf's again if preprocessed
...
Speeds up M1/10000 benchmark by 30%!
2022-11-22 10:55:08 -07:00
Behdad Esfahbod
72059a4789
[gvar] Optimize IUP alg
2022-11-22 10:41:37 -07:00
Behdad Esfahbod
ee9873b5ed
[gvar] Disable initializing vectors when not necessary
2022-11-22 10:23:17 -07:00
Behdad Esfahbod
b0d2641186
[vector] Add "initialize" argument to resize()
2022-11-22 10:20:11 -07:00
Behdad Esfahbod
a2059f8f55
[gvar] Optimize unpack_points
2022-11-22 10:16:21 -07:00
Behdad Esfahbod
6d7206b68b
[gvar] Optimize unpack_deltas
2022-11-22 10:13:14 -07:00
Behdad Esfahbod
bca569ae53
[array] Speed up hash() for byte arrays
2022-11-21 23:19:42 -07:00
Behdad Esfahbod
d7b492e3f5
Revert "[array] Remove hash specializations for bytes"
...
This reverts commit 213117317c
.
2022-11-21 23:08:51 -07:00
Behdad Esfahbod
1572ba281a
[subset-cff] Return in subr closure if already seen subr
...
Not sure why this was not done before.
2022-11-21 22:26:44 -07:00
Behdad Esfahbod
a29ca6efbc
[subset-cff] Comment
2022-11-21 22:02:17 -07:00
Behdad Esfahbod
28e767ddea
[subset-cff] Really optimize op_str_t / parsed_cs_op_t layout
...
Now parsed_cs_op_t and op_str_t are both 16 bytes.
Saves another 7% in SourceHanSans/10000 benchmark.
2022-11-21 21:59:51 -07:00
Behdad Esfahbod
2d5ee23731
[subset-cff] Readjust parsed_cs_op_t
...
Now it doesn't matter anymore since op_str_t is adjusted and
is 16 bytes with 8byte alignment.
2022-11-21 21:55:21 -07:00
Behdad Esfahbod
4f056b923a
[subset-cff] Optimize op_str_t layout
2022-11-21 21:37:57 -07:00
Behdad Esfahbod
a750cb0128
Simplify rvalue creation
2022-11-21 21:03:32 -07:00
Behdad Esfahbod
86a763c651
[map] Make keys moveable
2022-11-21 20:53:44 -07:00
Behdad Esfahbod
cf20d2ec5d
[map] Take const key
2022-11-21 20:47:17 -07:00
Behdad Esfahbod
3d1c76f713
[serializer] Don't hash objects twice
2022-11-21 19:40:32 -07:00
Behdad Esfahbod
35878df215
[algs] Implement swap() for pair_t
...
Helps priority_queue::pop_minimum and friends, which help subsetter
repacker. Shows a few percentage improvement on NotoNastaliq benchmark.
2022-11-21 19:14:03 -07:00
Behdad Esfahbod
a2984a2932
[cff] Remove unnecessary namespacing
2022-11-21 18:40:52 -07:00
Behdad Esfahbod
dc3bb5e0ed
[subset-cff] Pre-allocate values array for subroutines as well
2022-11-21 18:18:48 -07:00
Behdad Esfahbod
c6279224db
[cff] Adjust pre-allocation
...
This better matches actual usage, given that ops are one or two
bytes, and vector also allocates 50% extra.
2022-11-21 18:01:50 -07:00
Behdad Esfahbod
bab8ec58b0
[subset-cff] Disable sharing when packing charstring INDEXes
...
Saves another 8%ish.
2022-11-21 17:46:32 -07:00
Behdad Esfahbod
2cadacad6c
[cff] Simplify str_encoder_t error handling
2022-11-21 17:17:15 -07:00
Behdad Esfahbod
f263e3fe2e
[cff] Manually copy short strings instead of memcpy()
2022-11-21 17:04:55 -07:00
Behdad Esfahbod
38efd1862f
[cff] Add a likely()
2022-11-21 17:02:11 -07:00
Behdad Esfahbod
191025cc96
[cff] Adjust buffer pre-allocation
...
Most ops take one or two bytes, so allocate count*2, not count*3.
Shows minor speedup in subsetting benchmark (around 2%).
2022-11-21 16:58:19 -07:00
Behdad Esfahbod
4b2caafea2
[subset-cff] Optimize parsed_cs_op_t size
...
Shows 5% speedup on SourceHanSans-Regular/10000 benchmark.
2022-11-21 16:46:20 -07:00
Behdad Esfahbod
e0b06bd1b1
[subset] Cache has_seac in accelerator
...
Speeds up SourceHanSans-Regular/10000 benchmark by %25.
2022-11-21 16:30:34 -07:00
Garret Rieger
dd1ba328a8
[repacker] fix fuzzer timeout.
...
For https://oss-fuzz.com/testcase-detail/5845846876356608 . Only process the set of unique overflows.
2022-11-21 16:24:48 -07:00
Behdad Esfahbod
59451502e9
[cff] Optimize env error checking
2022-11-21 15:23:16 -07:00
Behdad Esfahbod
b238578a9c
[cff] Optimize INDEX operator[]
2022-11-21 14:36:57 -07:00
Behdad Esfahbod
d9de515a38
[cff] Optimize byte_str_ref_t array access
2022-11-21 14:23:07 -07:00
Behdad Esfahbod
a81ec9b2b6
[cff] Optimize byte_str_ref_t inc()
...
Shows a couple percent speedup.
2022-11-21 14:03:28 -07:00
Behdad Esfahbod
3ff75411bd
[algs] Fix bot fail
2022-11-21 13:08:55 -07:00
Behdad Esfahbod
b81e3989f8
Try fixing arm-eabi build after a10cfe3f32
2022-11-21 13:02:40 -07:00
Behdad Esfahbod
4c14043b06
[algs] Add output argument to hb_unsigned_mul_overflows()
2022-11-21 12:56:33 -07:00
Behdad Esfahbod
25adbb3825
[algs] Use __builtin_mul_overflow
...
Compiles to smaller binary.
2022-11-21 12:47:53 -07:00
Behdad Esfahbod
a10cfe3f32
[algs] Write hb_in_ranges() recursively
2022-11-21 12:37:59 -07:00
Behdad Esfahbod
2e86700e30
[gvar] Add memory-barrier as in ArrayOf
2022-11-21 12:28:10 -07:00
Behdad Esfahbod
b00a911fa7
[sorted-array] Add faster iterator implementation here as well
2022-11-21 12:11:30 -07:00
Behdad Esfahbod
7cc79a8a86
[vector] Adjust comment
2022-11-21 12:09:24 -07:00
Behdad Esfahbod
e82a3c69dd
[array/vector] Optimize range-based for-loop
...
Avoid bounds-checking.
2022-11-21 12:00:10 -07:00
Behdad Esfahbod
0387182c2a
[ot-map] Minor refactor features[i] access
2022-11-21 11:05:47 -07:00
Behdad Esfahbod
5ee6d5d77e
[cff] Add memory-barrier to INDEX
...
Like we do for ArrayOf.
2022-11-21 11:00:29 -07:00
Behdad Esfahbod
6905d36d73
[cff] Fix fetch_op() bounds-checking
2022-11-21 10:51:33 -07:00
Behdad Esfahbod
b51ab1a9e5
[cff] Optimize byte_str_ref_t
...
Make it 16 bytes instead of 24. This struct is used in the subroutine
call stack heavily.
This change makes the HB AdobeVFPrototype benchmark to become faster
than FT one, with about 6% speedup as a result of this change.
2022-11-21 10:27:07 -07:00
Behdad Esfahbod
7a39464b18
[cff] Hide members of byte_str_ref_t
2022-11-21 09:48:54 -07:00
Behdad Esfahbod
18141f0007
[cff] Move a sub_array call
...
No logic change.... I hope?!
2022-11-21 09:47:03 -07:00
Behdad Esfahbod
f66415cdd1
[cff] Move initialization of a type to constructor
2022-11-21 09:40:16 -07:00
Behdad Esfahbod
70a5cd53f6
[algs] Assert trivial copy assignable in stable_sort
2022-11-21 08:52:33 -07:00
Behdad Esfahbod
9bb39423f5
[algs] Simplify stable_sort signatures
2022-11-20 17:40:54 -07:00
Behdad Esfahbod
d119568df6
[cbdt] Use vector tail()
2022-11-20 14:11:51 -07:00
Behdad Esfahbod
87a88117c8
[object] Use vector tail()
2022-11-20 14:10:39 -07:00
Behdad Esfahbod
76ce390b5a
[ucd] Document algorithms
2022-11-20 13:54:56 -07:00
Behdad Esfahbod
ed43bc5118
[buffer] Move delete_glyphs_inplace() here
2022-11-20 13:10:19 -07:00
Behdad Esfahbod
dd88dae8a9
[unicode] Simplify set_funcs a bit more
2022-11-19 15:23:53 -07:00
Behdad Esfahbod
2d8ff3bcbe
[unicode] Destroy user_data in set_funcs fail paths
...
This is what the font_funcs / draw_funcs do.
2022-11-19 15:23:44 -07:00
Behdad Esfahbod
527823ccac
[unicode] Destroy user_data in set_funcs fail paths
...
This is what the font_funcs / draw_funcs do.
2022-11-19 15:19:08 -07:00
Behdad Esfahbod
56d6b6992b
[font/draw] Remove unneeded branch
...
The preamble sets user_data/destroy to nullptr if func is nullptr.
2022-11-19 15:11:59 -07:00
Behdad Esfahbod
976bb26cc1
[draw] Optimize set_func functions
2022-11-19 15:06:23 -07:00
Behdad Esfahbod
114167a933
[font] Optimize set_func functions
2022-11-19 14:47:45 -07:00
Behdad Esfahbod
f9d7b303ed
[thai] Use smaller type for arrays
...
No logic change.
2022-11-19 14:20:36 -07:00
Behdad Esfahbod
72c4e431af
[use-table] Add a OPTIMIZE_SIZE version
2022-11-19 13:40:33 -07:00
Behdad Esfahbod
83c3a91dc6
[gen-use-table] Report fullCost
2022-11-19 13:34:58 -07:00
Behdad Esfahbod
ba08de624e
[ucd] Change OPTIMIZE_SIZE to compression level 9
...
Also changes default compression level from 3 to 5, but that shows
no change in the generated table size.
2022-11-19 13:25:19 -07:00
Behdad Esfahbod
b68f9f3cfe
[machinery] Adjust comment
2022-11-18 21:36:01 -07:00
Behdad Esfahbod
a47ba1dc0e
[lazy-pointer] Hide instance
2022-11-18 21:14:07 -07:00
Behdad Esfahbod
281b4705b4
[pool] Rewrite a loop as dagger
2022-11-18 20:25:05 -07:00
Behdad Esfahbod
3ff8abf272
Revert "[map] Allow std::move-ing keys into the map"
...
This reverts commit f657ef7e57
.
This breaks many compilers with messages like this:
hb-subset-plan.hh:226: undefined reference to `OT::head::tableTag'
I'm out of my depth re how to fix it.
2022-11-18 19:38:12 -07:00
Behdad Esfahbod
039e476bac
[test-vector] Test sink-move'ing
2022-11-18 19:26:02 -07:00
Behdad Esfahbod
a3a218edb5
[map] Add a couple more sink interfaces
2022-11-18 19:24:41 -07:00
Behdad Esfahbod
90226eab89
[test-map] Test inserting shared_ptr key
2022-11-18 19:21:58 -07:00
Behdad Esfahbod
f657ef7e57
[map] Allow std::move-ing keys into the map
2022-11-18 19:17:03 -07:00
Behdad Esfahbod
a1768ad829
[map] Fix use of !=
2022-11-18 19:08:34 -07:00
Behdad Esfahbod
e74b372b59
[test-map] Test moving values
2022-11-18 18:43:31 -07:00
Behdad Esfahbod
a9c6a20b19
[map] Support moving value in sink interface
2022-11-18 18:29:12 -07:00
Behdad Esfahbod
1bf9afaad0
[test-vector] Test sink interface
2022-11-18 18:20:50 -07:00
Behdad Esfahbod
fa0e4b041d
[test-map] Test sink interface
2022-11-18 18:20:14 -07:00
Behdad Esfahbod
1c612a8541
[test-set] Test sinking range
2022-11-18 18:19:31 -07:00
Behdad Esfahbod
356708e34a
[test-set] Test length of iterator
2022-11-18 18:17:34 -07:00
Behdad Esfahbod
2892fc71e8
[vector] Add std::move to pop()
...
This was removed in 76fc27713f
,
but I believe that was faultly. It was because of a bad move
implementation in the set.
2022-11-18 18:03:59 -07:00
Behdad Esfahbod
921f45f46d
[array] Rewrite hash() as dagger
2022-11-18 17:26:58 -07:00
Behdad Esfahbod
213117317c
[array] Remove hash specializations for bytes
...
Not needed.
2022-11-18 17:24:44 -07:00
Behdad Esfahbod
bef5a1c8dc
[vector] Comment
2022-11-18 17:22:17 -07:00
Behdad Esfahbod
69b41f92ec
[vector] Simplify shift_down_vector()
...
Compiler is smarter than I am.
2022-11-18 17:04:34 -07:00
Behdad Esfahbod
1dd9396c7a
[vector] Optimize grow_vector() for size
...
Again, compiler is smarter than I am.
2022-11-18 17:01:14 -07:00
Behdad Esfahbod
d36f688131
[vector] Optimize shrink_vector for size
...
Compiler is smarter than I am.
2022-11-18 17:00:07 -07:00
Behdad Esfahbod
bc8eded296
[vector] Remove a for loop
2022-11-18 16:51:24 -07:00
Behdad Esfahbod
afd9a58bd7
[vector] Save a couple hb_iter() invocations
2022-11-18 16:47:32 -07:00
Behdad Esfahbod
3ead9863d2
[map] Add size()
2022-11-18 16:43:47 -07:00
Behdad Esfahbod
42db8be189
[map] Minor remove if condition
2022-11-18 16:41:50 -07:00
Behdad Esfahbod
4ec706980c
[map] Rewrite hash() as dagger
...
Somehow our daggers instead of for loop save size. I cannot
pinpoint why, other than maybe not inlining.
2022-11-18 16:39:30 -07:00
Behdad Esfahbod
025a68cb07
[map] Optimize copy resizing logic
2022-11-18 16:33:04 -07:00
Behdad Esfahbod
f1d716871d
[map] Change bucket_for_hash() to item_for_hash()
2022-11-18 16:31:27 -07:00
Behdad Esfahbod
d012f9a9b3
[map] Change bucket_for() to item_for()
2022-11-18 16:29:06 -07:00
Behdad Esfahbod
68a29020c5
[bit-page] Write hash() as dagger
2022-11-18 16:02:45 -07:00
Behdad Esfahbod
87271e1b2e
[bit-page] Write get_population as dagger
2022-11-18 16:01:23 -07:00
Behdad Esfahbod
744eb6baf9
[bit-page] Write is_empty() as dagger
2022-11-18 15:56:06 -07:00
Behdad Esfahbod
43a4028f0e
[algs] Move hb_vector_size_t to bit-page as only user
2022-11-18 15:54:34 -07:00
Behdad Esfahbod
01f961ac3a
[gsubgpos] Minor call hb_iter() instead of ->iter() directly
2022-11-18 15:47:17 -07:00
Behdad Esfahbod
bba5765583
[gsubgpos] Remove a few unnecessary namespace invocations
2022-11-18 14:52:17 -07:00
Behdad Esfahbod
b4d0d1608d
[gsubgpos] Rewrite a couple apply() functions as daggers
2022-11-18 14:47:33 -07:00
Behdad Esfahbod
76c8214eb5
[gsubgpos] Move member around
2022-11-18 12:30:46 -07:00
Behdad Esfahbod
81a573008e
[map] Optimize storage
2022-11-17 16:59:36 -07:00
Behdad Esfahbod
ae080bf202
[map] Initialize key and value explicitly
...
If they are of int time they won't be initialized otherwise.
2022-11-17 16:34:58 -07:00
Behdad Esfahbod
1d41b9cb3c
[user-data] std::move item
2022-11-17 16:26:48 -07:00
Behdad Esfahbod
ff0bb74895
[map] Call item_t constructor/destructor directly
2022-11-17 16:17:37 -07:00
Behdad Esfahbod
5c88715949
[map] Add item_t.destruct()
2022-11-17 16:14:16 -07:00
Behdad Esfahbod
7f83040836
[map] Simplify (de)construction of item_t
2022-11-17 16:10:37 -07:00
Behdad Esfahbod
99103bd976
[map] Destruct objects when clearing
2022-11-17 15:57:06 -07:00
Behdad Esfahbod
4caad5720c
[test-map] Add test for reset
...
I expect this to leak now, since we don't destruct items.
2022-11-17 15:51:39 -07:00
Behdad Esfahbod
e93c01c3ae
[map] Rename item clear() to construct()
2022-11-17 15:50:00 -07:00
Behdad Esfahbod
fc22d706fe
[test-map] Don't insert null smart-pointers in map
...
Dereferencing them is not supported anymore after
3aad7c2ddf
We don't support that for regular pointers, so don't supporting
them for smart-pointers sounds right to me.
2022-11-17 15:47:43 -07:00
Behdad Esfahbod
896377463f
[map] Don't resize map if not necessary
2022-11-17 15:25:45 -07:00
Behdad Esfahbod
7595fa2d9a
[map] Fix copy-assignment operator
...
Ouch!
2022-11-17 15:23:14 -07:00
Behdad Esfahbod
41f4bdac35
[map] Fix resize during copy-construction/assignment
2022-11-17 15:16:00 -07:00
Behdad Esfahbod
3aad7c2ddf
[algs] Remove smart-pointers from hb_hash()
...
hb_deref() handles them. I think this code predated that.
2022-11-17 15:10:47 -07:00
Behdad Esfahbod
7bd101728a
[map] Minor use hb_iter instead of hb_array
2022-11-17 15:01:55 -07:00
Behdad Esfahbod
238fc14716
[map] Simplify iterators
2022-11-17 14:58:50 -07:00
Behdad Esfahbod
410c14bfa2
[map] Fix equality
...
Ouch!
2022-11-17 14:53:00 -07:00
Behdad Esfahbod
6dfd4a16e7
[ot-font] Remove stale TODO
2022-11-16 22:44:22 -07:00
Behdad Esfahbod
a0bde1e1ea
[open-type] Remove (Sorted)ArrayOf.sub_array()
2022-11-16 21:27:12 -07:00
Behdad Esfahbod
f2b5db700f
[vector] Remove .sub_array ()
2022-11-16 21:22:57 -07:00
Behdad Esfahbod
c7d57dcf26
[vector/array] Simplify qsort()
2022-11-16 21:21:31 -07:00
Behdad Esfahbod
1610008e62
[gsubgpos] Minor remove call to hb_iter
2022-11-16 20:02:36 -07:00
Behdad Esfahbod
19ec01d25c
[gsubgpos] Sprinkle const around
2022-11-16 19:14:42 -07:00
Behdad Esfahbod
561946c7d5
[layout] Comment
2022-11-16 17:59:29 -07:00
Behdad Esfahbod
2268207c19
[layout] Update comment
2022-11-16 17:51:22 -07:00
Behdad Esfahbod
658f8f4391
[layout] Comment
2022-11-16 17:50:35 -07:00
Behdad Esfahbod
27a8fe7d58
[layout] Only update buffer digest if buffer changed by a pause
2022-11-16 17:49:44 -07:00
Behdad Esfahbod
8b2a211123
[layout] Keep digest updated in the context
...
Don't recompute digest after every (applied) GSUB lookup.
2022-11-16 16:57:44 -07:00
Behdad Esfahbod
a5964a2d2a
[layout] Minor simplify
2022-11-16 16:45:23 -07:00
Behdad Esfahbod
80b8758881
[layout] Add a buffer message for digest-skipped lookups
2022-11-16 16:26:41 -07:00
Behdad Esfahbod
afa71ee8ef
Fix alignment error
2022-11-16 16:22:45 -07:00
Behdad Esfahbod
dff1b809a0
[buffer] Add .digest() and use
2022-11-16 16:19:05 -07:00
Behdad Esfahbod
654a2eafc8
[layout] Use buffer-digest for GSUB as well
...
Combined with previous commit, this shows up to 12% speed up with
Roboto and the en-words (ie. short strings) benchmark, about 5%
for longer English tests, and no adverse effect on heavier fonts.
2022-11-16 16:13:52 -07:00
Behdad Esfahbod
15b6c32599
[layout] Use a buffer digest for GPOS to skip whole lookups
2022-11-16 16:11:36 -07:00
Behdad Esfahbod
a053b84cb9
[gsubgpos] Optimize set-digest initialization
...
Previously we were once collecting set-digest for each subtable,
and another time for each lookup.
Now we compute the one for each lookup simply from the ones for
its subtables.
2022-11-16 14:39:25 -07:00
Behdad Esfahbod
20654cd889
[set-digest] Minor no logic change
2022-11-16 14:29:10 -07:00
Behdad Esfahbod
95b9763dbc
[set-digest] Minor simplify
2022-11-16 14:15:01 -07:00
Behdad Esfahbod
9855b678f2
[cache] Minor rewrite assertion
2022-11-16 13:37:34 -07:00
Behdad Esfahbod
a10ff20562
[ft] Comment
2022-11-16 13:34:37 -07:00
Behdad Esfahbod
557be9502a
[test-vector] Fix test
2022-11-16 12:47:05 -07:00
Behdad Esfahbod
9027d15410
[test-iter] Fix leak
2022-11-16 12:39:30 -07:00
Behdad Esfahbod
afd716d4cd
[serialize] Don't free object-pool in reset()
2022-11-16 12:28:56 -07:00
Behdad Esfahbod
02949cf64f
[priority-queue] More assert adjustment
2022-11-16 12:06:44 -07:00
Behdad Esfahbod
620ddd762d
[priority-queue] Fix asserts
2022-11-16 12:04:35 -07:00
Behdad Esfahbod
57de568aad
[indic-table] Minor adjust empty lines
2022-11-16 11:50:40 -07:00
Behdad Esfahbod
281a2602cc
Update generated file
2022-11-16 11:36:33 -07:00
Behdad Esfahbod
f734c26c5c
[test-vector] Test inserting set and map
2022-11-15 16:27:56 -07:00
Behdad Esfahbod
0a97d27c2b
[test-iter] Add another test
2022-11-15 16:23:48 -07:00
Behdad Esfahbod
e9e985682a
[fallback-shape] Remove TODO
2022-11-15 16:11:57 -07:00
Behdad Esfahbod
6df8498da2
[sample.py] Fix warning
2022-11-15 15:52:04 -07:00
Behdad Esfahbod
49fe5c1e5a
[glib] Remove old cruft from pre-2011
2022-11-15 15:37:23 -07:00
Behdad Esfahbod
1bd1a37837
[test] Minor
2022-11-15 15:18:36 -07:00
Behdad Esfahbod
35aa492eb7
[main] sprintf -> snprintf
2022-11-15 15:05:15 -07:00
Behdad Esfahbod
72c6962012
[buffer-deserialize-text] Fix glyph name for glyph flags
...
Skip "#" in glyph names.
2022-11-14 21:34:16 -07:00
Behdad Esfahbod
dee26de76f
[test-buffer-serialize] Allow no font
2022-11-14 16:24:25 -07:00
Behdad Esfahbod
f6076890c5
Hide all mentions of name_table_overrides behind EXPERIMENTAL_API
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3872
2022-11-14 16:06:39 -07:00
Behdad Esfahbod
ebc382a847
Revert "Avoid use values () in hb-hashmap if value_t has an overriden operator &"
...
This reverts commit b92e4cc009
.
2022-11-14 15:59:46 -07:00
Behdad Esfahbod
ff0d0d020e
[meta] Use std::decay
2022-11-14 14:48:07 -07:00
Behdad Esfahbod
24cf86b009
[array] Fix MSVC fail
2022-11-14 13:58:43 -07:00
Behdad Esfahbod
a87843be3d
[array] Another try at sizeof sorted_array
2022-11-14 13:43:58 -07:00
Behdad Esfahbod
72ba0b2aa2
[array] Fix MSVC fail
2022-11-14 13:41:15 -07:00
Qunxin Liu
b92e4cc009
Avoid use values () in hb-hashmap if value_t has an overriden operator &
2022-11-14 13:19:55 -07:00
Behdad Esfahbod
ea63e95e4c
[GPOS.PairPos] Adjust unsafe-to-break for non-zero ValueFormat2
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3824
2022-11-14 12:36:48 -07:00
Behdad Esfahbod
85e0be1357
[vector/array] Add simple test for sorted size
2022-11-13 17:28:09 -07:00
Behdad Esfahbod
4e618557a6
[vector] Don't subclass sorted vector from unsorted
...
Was doubling the size unnecessarily.
2022-11-13 17:23:25 -07:00
Behdad Esfahbod
630f09c8b6
Another hb_memcpy instead of strncpy use
2022-11-09 11:32:30 -07:00
Behdad Esfahbod
cd011ceadf
Use hb_memcpy instead of strncpy
...
Nul-termination is not intended.
2022-11-09 11:30:44 -07:00
Behdad Esfahbod
c158b626c3
[name] Simplify buffer-length calculation
2022-11-08 15:05:31 -07:00
Behdad Esfahbod
55edf59d52
[name] Typo
2022-11-08 14:53:27 -07:00
Behdad Esfahbod
27c8bbcb04
Revert "[name] Simplify buffer-length calculation"
...
This reverts commit d70595657e
.
2022-11-08 14:48:38 -07:00
Behdad Esfahbod
d70595657e
[name] Simplify buffer-length calculation
2022-11-08 14:15:56 -07:00
Qunxin Liu
6314aa7da4
[subset] add an experimental API that can override name strings for specified name_id
2022-11-08 14:10:25 -07:00
Behdad Esfahbod
f53ef69d59
[indic] Order left-matras inside-out
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3863
2022-11-05 15:40:05 -06:00
Qunxin Liu
dbb7f47b19
fix bug in hb_hashmap_t has() interface
...
It was not working when the value type is hb_bytes_t because hb_array_t
overloaded operator &
2022-11-03 13:48:23 -06:00
Behdad Esfahbod
d1f445ec1e
[name] Typo
2022-11-02 12:24:04 -06:00
Behdad Esfahbod
fc935fb81b
Fix snprintf use
...
https://github.com/harfbuzz/harfbuzz/pull/3495#issuecomment-1299107964
2022-11-01 14:40:47 -06:00
Lorenz Wildberg
2ee42bbac2
hb_variation_to_string: Fix GIR annotation
2022-11-01 11:21:25 -06:00
Behdad Esfahbod
02b76393ef
[config] Re-enable BORING_EXPANSION
...
Only the non-experimental parts (currently avar2) are
enabled by default.
2022-10-29 11:19:04 -06:00
Behdad Esfahbod
6a47ef34b1
[config] If not HB_EXPERIMENTAL, then HB_NO_BEYOND_64K
2022-10-29 11:14:27 -06:00
Behdad Esfahbod
a0f999cd95
[config] Rename HB_NO_VARIATIONS2 to HB_NO_AVAR2
2022-10-29 11:13:40 -06:00
Behdad Esfahbod
60c6b7786d
Disable -Wcast-function-type-strict
...
https://github.com/harfbuzz/harfbuzz/pull/3859#issuecomment-1295409126
2022-10-28 14:19:39 -06:00
Martin Storsjö
d88269c827
freetype: Fix function signatures to match without casts
...
Clang 16 has got a new stricter warning for casts of function types
(see 1aad641c79
).
This new warning gets included as part of the existing error
diagnostic setting of -Wcast-function-type.
This fixes errors like these:
../src/hb-ft.cc:1011:34: error: cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to 'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-10-28 13:49:41 -06:00
Qunxin Liu
8a5524833c
[instance] update OS2/.usWeightClass and .usWidthClass when
...
no-prune-unicode-ranges option is enabled
2022-10-27 11:59:31 -06:00
خالد حسني (Khaled Hosny)
fddeba26e4
Merge pull request #3857 from 2xsaiko/outgoing/cmake-abs-path
...
Pass through absolute paths to cmake config directly
2022-10-26 22:34:02 +02:00
Marco Rebhan
db292f6f02
Pass through absolute paths to cmake config directly
...
The previous code concatenates includedir to _harfbuzz_prefix verbatim,
which results in a wrong final include path in case includedir is an absolute
path. Instead, we can let meson determine the absolute include and lib paths
in advance and save them in the cmake config.
This is an issue in nixpkgs, where includedir is set to the final (absolute)
path of the built library in the Nix store, which causes CMake projects
depending on harfbuzz to not configure.
See https://github.com/NixOS/nixpkgs/issues/180054 .
2022-10-26 22:13:44 +02:00
Behdad Esfahbod
477d71724c
[glyf] Limit points in a glyf to 10000 roughly
...
Only enforced when components are being expanded.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3838
2022-10-26 13:11:47 -06:00
Behdad Esfahbod
9aad3dba8f
[SingleSubst] Fix degenerate-lookup test
...
Part of https://github.com/harfbuzz/harfbuzz/issues/3853
2022-10-26 13:04:02 -06:00
Garret Rieger
83769b9cb1
[subset] add comment for why we retain empty lookups.
2022-10-21 18:29:23 -06:00
Garret Rieger
70e2de2bd4
[subset] Always output Lookup's even if they are empty.
...
The rest of layout subsetting depends on lookup indices being consistent with those computed during planning. So if an empty lookup is discarded during the subset phase it will invalidate all subsequent lookup indices. Generally we shouldn't end up with an empty lookup as we pre-prune them during the planning phase, but it can happen in rare cases such as when a subtable is considered degenerate (eg. #3853 )
2022-10-21 18:29:23 -06:00
Joel Auterson
c813f84235
Make build work for arm-none-eabi
2022-10-21 11:09:35 -06:00
Behdad Esfahbod
b0b7a65388
[subset] Fix check-symbols failure
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3850
2022-10-20 17:13:26 -06:00
Khaled Hosny
970321db7b
5.3.1
2022-10-19 22:06:46 +02:00
Behdad Esfahbod
a73137d101
[face] Fix annotation
2022-10-17 12:18:24 -06:00
Behdad Esfahbod
d65af60213
[shape] Adjust Grapheme clusters for Katakana voiced sound marks
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3844
2022-10-15 14:26:02 -06:00
Behdad Esfahbod
bda42fc34a
Merge pull request #3842 from harfbuzz/patch_mode
...
[subset] Begin implementing a subset accelerator
2022-10-14 15:08:22 -06:00
Garret Rieger
f53ebf5584
[subset] Add hb_subset_preprocess to experimental symbol list for check-symbols.
2022-10-14 19:38:19 +00:00
Garret Rieger
fdb98ed88e
[subset] add missing HB_EXTERN.
2022-10-14 18:30:39 +00:00
Garret Rieger
515863e57c
[subset] Remove add accelerator flag, replace with new api method.
...
Adds hb_subset_preprocess() which preprocesses the face and attaches accelerator data.
2022-10-13 23:42:00 +00:00
Garret Rieger
573640c99f
[subset] Add hb-subset-accelerator.hh to Make soure list.
2022-10-13 23:21:35 +00:00
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
Garret Rieger
f43055f35a
[repacker] Implement PairPosFormat2::shrink.
2022-08-02 22:16:29 +00:00
Khaled Hosny
16bfe6536b
[meson] use cpp.get_argument_syntax not cpp.get_id
...
To account for both MSVC and clang-cl.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3756
2022-08-03 00:07:40 +02:00
Garret Rieger
9f2a44640c
[repack] implement device table transfer for PairPosFormat2.
2022-08-02 21:47:53 +00:00
Garret Rieger
22eae32b3b
[repacker] add classDef1 clone_range to PairPosFormat2 split.
2022-08-02 21:04:38 +00:00
Garret Rieger
68b90153ea
[repacker] Add class def sanitize and range cloning.
2022-08-02 20:58:35 +00:00
Garret Rieger
ca0df565f7
[repacker] extract coverage cloning into helper.
2022-08-02 20:04:46 +00:00
Behdad Esfahbod
ee18ae3b76
[avar] Minor move code around
2022-08-02 12:56:06 -06:00
Garret Rieger
7f4b2037a5
[repacker] include size of device tables when determining PairPos2 split points.
2022-08-02 18:43:25 +00:00
Behdad Esfahbod
826639fab2
[src] Add test-use-table
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3758
2022-08-02 12:18:18 -06:00
Garret Rieger
58fdbd8e5d
[repacker] begin adding PairPosFormat2 splitting support.
2022-08-02 17:32:13 +00:00
Behdad Esfahbod
e387b3acd3
[ft] Try harder
2022-08-02 10:02:48 -06:00
Khaled Hosny
40a3468906
hb-ft: cast to float to help windows sqrtf
2022-08-02 10:02:48 -06:00
Behdad Esfahbod
6549aec89d
[SingleSubstFormat1] Help avoid timeouts in closure() some more
...
For https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49712
2022-08-01 13:11:14 -06:00
Behdad Esfahbod
ba9b20534c
[ft] Try working around fonts with transform set
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3772
2022-08-01 12:42:05 -06:00
psykose
04d28d94e5
[repacker] fix signedness of char in tests
2022-08-01 11:48:57 -06:00
Khaled Hosny
f1f2be776b
5.1.0
2022-07-31 15:48:32 +02:00
Khaled Hosny
d6e55f1baf
[automake] Use LANG=C when generating harfbuzz*.cc
...
Since `sort` is locale-dependent.
2022-07-30 23:35:47 +02:00
Behdad Esfahbod
a722b3e666
[shape] Only add any unsafe-to-concat flag if requested
...
Previously it was confusing as random incorrect flags were produced.
2022-07-30 14:33:33 -06:00
Behdad Esfahbod
0a31cfb225
[buffer] Fix produce-tatweel enum value
2022-07-30 14:32:58 -06:00
Behdad Esfahbod
a0111e4fab
[graph] Fix warning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3766
2022-07-30 12:09:45 -06:00
Behdad Esfahbod
083d4ef5c4
[harfbuzz-subset.cc] Revert back the sort order
...
Generator seems unstable.
2022-07-30 11:53:56 -06:00
Behdad Esfahbod
065f1e33c8
Merge pull request #3763 from harfbuzz/split_pair_pos
...
[repacker] Add ability for repacker to pre split PairPosFormat1 subtables.
2022-07-30 11:09:33 -06:00
Behdad Esfahbod
7c9e1ffa7c
Merge pull request #3762 from harfbuzz/safe-to-kashida
...
Prototype glyph flag safe-to-kashida
2022-07-30 10:33:27 -06:00
Behdad Esfahbod
f43dadb8ee
Rename kashida -> tatweel
2022-07-30 10:23:03 -06:00
Behdad Esfahbod
73c3ac9172
Document kashida stuff
2022-07-30 10:21:34 -06:00
Behdad Esfahbod
d277addb2f
[buffer] Add HB_BUFFER_FLAG_PRODUCE_SAFE_TO_INSERT_KASHIDA
2022-07-30 10:10:21 -06:00
Behdad Esfahbod
915e12ccbb
Prototype glyph flag safe-to-kashida
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3721
2022-07-30 10:05:36 -06:00
Behdad Esfahbod
5e31a582c9
[emoji] Bump compression level
2022-07-30 00:09:33 -06:00
Behdad Esfahbod
56a5bc3bd0
[emoji] Regenerate test data
...
Fix generator.
2022-07-30 00:08:44 -06:00
Behdad Esfahbod
90a3355e66
[ucd-table] Use more compact compression numbers
...
Doesn't show any slowdown in benchmarks.
2022-07-30 00:01:50 -06:00
Behdad Esfahbod
23dbd35ca3
Merge branch 'main' into split_pair_pos
2022-07-29 19:51:57 -06:00
Behdad Esfahbod
a5d9012e94
Revert "[ot-font] Minor simplification"
...
This reverts commit 28c02b3768
.
Old code was used in case of memory allocation failure (as shown
by fuzzers...)
2022-07-29 19:51:00 -06:00
Garret Rieger
9578c44ea2
[repacker] add HB_FALLTRHOUGH.
2022-07-29 22:21:32 +00:00
Garret Rieger
6a5e2cb2f8
[repacker] add todo.
2022-07-29 22:21:32 +00:00
Garret Rieger
14f95ee0cf
[repacker] re-count shared node sizes in split PairPos segments.
2022-07-29 22:21:32 +00:00
Garret Rieger
3b91fb2a9f
[repacker] cleanup todo.
2022-07-29 22:21:31 +00:00
Garret Rieger
a0b8893e46
[repacker] add Coverage sanitize.
2022-07-29 22:21:31 +00:00
Garret Rieger
38846f41d3
[repacker] more TODO cleanup.
2022-07-29 22:21:31 +00:00
Garret Rieger
46c1fa7d1b
[repacker] sanitize PairPos during subtable extension.
2022-07-29 22:21:31 +00:00
Garret Rieger
2a5902ee50
[repacker] cleanup.
2022-07-29 22:21:31 +00:00
Garret Rieger
674f0194a3
[repacker] add extension pairpos split test.
2022-07-29 22:21:31 +00:00
Garret Rieger
1d2516f037
[repack] get basic pairpos split test working.
2022-07-29 22:21:31 +00:00
Garret Rieger
fb3f6ad7c0
[repacker] ensure lookup map is updated when lookup memory location changes.
2022-07-29 22:21:31 +00:00
Garret Rieger
4e7360f78d
[repacker] begin adding tests for PairPosFormat1 splitting.
2022-07-29 22:21:31 +00:00
Garret Rieger
f1bfb6585f
[repacker] cleanup debug prints.
2022-07-29 22:21:31 +00:00
Garret Rieger
65afed047d
[repacker] more bug fixes.
2022-07-29 22:21:31 +00:00
Garret Rieger
1002a3dcd3
[repacker] bug fixes.
2022-07-29 22:21:31 +00:00
Garret Rieger
a5c2c8c131
[repack] fix incorrect shrink.
2022-07-29 22:21:31 +00:00
Garret Rieger
d589ce68ea
[repacker] add extension subtable when needed while adding new PairPos table's.
2022-07-29 22:21:31 +00:00
Garret Rieger
5024d4de67
[repack] more PairPos split implementation.
2022-07-29 22:21:31 +00:00
Garret Rieger
510b8ab101
[repack] link new coverage in PairPosFormat1::clone_range.
2022-07-29 22:21:31 +00:00
Garret Rieger
29cb8818cd
[repacker] new coverage serialization in PairPosFormat1.
2022-07-29 22:21:31 +00:00
Garret Rieger
8d63f60e5b
[repack] add graph_t::move_child helper function.
2022-07-29 22:21:31 +00:00
Garret Rieger
8e5fffc44a
[repack] add helper to create new nodes.
...
Switch to malloc'ing each node individually rather than trying to guess up front the total buffer space needed.
2022-07-29 22:21:31 +00:00
Garret Rieger
bf0986c7d1
[repack] sketch splitting mechanism for PairPosFormat1.
2022-07-29 22:21:30 +00:00
Garret Rieger
f6a242b605
[repacker] begin adding PairPos splitting support.
2022-07-29 22:21:30 +00:00
Garret Rieger
69913e012e
[repacker] Update repacker api method to take a table tag.
...
This is needed to allow table specific optimizations to be performed during repacking.
2022-07-29 16:16:46 -06:00
Behdad Esfahbod
28c02b3768
[ot-font] Minor simplification
2022-07-29 15:55:16 -06:00
Behdad Esfahbod
149b030520
Fix thinko
2022-07-29 12:41:30 -06:00
Behdad Esfahbod
f7677213d7
[SingleSubstFormat1] Don't close glyphs in degenerate cases
...
Fixes https://oss-fuzz.com/testcase-detail/5145429829877760
2022-07-29 12:00:29 -06:00
Behdad Esfahbod
3da50c50aa
Remove unused const
2022-07-29 11:57:15 -06:00
Khaled Hosny
0c4495e555
[meson] Don’t use f-string
...
It requires Python 3.6+
https://github.com/harfbuzz/harfbuzz/pull/3760#issuecomment-1198972788
2022-07-29 13:22:18 +02:00
Behdad Esfahbod
e51526bf06
[CompositeGlyph] Add HB_NO_BEYOND_64K
2022-07-28 09:53:30 -06:00
Behdad Esfahbod
6e6b9cf972
[use-table] Adjust main() code
2022-07-28 09:48:43 -06:00
Khaled Hosny
eaf7e5686c
[meson] Use pathlib in gen-harfbuzzcc.py
2022-07-28 13:49:06 +02:00
Khaled Hosny
5df2347cf3
[meson] Don’t tamper with paths in amalgam files
...
Using os.path.basename() breaks files in subdirectories
(gsubgpos-graph.cc instead of graph/gsubgpos-graph.cc).
Use paths relative to current source dir instead.
2022-07-28 13:49:06 +02:00
Behdad Esfahbod
0c5b60acbd
[use-table] Fix previous commit
2022-07-27 14:00:06 -06:00
Behdad Esfahbod
0788f77371
[use-table] Add a main() to print categories
2022-07-27 13:58:44 -06:00
Behdad Esfahbod
9aaa835ac1
[use-table] Regenerate with latest packtab
2022-07-27 12:24:43 -06:00
Behdad Esfahbod
3698ae25bf
[harfbuzz-subset.cc] Update
2022-07-26 14:41:34 -06:00
Behdad Esfahbod
e2cc34e190
[subset/GPOS] Fix a fuzzer timeout test
...
Fixes https://oss-fuzz.com/testcase-detail/5234369031176192
2022-07-26 12:31:40 -06:00
Garret Rieger
241ebc9354
[repacker] fix include paths.
2022-07-26 12:22:17 -06:00
Garret Rieger
5f4adb9bf3
[repacker] fix to lookup size comparison.
2022-07-26 12:22:17 -06:00
Garret Rieger
6627204c4d
[repacker] Makefile fix.
2022-07-26 12:22:17 -06:00
Garret Rieger
f56e66f3f0
[repacker] for ext promotion choose lookups from highest subtables per byte to lowest.
...
Attempts to roughly maximize the number of subtables that are non-ext.
2022-07-26 12:22:17 -06:00
Garret Rieger
9d0b2da51b
[repacker] count subtable size in each group of consecutive layers for extension promotion decisions.
...
Enforce that the following groups are all <64k in size:
- LookupList + Lookups
- Lookups + SubTables
- SubTables + Descendants
2022-07-26 12:22:17 -06:00
Garret Rieger
3d37b9f4db
[repacker] when calculating 16bit space size also consider ext lookup subtables.
2022-07-26 12:22:17 -06:00
Garret Rieger
9db3beb721
[repacker] include LookupList size when calculating size of 16bit space for ext promotion decisions.
2022-07-26 12:22:17 -06:00
Garret Rieger
e0607af976
[repacker] Use extension promotion when repacking invoked via hb-subset-repacker (eg. from fonttools).
2022-07-26 12:22:17 -06:00
Garret Rieger
8d611a7fd0
[repacker] remove temporary visibility overrides in gsubgpos.
2022-07-26 12:22:17 -06:00
Garret Rieger
7de136f8a8
[repacker] add ext promotion test.
2022-07-26 12:22:17 -06:00
Garret Rieger
c38896e07c
[repacker] todo.
2022-07-26 12:22:17 -06:00
Garret Rieger
ad0041f5f7
[repacker] Add basic version of the extension promotion selection algorithm.
2022-07-26 12:22:17 -06:00
Garret Rieger
0b6ca424fc
[repacker] fix GSTAR sanitize.
2022-07-26 12:22:17 -06:00
Garret Rieger
11709f0fbe
[repacker] support extension promotion in 24bit GSUB/GPOS.
2022-07-26 12:22:17 -06:00
Garret Rieger
b37374b04f
[repacker] save buffer reference (not copy).
2022-07-26 12:22:17 -06:00
Garret Rieger
ae290ff4fe
[repacker] add sanitization for GSUB/LookupList/Lookup during extension promotion.
2022-07-26 12:22:17 -06:00
Garret Rieger
ce03c3538a
[repacker] add make_extension_context_t.
2022-07-26 12:22:17 -06:00
Garret Rieger
ebb64b50da
[repacker] size buffer correctly.
2022-07-26 12:22:17 -06:00
Garret Rieger
815bb82b4d
[repack] fix incorrect extension object bounds.
2022-07-26 12:22:17 -06:00
Garret Rieger
7e6f6c3e88
[repack] fix new node bounds.
2022-07-26 12:22:17 -06:00
Garret Rieger
b1d38a6d0b
[repack] WIP implement extension promotion mechanism.
2022-07-26 12:22:17 -06:00
Garret Rieger
3f7a74ff40
[repacker] WIP extension promotion implementation.
2022-07-26 12:22:17 -06:00
Behdad Esfahbod
1945b400da
[cpluscplus] Wrap hb-subset types as well
...
Also changes signature of get_user_data of hb.h types to take const
object. This is safe.
2022-07-25 10:45:55 -06:00
Behdad Esfahbod
1ac21246a7
[hb-ft] Fix bitmap font rendering with hb_ft_font_changed()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3754
Fixes https://github.com/harfbuzz/harfbuzz/issues/3755
2022-07-25 08:40:02 -06:00
Behdad Esfahbod
94de328011
[GSUB/GPOS] Adjust buffer message
2022-07-24 18:51:55 -06:00
Behdad Esfahbod
bc80e4b923
[GSUB/GPOS] More buffer message for contextuals
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3753
2022-07-24 18:50:14 -06:00
Behdad Esfahbod
59b05359cd
[GSUB/GPOS] Add more buffer messages
...
Behind HB_BUFFER_MESSAGE_MORE.
https://github.com/harfbuzz/harfbuzz/pull/3495
2022-07-24 18:39:30 -06:00
Behdad Esfahbod
0722b627f4
[buffer] Return delta from sync_so_far
2022-07-24 17:35:44 -06:00
Behdad Esfahbod
c55c019771
[buffer] Add assertions of buffer sync status to message_impl
2022-07-24 16:30:33 -06:00
Behdad Esfahbod
da9edce84c
[buffer] Add sync_so_far()
...
This removes separate out-buffer, at the cost of possibly changing
idx.
2022-07-24 16:30:19 -06:00
Khaled Hosny
cbccadba8d
5.0.1
2022-07-23 22:09:06 +02:00
Behdad Esfahbod
61d0c54701
[ft] Pass design, not normalized, coords to freetype
...
Needed for avar2 to work.
2022-07-23 13:26:18 -06:00
Behdad Esfahbod
473a5e5651
[font] Fix design-coords
...
Ouch!
2022-07-23 13:26:18 -06:00
Khaled Hosny
40b21edf48
5.0.0
2022-07-23 19:53:14 +02:00
Behdad Esfahbod
4cb83967aa
[subset/ClassDefFormat2] Fix timeout
...
Fixes https://oss-fuzz.com/testcase-detail/5417800474165248
2022-07-23 11:00:20 -06:00
Behdad Esfahbod
32c85b8c8c
[avar2] Fix mapping when coords length don't match
...
Ouch.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49407
2022-07-23 10:50:26 -06:00
Behdad Esfahbod
06c3ec0a19
[avar2] Minor sanitize rewrite
2022-07-23 10:45:28 -06:00
Behdad Esfahbod
f94a3ba1db
[varStore] Better protect against HB_NO_VAR builds
2022-07-23 10:36:08 -06:00
Behdad Esfahbod
17863bd16b
[config/avar2] add HB_NO_VARIATIONS2
2022-07-22 22:38:08 -06:00
Behdad Esfahbod
5a9c7930ef
Add HB_NO_BEYOND_64K
2022-07-22 21:33:31 -06:00
Behdad Esfahbod
c76fd3c5f9
[avar2] Add link to "Spec".
2022-07-22 15:29:57 -06:00
Behdad Esfahbod
edca52c3b6
[avar2] Use a varStore cache
2022-07-22 15:29:57 -06:00
Behdad Esfahbod
59f8afa73e
[avar2] Remove XXX item
2022-07-22 15:29:57 -06:00
Behdad Esfahbod
d6c4f757a4
[avar2] Clamp out values
2022-07-22 15:29:57 -06:00
Behdad Esfahbod
d0e2ad9297
[avar] Pre-alloc vector
2022-07-22 15:29:57 -06:00
Behdad Esfahbod
2a877b554a
[avar2] First stab at mapping v2 values
2022-07-22 15:29:57 -06:00