Behdad Esfahbod
f2a3ca7212
[ot-font] Speed up VORG codepath in v-origins
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
6254642434
[font] Speed up non-synthetic v-origins
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
4fd6345acb
[ot-font] Clean up cache invalidation
...
Also, cache is_synthetic on font.
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
aee066bcae
[ot-font] Fix v-origins caching
...
Negative numbers don't fit in the cache...
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
8d87e3af9b
[font] Typo in glyph_v_origins impl
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
6bf2292d9a
[ot-font] Comment
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
b3765e7c40
[benchmark-font] Call the plural glyph-v-origins API
...
Ouch!
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
abcefb695a
[glyf] Remove dead code
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
d95faf9012
[ot-font] Cosmetic
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
7a41150fed
[ot-font] Use glyf scratch in v-advances
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
ecc5c4880d
[ot-font] Release v-origins caches
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
cbc928fa79
[benchmark-font] malloc hygiene
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
a40f85aff7
[font] Acquire a scratch for v-origins
...
Still too slow.
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
76357479e3
[glyf] Non-var-optimize a method
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
0dc5f8a28e
[ot-font] Finish caching of v-origins
...
On to benchmarking...
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
e697e4d35a
[ot-font] More baby steps towards caching v-origins
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
9cd9057aea
[ot-font] More baby steps towards caching v-origins
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
df6c76dc99
[ot-font] Baby steps re glyph-v-origins batching
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
486eb914b6
[ot-font] Baby steps re batching glyph-v-origins
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
ebc61ec474
[ot-font] Slow massaging of glyph-v-origins
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
da18bc0551
[docs] Fix build
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
1f6fe46529
[ot-font] Switch to plural glyph-v-origins
...
Still calls the singular slow version.
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
faa4472d44
[ot-shape] Use batch origin-changing callbacks
...
Backends don't implement it yet.
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
6eeb012e53
[font] Don't set origin values if returning false
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
7d3f8ced68
[font] Minor refactor
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
1835c088db
[font] Add get_glyph_[hv]_origins callbacks (plural)
...
Unused so far, and unimplemented in backends.
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
afe6661b42
[docs] All callbacks return in scaled units
...
"font units" is confusing in the context of scaled fonts.
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
ce4a0a3d6d
[ot-font] Fix unused-label error...
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
fdf4c759fa
[hmtx] Simplify get-leading code
...
Can't return false. The false was being used before to mean
"table not present". Handle that instead.
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
b359c83cdd
[ot-font] Rewrite h/v-advance code
...
Faster, better cached...
24% faster across the benchmarks for hmtx-only path.
Comparing before to after
Benchmark Time CPU Time Old Time New CPU Old CPU New
------------------------------------------------------------------------------------------------------------------------------------------------------------
BM_Font/glyph_h_advances/Roboto-Regular.ttf/ot -0.2410 -0.2411 2 1 2 1
BM_Font/glyph_h_advances/RobotoFlex-Variable.ttf/ot -0.2482 -0.2484 1 1 1 1
BM_Font/glyph_h_advances/RobotoFlex-Variable.ttf/var/ot -0.0296 -0.0296 48 47 48 47
BM_Font/glyph_h_advances/SourceSansPro-Regular.otf/ot -0.2412 -0.2416 2 2 2 2
BM_Font/glyph_h_advances/SourceSansPro-Regular.otf/var/ot -0.2381 -0.2384 2 2 2 2
BM_Font/glyph_h_advances/AdobeVFPrototype.otf/ot -0.2347 -0.2349 0 0 0 0
BM_Font/glyph_h_advances/AdobeVFPrototype.otf/var/ot -0.0343 -0.0346 2 2 2 2
BM_Font/glyph_h_advances/SourceSerifVariable-Roman.ttf/ot -0.2623 -0.2621 2 1 2 1
BM_Font/glyph_h_advances/SourceSerifVariable-Roman.ttf/var/ot -0.0388 -0.0401 24 23 24 23
BM_Font/glyph_h_advances/Comfortaa-Regular-new.ttf/ot -0.2396 -0.2394 1 1 1 1
BM_Font/glyph_h_advances/NotoNastaliqUrdu-Regular.ttf/ot -0.2344 -0.2346 2 1 2 1
BM_Font/glyph_h_advances/NotoSerifMyanmar-Regular.otf/ot -0.2366 -0.2367 1 1 1 1
OVERALL_GEOMEAN -0.1945 -0.1948 0 0 0 0
2025-07-20 07:19:23 -06:00
Behdad Esfahbod
dd85aeba88
[benchmark-shape] Take text direction as extra argument
2025-07-20 07:18:54 -06:00
Behdad Esfahbod
266c0f8e3e
[benchmark-font] Add --max-glyphs argument
...
--max-glyphs 256 can be used to measure the cached behavior
of many ops, like glyph_h_advance, glyph_v_advance,
and glyph_v_origin.
2025-07-20 00:12:26 -06:00
Behdad Esfahbod
94efb343cb
[benchmark-font] Benchmark v_advances and v_origin
2025-07-20 00:12:20 -06:00
Christoph Thien
68f22726c1
fix linker error on Windows : 'unresolved external symbol __imp_DWriteCreateFactory'
...
When using HB_HAVE_DIRECTWRITE=ON then we get linker error:
harfbuzz.cc.obj : error LNK2019: unresolved external symbol __imp_DWriteCreateFactory referenced in function "public: __cdecl hb_directwrite_global_t::hb_directwrite_global_t(void)" (??0hb_directwrite_global_t@@QEAA@XZ)
Added linking to dwrite.lib on Windows.
2025-07-16 14:42:20 +03:00
Behdad Esfahbod
761d541bf6
[README] Add other users
2025-07-15 12:49:22 -06:00
Behdad Esfahbod
d47a319b82
[rust] Roll deps forward
...
Adjust tests. See:
https://github.com/harfbuzz/harfbuzz/issues/5388
2025-07-15 12:08:00 -06:00
Behdad Esfahbod
3d154bc6b2
[buffer-message] Fix potential buffer overflow...
...
...when buffer messaging is enabled and with malicious font.
Fixes https://github.com/harfbuzz/harfbuzz/security/advisories/GHSA-p965-5rr7-9mhq
2025-07-14 13:54:49 -06:00
Qunxin Liu
5dbb814164
[subset] AnchorFormat3: better check for when should downgrade to format1
2025-07-14 10:54:43 -06:00
Caolán McNamara
1a804b0f42
const up modifier_combining_marks
...
and supported_face_loaders, etc.
move these symbols out of the .data section
2025-07-13 13:55:35 -06:00
Behdad Esfahbod
a81e73a775
Merge pull request #5385 from harfbuzz/fontations-names
...
[fontations] Cache glyph_from_names hashmap on the face
2025-07-11 23:56:53 -06:00
Behdad Esfahbod
57f02dd237
[fontations] Cache glyph_from_names hashmap on the face
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5384
2025-07-11 23:40:51 -06:00
Behdad Esfahbod
e81efe3a63
[glyf] Add TODO
2025-07-11 01:40:23 -06:00
Behdad Esfahbod
0855d33ae4
Merge branch 'main' into HVF
2025-07-11 01:00:43 -06:00
Behdad Esfahbod
971036888f
[perf/hb-draw-compare] Default font-funcs2 to fontations
...
Yay!
2025-07-11 00:55:05 -06:00
Behdad Esfahbod
deb60ecf18
[fontations] Cache glyph_from_names hashmap on the face
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5384
2025-07-11 00:55:05 -06:00
Behdad Esfahbod
6ed598e1c0
Merge pull request #5382 from harfbuzz/lig_split
...
[repacker] Implement table splitting for LigatureSubst
2025-07-10 13:03:44 -06:00
Qunxin Liu
95dc11092f
[subset] bug fix
...
Don't downgrade to format1 when subsetting
2025-07-10 12:25:10 -06:00
Garret Rieger
2dfaf2a22e
[repacker] fix imports.
2025-07-10 16:11:15 +00:00
Garret Rieger
e50d16f6f8
[repacker] During liga splitting re-use orphaned liga sets.
2025-07-10 00:58:49 +00:00
Garret Rieger
cad418860a
[repacker] fix bug where nodes with incoming virtual links could get orphaned.
...
When attempting to fix overflows nodes that have incoming edges from more than one parent can be duplicated. However, if all of these incoming links are virtual except for one duplicating it will effectively orphan it (one of the copies will be pointed to only by virtual links). Since parent book keeping is expensive we don't want to separately track virtual/real parents so instead just don't duplicate nodes that have at least one incoming virtual link.
2025-07-09 17:09:05 +00:00