Skip to content

Commit cc5447e

Browse files
committed
harfbuzz: update to 13.0.1.
Overview of changes leading to 13.0.1 Saturday, March 7, 2026 ===================================== - Bug fixes in rendering `COLR` v1 fonts. - Various build fixes. Overview of changes leading to 13.0.0 Wednesday, March 4, 2026 ===================================== - New experimental drawing and rendering libraries: * New public `hb-vector` API for vector output of glyph outlines. The only supported output format currently is SVG. The new API is available in a separate `harfbuzz-vector` library. * New public `hb-raster` API for rasterizing glyphs to A8 / BGRA32 images. The new API is available in a separate `harfbuzz-raster` library. * Both APIs are still experimental and subject to change. * Both libraries support monochrome as well as vector color glyph formats (`COLR` v0, v1, and `SVG`). * Additionally, `hb-vector` supports also bitmap color glyph formats (`CBDT` and `sbix`). * New command line utilities to accompany the new APIs: `hb-vector` and `hb-raster`. They share many of the same options as `hb-view`. - New subset flag `HB_SUBSET_FLAGS_DOWNGRADE_CFF2` to convert instantiated `CFF2` table to `CFF `. This options will desubroutinize `CFF2` table and convert it to CID-keyed `CFF` table. This is useful for compatibility with older renderers that do not support `CFF2` table, including embedding instantiated fonts in PDF documents. - The `hb-view` command-line utility got a few bells and whistles as well, including support for logical / ink extents (with the default being the union of both), stroke, and an option to rotate glyph foreground colors (rainbow coloring). - New API to inspect color-glyph documents in `SVG` table. - New API to signal that the buffer content was changed by the client in message callbacks. - Improve `VARC` drawing accuracy with multiple transform / rounding fixes. - Don’t reject malformed `cmap` subtables, a regression from 12.3.0 when we stopped sanitizing malformed tables. - Disallow calling `hb_buffer_set_message_func()` from within the message callback. - Various performance optimizations, fuzzing fixes, and documentation improvements. - New API: * harfbuzz: +hb_buffer_changed() +hb_ot_color_get_svg_document_count() +hb_ot_color_get_svg_document_glyph_range() +hb_ot_color_glyph_get_svg_document_index() * harfbuzz-subset: +HB_SUBSET_FLAGS_DOWNGRADE_CFF2 * harfbuzz-raster: +hb_raster_draw_t +hb_raster_extents_t +hb_raster_format_t +hb_raster_image_t +hb_raster_paint_t +hb_raster_draw_create_or_fail() +hb_raster_draw_destroy() +hb_raster_draw_get_extents() +hb_raster_draw_get_funcs() +hb_raster_draw_get_scale_factor() +hb_raster_draw_get_transform() +hb_raster_draw_get_user_data() +hb_raster_draw_glyph() +hb_raster_draw_recycle_image() +hb_raster_draw_reference() +hb_raster_draw_render() +hb_raster_draw_reset() +hb_raster_draw_set_extents() +hb_raster_draw_set_glyph_extents() +hb_raster_draw_set_scale_factor() +hb_raster_draw_set_transform() +hb_raster_draw_set_user_data() +hb_raster_image_clear() +hb_raster_image_configure() +hb_raster_image_create_or_fail() +hb_raster_image_destroy() +hb_raster_image_get_buffer() +hb_raster_image_get_extents() +hb_raster_image_get_format() +hb_raster_image_get_user_data() +hb_raster_image_reference() +hb_raster_image_set_user_data() +hb_raster_paint_clear_custom_palette_colors() +hb_raster_paint_create_or_fail() +hb_raster_paint_destroy() +hb_raster_paint_get_extents() +hb_raster_paint_get_funcs() +hb_raster_paint_get_scale_factor() +hb_raster_paint_get_transform() +hb_raster_paint_get_user_data() +hb_raster_paint_glyph() +hb_raster_paint_recycle_image() +hb_raster_paint_reference() +hb_raster_paint_render() +hb_raster_paint_reset() +hb_raster_paint_set_custom_palette_color() +hb_raster_paint_set_extents() +hb_raster_paint_set_foreground() +hb_raster_paint_set_glyph_extents() +hb_raster_paint_set_scale_factor() +hb_raster_paint_set_transform() +hb_raster_paint_set_user_data() * harfbuzz-vector: +hb_vector_draw_t +hb_vector_extents_mode_t +hb_vector_extents_t +hb_vector_format_t +hb_vector_paint_t +hb_vector_draw_create_or_fail() +hb_vector_draw_destroy() +hb_vector_draw_get_extents() +hb_vector_draw_get_funcs() +hb_vector_draw_get_scale_factor() +hb_vector_draw_get_transform() +hb_vector_draw_get_user_data() +hb_vector_draw_glyph() +hb_vector_draw_recycle_blob() +hb_vector_draw_reference() +hb_vector_draw_render() +hb_vector_draw_reset() +hb_vector_draw_set_extents() +hb_vector_draw_set_glyph_extents() +hb_vector_draw_set_scale_factor() +hb_vector_draw_set_transform() +hb_vector_draw_set_user_data() +hb_vector_paint_clear_custom_palette_colors() +hb_vector_paint_create_or_fail() +hb_vector_paint_destroy() +hb_vector_paint_get_extents() +hb_vector_paint_get_funcs() +hb_vector_paint_get_scale_factor() +hb_vector_paint_get_transform() +hb_vector_paint_get_user_data() +hb_vector_paint_glyph() +hb_vector_paint_recycle_blob() +hb_vector_paint_reference() +hb_vector_paint_render() +hb_vector_paint_reset() +hb_vector_paint_set_custom_palette_color() +hb_vector_paint_set_extents() +hb_vector_paint_set_foreground() +hb_vector_paint_set_glyph_extents() +hb_vector_paint_set_palette() +hb_vector_paint_set_scale_factor() +hb_vector_paint_set_transform() +hb_vector_paint_set_user_data() +hb_vector_svg_paint_set_flat() +hb_vector_svg_paint_set_precision() +hb_vector_svg_set_flat() +hb_vector_svg_set_precision()
1 parent aa7b707 commit cc5447e

