Commit Graph
13714 Commits
Author SHA1 Message Date
Garret Rieger 6e87481731 [subset] add virtual links to keep the gdef varstore last. 2024-03-28 23:00:54 +00:00
Garret Rieger 7145607149 [subset] place the gdef var store at the end of the GDEF table.
It appears that some font processors assume it is the last sub table.
2024-03-28 23:00:54 +00:00
Garret Rieger 975bd39b15 [subset] Match hb rounding to fonttools for avg char width.
Update Muli and Roboto input test fonts to recalc class values. FontTools recalcs class values during instancing while harfbuzz does not (like the ft subsetter).
2024-03-28 17:00:12 -06:00
Garret Rieger ec46c4c2e6 [subset] Update subset test suite to match some changes made to fonttools.
FontTools has added pruning functionality for code pages which we don't yet have in harfbuzz. Update our test runner to disable that for now. Also match fonttools and always recalc usFirst/LastCharIndex even if no prune unicode ranges is set.
2024-03-28 17:00:12 -06:00
Behdad Esfahbod cc67579c8e [wasm] Update to latest wasm-micro-runtime API 2024-03-22 12:35:29 -06:00
Behdad Esfahbod 3d86b36054 [shape] Fix syntax error under some configs
Fixes https://github.com/harfbuzz/harfbuzz/issues/4635
2024-03-22 10:38:06 -06:00
Ozkan Sezer 98747fdec8 hb-common.h: restore including stdint.h for VS2010/2012. 2024-03-21 07:19:54 -06:00
Behdad Esfahbod f1ac867dee [buffer] Add API for random state
Fixes https://github.com/harfbuzz/harfbuzz/issues/4620

