Commit Graph
19017 Commits
Author SHA1 Message Date
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 971036888f [perf/hb-draw-compare] Default font-funcs2 to fontations
Yay!
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
Garret Rieger f5279200f3 [repacker] Add test which hits the move liga set pathway in clone_range(). 2025-07-08 22:50:48 +00:00
Garret Rieger 18c67b7789 [repacker] store liga counts before processing.
Otherwise processing changes the counts when we need them later on.
2025-07-08 22:40:18 +00:00
Garret Rieger 4fa5788cfd [repacker] fix bug with original count in liga splitting. 2025-07-08 21:29:48 +00:00
Garret Rieger 96fedd88fe [repacker] Fix handling of virtual links in liga table splitting. 2025-07-08 20:36:13 +00:00
dependabot[bot] 33a6b8099f Bump github/codeql-action from 3.29.1 to 3.29.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.1 to 3.29.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/39edc492dbe16b1465b0cafca41432d857bdb31a...181d5eefc20863364f96762470ba6f862bdef56b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-08 03:18:15 +03:00
Garret Rieger 5b47710f56 [repacker] Start implementing test for liga splitting. 2025-07-07 20:15:30 +00:00
Garret Rieger 38ab13c67e [repacker] add support for splitting GSUB Ligature lookups. 2025-07-04 23:37:24 +00:00
dependabot[bot] 50debc3720 Bump github/codeql-action from 3.29.0 to 3.29.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.0 to 3.29.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/ce28f5bb42b7a9f2c824e633a3f6ee835bab6858...39edc492dbe16b1465b0cafca41432d857bdb31a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-02 20:15:34 +03:00
Khaled Hosny d054ebd5da [cairo] Drop fallback code for versions we don’t support
We require cairo 1.10.0, so drop checks for older versions.
2025-07-02 20:14:51 +03:00
Khaled Hosny af1b9acc27 [glib] Drop fallback code for versions we don’t support
We require Glib 2.30.0, so drop checks for older versions.
2025-07-02 20:14:51 +03:00
TN-mo 826b7c132b fix "too many sections" compilation fails on windows 2025-06-27 17:03:21 -06:00
Behdad Esfahbod 48bc5a17cd [face-builder] Remove a redundant check
Fixes https://github.com/harfbuzz/harfbuzz/issues/5371
2025-06-24 23:02:00 -06:00