Commit Graph
13639 Commits
Author SHA1 Message Date
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
Sergei Trofimovich 032c931e1c use calloc(nmemb, size), not calloc(size, nmemb)
This minor mismatch is detected by new `-Wcalloc-transposed-args`
`gcc-14` warning as:

    In file included from ../src/hb-subset-plan.cc:38:
    ../src/hb-ot-cff1-table.hh: In member function 'bool OT::cff1::accelerator_t::get_glyph_from_name(const char*, int, hb_codepoint_t*) const':
    ../src/hb-ot-cff1-table.hh:1419:60: warning: 'void* calloc(size_t, size_t)' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
     1419 |         names = (hb_sorted_vector_t<gname_t> *) hb_calloc (sizeof (hb_sorted_vector_t<gname_t>), 1);
          |                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-01-13 10:34:18 -07:00
Garret Rieger ef1f5c4e0c [subset] Re-use common Coverage subsetting function in PairPosFormat2.
Was using an identical but less efficient version. Fixes fuzzer test case: https://oss-fuzz.com/testcase-detail/6151390002806784
2024-01-08 15:34:45 -07:00
Behdad Esfahbod e0e2b29ea8 [cmap] Implement MacRoman encoding
For other Mac encodings just map the ASCII range.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4540
2024-01-08 12:30:23 -07:00
Behdad Esfahbod ef289a9e20 [COLR] Reduce COLRv1 max edge count
64k sounds excessive.

Fixes https://oss-fuzz.com/testcase-detail/5383336738291712
2024-01-08 09:11:34 -07:00
Lie Yan 155015f4be refactor(math-kern): call hb_bsearch_impl instead of raw binary search 2024-01-08 07:05:56 -07:00
Behdad Esfahbod 2f41d54b85 Fix old-compiler warning 2024-01-07 13:50:56 -07:00
Ozkan Sezer 1cc7ddb3c4 hb-subset-plan.cc: Fix -Wparentheses warning.
In file included from hb-subset-plan.hh:30:0,
                 from hb-subset-plan.cc:27:
hb-subset-plan.cc: In function 'void _update_instance_metrics_map_from_cff2(hb_subset_plan_t*)':
hb-subset-plan.cc:998:81: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   if (unlikely (!plan->check_success (font = _get_hb_font_with_variations (plan))))
                                                                                 ^
hb.hh:263:25: note: in definition of macro 'unlikely'
 #define unlikely(expr) (expr)
                         ^

Fixes: https://github.com/harfbuzz/harfbuzz/issues/4545
2024-01-07 12:30:06 -07:00
Lie Yan c17d67467f [ot-math] Fix a bug in MathKern::get_value()
Fixes https://github.com/harfbuzz/harfbuzz/issues/4542
2024-01-07 16:10:10 +02:00
Behdad Esfahbod e9d727173c [cmap] Remove more unused code 2024-01-04 09:36:24 -07:00
Behdad Esfahbod f8d924e5b8 [cmap] Remove unused code 2024-01-04 09:36:24 -07:00
Behdad Esfahbod 81c2212117 [test-instancer-solver] Fix on msys32 hopefully 2024-01-01 13:52:33 -05:00
Garret Rieger bb5c7ccb14 Also enforce IFTB requirements during instantiation of gvar. 2023-12-19 17:02:35 -05:00
Garret Rieger d80e0974d2 [repacker] Increase repacker max rounds to 32.
Found an example font that needs the higher limit.
2023-12-15 16:50:08 -07:00
Behdad Esfahbod 5b325c0ae9 [cff] Fix late sanitize
Last summer I changed sanitizer->check_struct() to only check
the trailing point of the struct on 64bit machines. This works
mostly because offsets are always positive.

Not anymore. Recently we introduced negative offsets in CFF,
and this was causing sanitize() for such structs pass while
the struct's leading edge was out of range.

Fix that.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64859
2023-12-13 15:27:47 -07:00
Qunxin Liu df735213a8 [instancer-solver] port solver fix (#4519)
* [instancer-solver] port solver fix

from https://github.com/fonttools/fonttools/pull/3374
2023-12-06 10:50:29 -07:00
Behdad Esfahbod bf84135edd [cff] Support negative offsets
Fixes https://github.com/harfbuzz/harfbuzz/issues/4508
2023-12-06 11:49:02 -05:00
Garret Rieger 7160c5b9e5 [repacker] add tests for multi-duplication.
Further improve the resolution attempt by pre-emptively raising priority of a duplicated shared node.
2023-12-05 16:25:12 -05:00
Garret Rieger 6f64fa75e3 [repacker] improve resolution of overflows to shared nodes.
Prior to this change overflows to shared nodes were handled by duplicating the link from only a single parent on each iteration. However, I've encountered fonts where there is a large number of parents sharing a single child. Using the prior strategy requires large number of overflow resolution iterations to resolve overflows. This changes shared overflow resolution to duplicate the shared child and re-assign multiple overflowing parents in a single iteration. This reduces total packing size in these cases and allows resolution to complete in far fewer iterations.
2023-12-05 16:25:12 -05:00
utelle 0d9f497974 Adjust function hb_blob_create_from_file_or_fail
On Windows the filename will be interpreted as UTF-8.
If the filename is NOT valid UTF-8, it will be interpreted according to the system codepage.
2023-12-04 17:08:17 -05:00
Chun-wei Fan 1d86b844df CMake: Build libharfbuzz-cairo and fix hb-view build
There is now a separate library that we build if Cairo support is enabled,
which will also be used to build hb-view, so we:

* Add support in the CMake build files to build libharfbuzz-cairo, if enabled
  via HB_HAVE_CAIRO. Move the Cairo detection bits around as a result.
* Generate pkg-config file for libharfbuzz-cairo, and add 'cairo' to
  Requires.private.
* Fix building hb-view, which will now depend on libharfbuzz-cairo, so Cairo
  support must be explicitly enabled.
* Stop depending automatically on Cairo if HB_BUILD_UTILS is enabled unless
  Cairo support is enabled as a result.
2023-11-30 16:31:44 +08:00
Behdad Esfahbod df635ab78a Merge pull request #4473 from googlefonts/help
[instancer] add the option to leave blanks in the min:def:max syntax.
2023-11-15 14:55:11 -07:00
Garret Rieger 66a404cad4 [subset] Fix hb_subset_input_get_axis_range documentation. 2023-11-15 21:41:30 +00:00
Garret Rieger 15a3889ee1 Add hb_subset_input_get_axis_range to experimental symbols list. 2023-11-15 21:13:59 +00:00
Qunxin Liu f1ac36ba7f [instancer] update hhea vertical metrics with OS/2 ones 2023-11-15 13:25:43 -07:00
Garret Rieger d30c1dacf5 Add test suite for instancing option parsing. 2023-11-15 20:16:07 +00:00