Commit graph

15994 commits

Author SHA1 Message Date
Behdad Esfahbod
7e7f1d0414 Drop a pair of parantheses from likely/unlikely
Such that "if likely(...)" wouldn't compile.
2023-05-02 12:06:00 -06:00
Behdad Esfahbod
db730f46d0 Simplify likely/unlikely
This surprisingly saves bytes and speeds up.
2023-05-02 11:55:10 -06:00
Behdad Esfahbod
2f9945ca01 [Glyph] Only treat numContours=-1 as Composite
Leave the other negative numbers as empty glyph.
2023-05-02 11:33:31 -06:00
Garret Rieger
db23be642f [subset] clamp head *Min/*Max values to fit within 16 bit signed int.
Fixes fuzzer https://oss-fuzz.com/testcase-detail/4549472192692224.
2023-05-01 20:28:58 -06:00
Behdad Esfahbod
a8b8eb53c3 [Coverage] Micro-optimize 2023-05-01 16:56:29 -06:00
Behdad Esfahbod
af21ea359c [Coverage/serialize] Micro-optimize 2023-05-01 16:37:37 -06:00
Behdad Esfahbod
491f2968cd [gvar] Micro-optimize
We don't need the flag in the case of apply_to_all.
2023-05-01 15:58:57 -06:00
Behdad Esfahbod
19d8328b63 [VarComposite] Minor use pad instead of StructAfter 2023-05-01 15:54:27 -06:00
Behdad Esfahbod
1b74cd7c2d [gvar] Micro-optimize 2023-05-01 15:43:00 -06:00
Behdad Esfahbod
267ecd20c8 [normalize] Micro-optimize 2023-05-01 14:06:12 -06:00
Behdad Esfahbod
577bc8a239 [layout] Micro-optimize 2023-05-01 14:01:08 -06:00
Behdad Esfahbod
5b78e9a924 [layout] Whitespace 2023-05-01 13:45:42 -06:00
Behdad Esfahbod
3f9eb03b40 [graph] Micro-optimize 2023-05-01 12:55:29 -06:00
Behdad Esfahbod
1cbb85dc84 [Glyph] Protect against an underflow 2023-04-30 11:31:46 -06:00
Behdad Esfahbod
c7721f7df5 [Glyph] Reuse variables 2023-04-30 11:28:40 -06:00
Behdad Esfahbod
e826d94afe Call roundf() instead of _hb_roundf()
The former is defined as a macro expanding to the latter.
2023-04-30 11:11:19 -06:00
Behdad Esfahbod
fbffd4e65e [SimpleGlyph] Handle cubic curves when instancing 2023-04-30 10:45:19 -06:00
Behdad Esfahbod
85a0a12338 [SimpleGlyph] Relax types 2023-04-30 10:40:50 -06:00
Behdad Esfahbod
2e5e566504 [SimpleGlyph] Micro-optimize 2023-04-30 10:23:58 -06:00
Behdad Esfahbod
7b9832deab [buffer] Whitespace 2023-04-29 12:56:07 -06:00
Behdad Esfahbod
700975f732 [gvar/glyf] Minor save a variable 2023-04-29 11:26:03 -06:00
Behdad Esfahbod
07be0b6878 [VarComposite] Minor micro-optimize 2023-04-29 11:09:28 -06:00
Behdad Esfahbod
ecd0f859bd [Composite] Minor micro-optimize 2023-04-29 10:52:49 -06:00
Han Seung Min - 한승민
e768754b0f [buffer] fix hb_buffer_t::similar setting replacement to src.invisible
```cpp
void
hb_buffer_t::similar (const hb_buffer_t &src)
{
  hb_unicode_funcs_destroy (unicode);
  unicode = hb_unicode_funcs_reference (src.unicode);
  flags = src.flags;
  cluster_level = src.cluster_level;
  replacement = src.invisible; // <- this should be src.replacement
  invisible = src.invisible;
  not_found = src.not_found;
}
```
2023-04-29 09:58:38 -06:00
Behdad Esfahbod
afd432daf5 [VarComposite] Fix an #ifdef check 2023-04-28 14:55:37 -06:00
Behdad Esfahbod
b53f8c25ca [path-builder] Simplify initialization 2023-04-28 14:49:22 -06:00
Behdad Esfahbod
6a4b87d003 [path-builder] Remove double-initialization 2023-04-28 14:48:46 -06:00
Behdad Esfahbod
4a102effd0 [gvar] Minor always pass cache
We now check for access in calculate_scalar(), so no need to
check fof error here.
2023-04-28 14:38:34 -06:00
Behdad Esfahbod
06504cb0a2 [PairPosFormat2] Minor use false instead of 0 2023-04-28 13:13:18 -06:00
Behdad Esfahbod
262f029e20 [algs] Undo touching HACKMEM 169 2023-04-28 12:57:24 -06:00
Behdad Esfahbod
9ed43dc500 [PairPosFormat2] Reuse a value 2023-04-28 12:38:26 -06:00
Behdad Esfahbod
859f7d41cb [set-digest] Comment 2023-04-28 12:23:44 -06:00
Behdad Esfahbod
bd62a91d03 [algs] 64bit popcount 2023-04-28 12:01:21 -06:00
Behdad Esfahbod
5b0d818128 [Glyph] Add missing break 2023-04-28 11:40:42 -06:00
Behdad Esfahbod
e5dfb6a4b6 [SimpleGlyph] Use hb_memset instead of memset 2023-04-28 11:38:12 -06:00
Behdad Esfahbod
1b0c5a3e63 [VarComposite] Comment 2023-04-28 11:16:11 -06:00
Behdad Esfahbod
b0e763f5eb [VarComposite] Micro-optimize get_num_points 2023-04-28 10:45:23 -06:00
Behdad Esfahbod
29d576584d [VarComposite] Micro-optimize 2023-04-28 10:33:50 -06:00
Behdad Esfahbod
bf97f88055 [VarComposite] Minor notation 2023-04-28 10:28:17 -06:00
Behdad Esfahbod
e9738563ff [VarComposite] Speedup get_size() 2023-04-28 10:22:40 -06:00
Behdad Esfahbod
21ba0b6868 [cvt] Remove unneeded initialization 2023-04-27 19:16:02 -06:00
Garret Rieger
b3fed4fa64 [repacker] fix fuzzer found memory leak.
Fixes https://oss-fuzz.com/testcase-detail/5196242811748352
2023-04-27 17:18:47 -06:00
Behdad Esfahbod
247ffe389f
Merge pull request #4211 from harfbuzz/glyf-inplace
Glyf inplace
2023-04-27 16:28:47 -06:00
Behdad Esfahbod
c800c0cfe1 [Glyph] Load composite glyphs in-place 2023-04-27 16:07:08 -06:00
Behdad Esfahbod
f90e3fc3f4 [Composites] Pre-alloc phantom-points space 2023-04-27 14:39:33 -06:00
Behdad Esfahbod
0c7cb57539 [VarComposite] Micro-optimization for advance-only 2023-04-27 14:21:44 -06:00
Behdad Esfahbod
bdce23a0c0 [Glyph] Don't load component glyphs is phantom_only
Drastically speeds up variable advance calculation when HVAR
is missing. Let's see what I broke...
2023-04-27 14:07:57 -06:00
Behdad Esfahbod
e2be7865f3 [VarComposite] Minor rewrite 2023-04-27 13:55:37 -06:00
Qunxin Liu
b9b85da3c9 [instancer] no need to create hb_font_t object when fetching delta from varstore 2023-04-27 13:55:02 -06:00
Behdad Esfahbod
58f79063bb [VarComposite] Set min_size to 5 2023-04-27 13:35:32 -06:00