New API:
+hb_buffer_set_random_state()
+hb_buffer_get_random_state()
2024-03-20 14:44:22 -06:00
Khaled Hosny 2b3631a866 8.3.1 2024-03-17 07:50:59 +02:00
Ozkan Sezerandjcomito c2f8f35a6c Use inttypes.h PRI?32 macros in format strings for [u]int32_t args.
This is a modified and cleaned-up version of PR #4619 by @jpcomito:
hb-common.h now expects 'inttypes.h' presence with MSVC exceptions,
defines __STDC_FORMAT_MACROS in there (if not already defined) and
undoes c930ae2 (PR #1974) and 902ab86.

Co-authored-by: jcomito <jcomito@google.com>
2024-03-15 11:28:35 -06:00
Qunxin Liu cfbb6a6872 [subset] support BASE table subsetting (#4618)
* [subset] support BASE table

* [subset] add tests for BASE table subsetting
2024-03-14 18:33:34 -06:00
Behdad Esfahbod e18565875a Merge pull request #4616 from googlefonts/repacker
[repacker] Rework how ClassDef sizes are estimated during splitting.
2024-03-14 15:40:18 -06:00
Garret Rieger 79eaa217ac [repacker] remove unused include. 2024-03-14 21:22:22 +00:00
Behdad Esfahbod 595def8fb8 Revert "Fixing compiler warnings"
This reverts commit 61a1ba2ff0.
2024-03-14 12:34:39 -06:00
jcomito 61a1ba2ff0 Fixing compiler warnings
All warning are for format specifiers (-WFormat) in sprintf().
2024-03-13 08:15:43 -06:00
Garret Rieger 025f52769f [repacker] fix mem leak in test-classdef-graph test. 2024-03-09 00:32:36 +00:00
Garret Rieger 01fc4a162f [repacker] Fix repacker test.
With class def size estimation changes this test is now able to pack closer to the limit.
2024-03-09 00:06:54 +00:00
Garret Rieger 8e1beefe05 [repacker] small fixes. 2024-03-08 22:05:20 +00:00
Garret Rieger 17b37f10d5 [repacker] add classdef size est. test that you can add the same class multiple times. 2024-03-08 22:01:05 +00:00
Garret Rieger 0ac9e7da39 [repacker] in classdef estimator tests compare results to actual class def serialization.
Fix the estimator to actually match real serialization sizes.
2024-03-08 21:53:10 +00:00
David Corbett 0692d23ccc Update IANA Language Subtag Registry to 2024-03-07 2024-03-08 13:27:14 -07:00
Garret Rieger 8129b21dea Update classdef size estimator to pick the min coverage format.
Previously this just assumed a worst case format 1.
2024-03-08 20:15:43 +00:00
Garret Rieger 252a926fbf [repacker] Rework how ClassDef sizes are estimated during splitting.
The old approach considered only one class at a time, which in some cases can generate the wrong answer. This change updates the estimation to consider how all classes in the current split would end up encoded in a single ClassDef table. Additionally compute whether glyphs are consecutive only for the current split (instead of the fully mapping).
2024-03-08 19:46:48 +00:00
Qunxin Liu d6431dc7e6 [instancer] support *=drop, which would pin all axis to default location 2024-03-07 12:24:43 -07:00
Behdad Esfahbod 06749fa481 [icu] Use uscript_getCode() 2024-03-04 11:25:44 -07:00
L. E. Segovia 6864769c4d [meson] Block uses of hb-static throughout Microsoft compilers
PE-COFF cannot export extern, non-dllexport symbols.
2024-02-28 01:23:14 +00:00
Behdad Esfahbod 225a7a8a5e [aat] Mark DELETED_GLYPH as IGNORABLE
Fixes https://github.com/harfbuzz/harfbuzz/issues/4598
2024-02-24 15:12:42 +01:00
Behdad Esfahbod 5d1ff191c0 Fix return type
https://github.com/harfbuzz/harfbuzz/commit/1bddeb974ff0c08332c8225f6f5b5bd45bcddfdc#r138731107
2024-02-20 06:30:59 +01:00
Bruce Mitchener fb6d4d27d6 Remove unnecessary std::move().
This fixes a warning from clang-tidy:

    warning: std::move of the variable 'mapping' of the trivially-copyable
        type 'AxisValueMap' has no effect [performance-move-const-arg]
2024-02-17 11:04:50 +01:00
Bruce Mitchener 3cfdbd6717 Use noexcept on swap, move constructors, etc. 2024-02-17 11:04:10 +01:00
Bruce Mitchener 1bddeb974f Use literal bools when possible rather than ints. 2024-02-16 18:22:09 +01:00
Magnus Larsen b8178f2554 Disable Wcast-function-type on clang-cl, too 2024-02-13 08:06:44 +01:00
Christer Sandberg 1ab8822b41 Fixed some errors in STAT table implementation 2024-02-10 07:08:18 -07:00
Behdad Esfahbod 031fdb1c8b Rename VarStoreInstancer to ItemVarStoreInstancer 2024-02-06 14:52:03 -07:00
Behdad Esfahbod 1cb47eff8f Rename VariationStore to ItemVariationStore 2024-02-06 14:52:03 -07:00
Lőrinczy, Zsigmond 4c77bd921c Update hb-serialize.hh (#4576)
* Update hb-serialize.hh

This version does compile with g++ 4.8.3 which is the newest available version on Aix5.3

* Update hb-serialize.hh

Back to the original version, just without `this->`
2024-02-06 09:51:49 -07:00
Behdad Esfahbod a9b8891799 Merge pull request #4563 from googlefonts/instancer_iup_delta_opt
[Instancer] add code for iup delta optimization
2024-02-02 18:24:24 -07:00
Qunxin Liu 97309483ea [instancer] rename HB_SUBSET_FLAGS_IUP_DELTA_OPT to HB_SUBSET_FLAGS_OPTIMIZE_IUP_DELTAS 2024-02-02 16:59:19 -08:00
Qunxin Liu f072de9359 [instancer] move iup code to a seprate file 2024-01-30 10:52:42 -08:00
Behdad Esfahbod 846d5204c0 [ft] Remove unnecessary cast 2024-01-27 16:34:29 -08:00
Behdad Esfahbod 9182315bba [hb.hh] Add error -Wcast-function-type-strict 2024-01-27 16:33:46 -08:00
Qunxin Liu 97c85ab2d0 [instancer] iup delta optimize: fix is_composite_glyph value in gvar 2024-01-26 16:36:56 -08:00
Qunxin Liu 4d5fb233e3 fix build 2024-01-26 16:11:06 -08:00
Qunxin Liu 0cbc812340 [instancer] add iup_optimize() call into instantiation 2024-01-26 15:42:29 -08:00
Patrick Griffis aed309d1ec [autotools] Installing missing hb-features.h header
This is already installed by CMake and Meson.
2024-01-26 11:29:28 -08:00
Qunxin Liu 52c3cda31b [instancer] add composite_new_gids set in subset plan
This is only used by iup delta optimization where we need to know
whether glyph is composite or not
2024-01-26 10:55:57 -08:00
Qunxin Liu a3e3473cc8 [instancer] when iup delta opt is enabled, add default deltas to coords 2024-01-26 10:42:21 -08:00
Qunxin Liu f1cdcc70c1 [instancer] add iup delta optimization functions tuple_delta_t
ported from fonttools
2024-01-26 10:12:38 -08:00
Qunxin Liu 8ad540bb84 [instancer] move compile_point_set to be a member of tuple_delta_t
Also change hb_bytes_t to vector for memory safety
2024-01-26 09:58:48 -08:00
Qunxin Liu c7a6030b31 [instancer] add a flag HB_SUBSET_FLAGS_IUP_DELTA_OPT 2024-01-26 09:27:27 -08:00