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
Behdad Esfahbod
aa7f5e3742
[subset] Conditionalize call to hb_font_set_variations
2022-12-04 15:33:18 -07:00
Behdad Esfahbod
6f133ccfde
[glyf] Fix build with HB_NO_VERTICAL
2022-11-24 12:59:55 -07:00
Garret Rieger
81640fdffe
[subset] fix leaked font in glyf::subset(...)
2022-11-23 13:41:52 -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
4afcdf675b
More hb_memcpy
2022-11-22 12:56:48 -07:00
Behdad Esfahbod
1758ee6646
[glyf] Minor write loop more idiomatically
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
f2b5db700f
[vector] Remove .sub_array ()
2022-11-16 21:22:57 -07: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
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
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
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
Behdad Esfahbod
84d33a1ed8
[glyf] Fix compiler warning
2022-08-23 13:13:13 -06:00
Qunxin Liu
ac0e22fa8e
[instance] update glyf/hmtx/vmtx tables
2022-08-22 09:29:37 -07: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
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
Behdad Esfahbod
e51526bf06
[CompositeGlyph] Add HB_NO_BEYOND_64K
2022-07-28 09:53:30 -06:00
Behdad Esfahbod
7549d447ba
[>64k:glyf] Implement composites for >64k
...
Implements https://github.com/be-fonts/boring-expansion-spec/issues/42
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
09de94788b
[>64k:glyf] Hid composite glyphIndex
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
b0cb9a1a63
Make get_leading_bearing return bool
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3496
Part of supporting >64k glyphs correctly.
2022-07-03 15:32:32 -06:00
Behdad Esfahbod
115e1a03e7
[glyf] Relax condition for matching number of coords
2022-07-03 14:45:12 -06:00
Behdad Esfahbod
800760c5bd
[glyf] Rename get_extents functions for clarity
2022-07-03 13:21:06 -06:00
Behdad Esfahbod
ab327f93b7
[glyf] Fix another bug with scaling
...
Of advances this time.
That codepath is never exercised though, if font has HVAR table.
2022-07-03 13:17:03 -06:00
Behdad Esfahbod
f46ddeba48
[hmtx/glyf] Rename side-bearing functions for clarity
2022-07-03 13:12:49 -06:00
Behdad Esfahbod
b2d60cbd6e
[glyf] Rename advance functions for clarity
2022-07-03 12:56:48 -06:00