10 files changed

Lines changed: 139 additions & 10 deletions

fonts/harfbuzz/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# $NetBSD: Makefile,v 1.157 2026/02/19 16:55:29 wiz Exp $
1+
# $NetBSD: Makefile,v 1.158 2026/03/10 05:58:05 wiz Exp $
22

33
.include "Makefile.common"
44

5-
PKGREVISION= 1
6-
75
COMMENT= OpenType text shaping engine
86

97
# Use external icu support.

fonts/harfbuzz/Makefile.common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# $NetBSD: Makefile.common,v 1.77 2026/01/25 08:03:35 adam Exp $
1+
# $NetBSD: Makefile.common,v 1.78 2026/03/10 05:58:05 wiz Exp $
22
# used by fonts/harfbuzz-icu/Makefile
33

4-
DISTNAME= harfbuzz-12.3.2
4+
DISTNAME= harfbuzz-13.0.1
55
CATEGORIES= fonts
66
MASTER_SITES= ${MASTER_SITE_GITHUB:=harfbuzz/}
77
GITHUB_RELEASE= ${PKGVERSION_NOREV}

fonts/harfbuzz/PLIST

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
@comment $NetBSD: PLIST,v 1.87 2025/10/01 11:13:03 adam Exp $
1+
@comment $NetBSD: PLIST,v 1.88 2026/03/10 05:58:05 wiz Exp $
22
${PLIST.introspection}bin/hb-info
33
${PLIST.introspection}bin/hb-shape
44
${PLIST.introspection}bin/hb-subset
5+
${PLIST.introspection}bin/hb-vector
56
include/harfbuzz/hb-aat-layout.h
67
include/harfbuzz/hb-aat.h
78
include/harfbuzz/hb-blob.h
@@ -33,6 +34,7 @@ include/harfbuzz/hb-ot-shape.h
3334
include/harfbuzz/hb-ot-var.h
3435
include/harfbuzz/hb-ot.h
3536
include/harfbuzz/hb-paint.h
37+
include/harfbuzz/hb-raster.h
3638
include/harfbuzz/hb-script-list.h
3739
include/harfbuzz/hb-set.h
3840
include/harfbuzz/hb-shape-plan.h
@@ -41,21 +43,30 @@ include/harfbuzz/hb-style.h
4143
include/harfbuzz/hb-subset-serialize.h
4244
include/harfbuzz/hb-subset.h
4345
include/harfbuzz/hb-unicode.h
46+
include/harfbuzz/hb-vector.h
4447
include/harfbuzz/hb-version.h
4548
include/harfbuzz/hb.h
4649
lib/cmake/harfbuzz/harfbuzz-config.cmake
4750
${PLIST.introspection}lib/girepository-1.0/HarfBuzz-0.0.typelib
4851
${PLIST.introspection}lib/libharfbuzz-gobject.so
4952
${PLIST.introspection}lib/libharfbuzz-gobject.so.0
5053
${PLIST.introspection}lib/libharfbuzz-gobject.so.0.${SOVER}.0
54+
lib/libharfbuzz-raster.so
55+
lib/libharfbuzz-raster.so.0
56+
lib/libharfbuzz-raster.so.0.${SOVER}.0
5157
lib/libharfbuzz-subset.so
5258
lib/libharfbuzz-subset.so.0
5359
lib/libharfbuzz-subset.so.0.${SOVER}.0
60+
lib/libharfbuzz-vector.so
61+
lib/libharfbuzz-vector.so.0
62+
lib/libharfbuzz-vector.so.0.${SOVER}.0
5463
lib/libharfbuzz.so
5564
lib/libharfbuzz.so.0
5665
lib/libharfbuzz.so.0.${SOVER}.0
5766
${PLIST.introspection}lib/pkgconfig/harfbuzz-gobject.pc
67+
lib/pkgconfig/harfbuzz-raster.pc
5868
lib/pkgconfig/harfbuzz-subset.pc
69+
lib/pkgconfig/harfbuzz-vector.pc
5970
lib/pkgconfig/harfbuzz.pc
6071
${PLIST.introspection}share/gir-1.0/HarfBuzz-0.0.gir
6172
${PLIST.doc}share/gtk-doc/html/harfbuzz/HarfBuzz.png

fonts/harfbuzz/distinfo

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
$NetBSD: distinfo,v 1.167 2026/01/25 08:03:35 adam Exp $
1+
$NetBSD: distinfo,v 1.168 2026/03/10 05:58:05 wiz Exp $
22

3-
BLAKE2s (harfbuzz-12.3.2.tar.xz) = ec24aa0eadd94ffae4890ce42f7840b72947f8ff5355a167bbe93203b4dd1f76
4-
SHA512 (harfbuzz-12.3.2.tar.xz) = 2bb907d206edb93a9fb0856dc2e767d491f79f20cd8e8eeeb65f284f10b67ca9ae16b6a8e72ebbfedfeaa0199af7c12dbe675eb08b7c1fb61d2f5ca1fa406782
5-
Size (harfbuzz-12.3.2.tar.xz) = 19282952 bytes
3+
BLAKE2s (harfbuzz-13.0.1.tar.xz) = 6cc65ffd1ec2b8feb7f7115828c118dff5d3f38a13cc7e460d2f0f1170ddf4c8
4+
SHA512 (harfbuzz-13.0.1.tar.xz) = edc856198fc7ed49133d9cc978c70de371c5076f67e28a4fa51be2f0651031ef108967deefb29a0116f1de8a9316c6a686f039726d4dbae84d295461a24fdc90
5+
Size (harfbuzz-13.0.1.tar.xz) = 19426688 bytes
6+
SHA1 (patch-src_hb-raster-svg-base.hh) = ebf5e0a71d20713081776641c80bae6090606c9e
7+
SHA1 (patch-src_hb-raster-svg-clip.cc) = 7bd89fc7e88cc48dc50a5331078b982281764524
8+
SHA1 (patch-src_hb-raster-svg-fill.cc) = f413b7f2aedf91873967ee7dd9d4adaaa4b25cc2
9+
SHA1 (patch-src_hb-raster-svg-parse.cc) = a1c734cc665b0ac0e4e88fa65390962a6e04d75e
10+
SHA1 (patch-src_hb-raster-svg-parse.hh) = fa0771ef3c08f853da0de1ccd2c4d8f2575d8cde
11+
SHA1 (patch-src_hb-vector-svg-utils.hh) = 25784ce6de206ce6bee9e22c675e9b982171d09a
612
SHA1 (patch-src_meson.build) = 5b46f9933d5dea1f842fccf63eb92faae1f7c90f
713
SHA1 (patch-util_meson.build) = 50c5146c723a734ee42609dcc384de0feb46369e
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-src_hb-raster-svg-base.hh,v 1.1 2026/03/10 05:58:05 wiz Exp $
2+
3+
error: 'isfinite' was not declared in this scope; did you mean 'std::isfinite'?
4+
https://github.com/harfbuzz/harfbuzz/issues/5806
5+
6+
--- src/hb-raster-svg-base.hh.orig 2026-03-09 18:01:41.975035791 +0000
7+
+++ src/hb-raster-svg-base.hh
8+
@@ -92,7 +92,7 @@ struct hb_svg_str_t
9+
memcpy (buf, data, n);
10+
buf[n] = '\0';
11+
float v = strtof (buf, nullptr);
12+
- return isfinite (v) ? v : 0.f;
13+
+ return std::isfinite (v) ? v : 0.f;
14+
}
15+
16+
hb_svg_str_t trim_left () const
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-src_hb-raster-svg-clip.cc,v 1.1 2026/03/10 05:58:05 wiz Exp $
2+
3+
error: 'isfinite' was not declared in this scope; did you mean 'std::isfinite'?
4+
https://github.com/harfbuzz/harfbuzz/issues/5806
5+
6+
--- src/hb-raster-svg-clip.cc.orig 2026-03-09 18:03:15.704619086 +0000
7+
+++ src/hb-raster-svg-clip.cc
8+
@@ -529,7 +529,7 @@ hb_raster_svg_push_clip_path_ref (hb_raster_paint_t *p
9+
return false;
10+
float w = object_bbox->xmax - object_bbox->xmin;
11+
float h = object_bbox->ymax - object_bbox->ymin;
12+
- if (!(isfinite (w) && isfinite (h)) || w <= 0.f || h <= 0.f)
13+
+ if (!(std::isfinite (w) && std::isfinite (h)) || w <= 0.f || h <= 0.f)
14+
return false;
15+
ed.has_bbox_transform = true;
16+
ed.bbox_transform = hb_transform_t<> (w, 0, 0, h, object_bbox->xmin, object_bbox->ymin);
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
$NetBSD: patch-src_hb-raster-svg-fill.cc,v 1.1 2026/03/10 05:58:05 wiz Exp $
2+
3+
error: 'isfinite' was not declared in this scope; did you mean 'std::isfinite'?
4+
https://github.com/harfbuzz/harfbuzz/issues/5806
5+
6+
--- src/hb-raster-svg-fill.cc.orig 2026-03-09 18:02:43.345394456 +0000
7+
+++ src/hb-raster-svg-fill.cc
8+
@@ -224,7 +224,7 @@ hb_raster_svg_emit_fill (const hb_svg_fill_context_t *
9+
{
10+
float w = object_bbox->xmax - object_bbox->xmin;
11+
float h = object_bbox->ymax - object_bbox->ymin;
12+
- if (isfinite (w) && isfinite (h) && w > 0.f && h > 0.f)
13+
+ if (std::isfinite (w) && std::isfinite (h) && w > 0.f && h > 0.f)
14+
hb_paint_push_transform (ctx->pfuncs, ctx->paint, w, 0, 0, h, object_bbox->xmin, object_bbox->ymin);
15+
else
16+
has_bbox_transform = false;
17+
@@ -249,7 +249,7 @@ hb_raster_svg_emit_fill (const hb_svg_fill_context_t *
18+
}
19+
else
20+
{
21+
- if (!isfinite (effective.r) || effective.r < 0.f)
22+
+ if (!std::isfinite (effective.r) || effective.r < 0.f)
23+
{
24+
if (effective.has_gradient_transform)
25+
hb_paint_pop_transform (ctx->pfuncs, ctx->paint);
26+
@@ -263,7 +263,7 @@ hb_raster_svg_emit_fill (const hb_svg_fill_context_t *
27+
float fx = effective.has_fx ? effective.fx : effective.cx;
28+
float fy = effective.has_fy ? effective.fy : effective.cy;
29+
float fr = effective.has_fr ? effective.fr : 0.f;
30+
- if (!isfinite (fr) || fr < 0.f)
31+
+ if (!std::isfinite (fr) || fr < 0.f)
32+
fr = 0.f;
33+
fr = hb_min (fr, effective.r);
34+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-src_hb-raster-svg-parse.cc,v 1.1 2026/03/10 05:58:05 wiz Exp $
2+
3+
error: 'isfinite' was not declared in this scope; did you mean 'std::isfinite'?
4+
https://github.com/harfbuzz/harfbuzz/issues/5806
5+
6+
--- src/hb-raster-svg-parse.cc.orig 2026-03-09 18:03:02.855356965 +0000
7+
+++ src/hb-raster-svg-parse.cc
8+
@@ -216,7 +216,7 @@ svg_arc_endpoint_to_center (float x1, float y1, float
9+
auto angle = [] (float ux, float uy, float vx, float vy) -> float {
10+
float dot = ux * vx + uy * vy;
11+
float len = sqrtf ((ux * ux + uy * uy) * (vx * vx + vy * vy));
12+
- if (!(len > 0.f) || !isfinite (len))
13+
+ if (!(len > 0.f) || !std::isfinite (len))
14+
return 0.f;
15+
float a = acosf (hb_clamp (dot / len, -1.f, 1.f));
16+
if (ux * vy - uy * vx < 0.f) a = -a;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-src_hb-raster-svg-parse.hh,v 1.1 2026/03/10 05:58:05 wiz Exp $
2+
3+
error: 'isfinite' was not declared in this scope; did you mean 'std::isfinite'?
4+
https://github.com/harfbuzz/harfbuzz/issues/5806
5+
6+
--- src/hb-raster-svg-parse.hh.orig 2026-03-09 18:01:56.805896259 +0000
7+
+++ src/hb-raster-svg-parse.hh
8+
@@ -320,7 +320,7 @@ struct hb_svg_float_parser_t
9+
}
10+
buf[n] = '\0';
11+
float v = strtof (buf, nullptr);
12+
- return isfinite (v) ? v : 0.f;
13+
+ return std::isfinite (v) ? v : 0.f;
14+
}
15+
16+
bool next_flag ()
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-src_hb-vector-svg-utils.hh,v 1.1 2026/03/10 05:58:05 wiz Exp $
2+
3+
error: 'isfinite' was not declared in this scope; did you mean 'std::isfinite'?
4+
https://github.com/harfbuzz/harfbuzz/issues/5806
5+
6+
--- src/hb-vector-svg-utils.hh.orig 2026-03-09 18:02:17.366055055 +0000
7+
+++ src/hb-vector-svg-utils.hh
8+
@@ -80,7 +80,7 @@ hb_svg_append_num (hb_vector_t<char> *buf,
9+
if (fabsf (v) < rounded_zero_threshold)
10+
v = 0.f;
11+
12+
- if (!(v == v) || !isfinite (v))
13+
+ if (!(v == v) || !std::isfinite (v))
14+
{
15+
hb_svg_append_c (buf, '0');
16+
return;

0 commit comments

Comments
 (0)