14.3.1
- Various fuzzing and build fixes.
- Various subsetting fixes.
- Fix AAT insertion at the end of the text.
- Fix various rendering bugs in the experimental GPU library.
- WASM shaper code can now read the user features.
14.3.0
-
Changes affecting shaping output:
- Lookup order is now respected for mark positioning in the cross-direction (y in horizontal text, x in vertical text): marks no longer follow a cross-direction shift that a later lookup applies to the base. This improves compatibility with DirectWrite and Core Text.
- Fix mark attachment to ligatures formed from decomposed glyphs.
- The
caltfeature in Hangul text is now disabled only for the Jamos, not the whole buffer.
-
Support for partially instancing version of
avartable, as well asCFF2table. -
New fill-glyph paint operation and APIs for the common case of filling a glyph with a solid color.
-
New API to fetch assorted raw values from the
OS/2,head, andposttables. -
New experimental API to extract a font’s glyph dependency graph, that applications can use to compute glyph closures themselves without running the subsetter.
-
New subset flag to convert the charset of a subsetted CID-keyed
CFFfonts into identity charset, and a matchinghb-subsetoption. Useful for embedding fonts in PDF. -
Command-line utilities now handle non-ASCII arguments correctly on Windows.
-
Various instancing and subsetting fixes.
-
Various fixes to the experimental
harfbuzz-vector,harfbuzz-rasterandharfbuzz-gpulibraries. -
Various improvements to the HarfRust integration shaper.
-
Various build, CI, portability, and fuzzing fixes.
-
New API:
-
OpenType:
+HB_OT_BITS_TAG_FS_TYPE
+HB_OT_BITS_TAG_FS_SELECTION
+HB_OT_BITS_TAG_MAC_STYLE
+HB_OT_BITS_TAG_IS_FIXED_PITCH
+HB_OT_BITS_TAG_UNICODE_RANGE_1
+HB_OT_BITS_TAG_UNICODE_RANGE_2
+HB_OT_BITS_TAG_UNICODE_RANGE_3
+HB_OT_BITS_TAG_UNICODE_RANGE_4
+HB_OT_BITS_TAG_CODE_PAGE_RANGE_1
+HB_OT_BITS_TAG_CODE_PAGE_RANGE_2
+HB_OT_NUMBER_TAG_FONT_X_MIN
+HB_OT_NUMBER_TAG_FONT_Y_MIN
+HB_OT_NUMBER_TAG_FONT_X_MAX
+HB_OT_NUMBER_TAG_FONT_Y_MAX
+hb_ot_bits_tag_t
+hb_ot_fetch_bits()
+hb_ot_number_tag_t
+hb_ot_fetch_number() -
Paint:
+hb_paint_fill_glyph_func_t
+hb_paint_fill_glyph()
+hb_paint_funcs_set_fill_glyph_func() -
Subset library:
+HB_SUBSET_FLAGS_CFF_IDENTITY_CHARSET
-
14.2.1
- Various AAT shaping fixes: legacy
mortcontextual offsets (which could produce out-of-font glyph IDs), in-place deleted-glyph replacements, and overflow in obsolete offset math. - Fix Arabic PUA fallback shaping for the isolated lam-alef-maksura ligature.
- Fix float-to-int overflow in
avar2mapping with malformed fonts. - Harden buffer verification after detecting non-monotone clusters.
- Various
COLRv1 fixes: fix handling of.notdefwithout paint, round alpha consistently, and report the root clip under the font transform. - Various Glyph-extents fixes: inclusive rounding, and floating-point scaling before rounding so the reported box always covers the glyph.
- Various Subsetting fixes: keep the
paltspacing feature by default, raise the repackerMAX_SPACESlimit, fix a repacker crash on sharedLigatureSetnodes, guardgvarsize overflow on 32-bit, and fix thepostglyph-name sort comparator on macOS. - Replace
std::sortwith an internal quicksort, removing leakedstd::symbols from thelibharfbuzzABI. - Harden size computations with saturating arithmetic against 32-bit overflow.
- Various improvements to the experimental Rust shaper (HarfRust) and font functions (
fontations): honor custom font funcs, key shape plans on features, faster buffer handling, and update to HarfRust 0.8. - Various fixes to the experimental
harfbuzz-gpuandharfbuzz-vectorlibraries, including aharfbuzz-vectorheap buffer overflow and Windows build fixes. - Map the
Hrkt(Katakana or Hiragana) script tag to thekanaOpenType tag. - Build configuration: new
HB_CONFIG_OVERRIDE_LAST_Hoverride header, decoupleHB_NO_DRAWfromHB_NO_CFF, and an optionalhb-allocatorCargo feature. - Various build, CI, and fuzzing fixes.
14.2.0
In this release, the experimental raster, vector, and GPU libraries went through several rounds of code review and cleanup to make sure they follow the high standards expected of HarfBuzz code. The API has also been extensively reviewed based on experience gained from using these libraries. We consider the code and API to be ready for stabilization, and we expect to graduate them from experimental in the near future. If you are using or planning to use these libraries and have any concerns about the API, it is time to raise them. Once a library is deemed stable, we will never change the API or ABI in an incompatible way.
-
GPU library:
- New color-glyph paint renderer, based on design by Lê Duy Quang.
hb_gpu_paint_twalks a font's paint tree (COLRv0 or COLRv1) and encodes its layers (solid fills, linear / radial / sweep gradients, transforms, composite groups) into a compact blob.
A new fragment-shader functionhb_gpu_paint()renders the blob in premultiplied RGBA; monochrome glyphs are handled transparently via a synthesized foreground-colored layer.
Shader sources provided in GLSL, WGSL, MSL, and HLSL. - Paint encoder limitations: the encoder sets
unsupportedand returnsNULLwhennum_opswould exceed 32767,push_groupnests deeper than 4, or the paint tree calls back through the image callback (PaintImage).
Nested glyph clips are intersected up to 3 levels; a few composite modes use approximate fallbacks;push_clip_rectangleis silently ignored. - Encode entry point now returns extents and auto-clears the encoder; the standalone
get_extents()is gone. - Gradient color stop interpolation now happens in premultiplied space per the OpenType COLR specification.
- The foreground color sentinel (
is_foreground) now correctly preserves the paint-tree alpha from the encoded color data instead of discarding it. - The hb-gpu utility gains
--draw/--paintflags with per-font auto-detect, and--output-file/-ofor headless single-frame rendering to a PPM image.
- New color-glyph paint renderer, based on design by Lê Duy Quang.
-
Vector library:
- New PDF output backend. Vector paint glyphs now render to PDF page content, producing scalable COLRv0 / COLRv1 color-glyph artwork (solid fills, linear / radial / sweep gradients, blend modes, PNG images with transparency) that can be embedded directly in PDF documents. Useful for PDF producers such as LibreOffice that want crisp, resolution-independent color emoji.
- New SVG id prefix API on paint allows prefixing document references, which allows for embedding multiple SVGs in the same page without name clashes (
hb_vector_paint_set_svg_prefix). - Removed glyph path dedup from vector draw and paint. Each glyph is emitted inline; no
<defs>/<use>caching. _glyph()functions are now thin convenience wrappers documented as equivalent expansions of the underlying font draw/paint API.- Drop glyph-source rendering of SVG-in-OT fonts.
-
Raster library:
- Drop glyph-source rendering of SVG-in-OT fonts.
-
Across Draw / Paint subsystems:
_reset()methods gain matching_clear()companions that drop accumulated data while preserving user configuration. Getter companions added for setters across raster, vector, and gpu types.
-
Various fuzzer fixes for raster, vector, and GPU libraries.
-
Paint API:
- New arbitrary-path clip:
hb_paint_push_clip_path_start/_endlet callers clip to a caller-supplied outline, not just a font glyph.push_clip_path_start()returns the draw-funcs (and matching draw data) for the backend’s path accumulator; the caller driveshb_draw_*()into it, then callspush_clip_path_end(), followed by painted ops, thenhb_paint_pop_clip()to release the clip. Implemented for all paint backends: vector (SVG defs + clipPath + url ref), vector PDF (q / path / W n), raster (path rendered to an alpha mask, intersected with the current clip), and GPU (the path is encoded into a Slug sub-blob so the fragment shader clips against it the same way it clips against glyph outlines).
- New arbitrary-path clip:
-
Shaping:
- Indic: categorize U+1CF5 and U+1CF6 as CS.
-
Changed API
-
GPU library:
hb_gpu_draw_glyph()now returnsvoid(washb_bool_t). Usehb_gpu_draw_glyph_or_fail()if you need the success status.hb_gpu_paint_glyph()now returnsvoid(washb_bool_t) and internally synthesizes a foreground-colored layer for non-color glyphs viahb_font_paint_glyph(), so every glyph with an outline produces output. Usehb_gpu_paint_glyph_or_fail()(which delegates tohb_font_paint_glyph_or_fail()) if you need to distinguish color vs synthesized paint. Encoder-level limits (unsupported ops, group-stack overflow) no longer fail paint_glyph; they surface fromhb_gpu_paint_encode()returningNULL.hb_gpu_draw_encode()now takes anextentsout-parameter and auto-clears the encoder on return.hb_gpu_draw_darken()renamed tohb_gpu_stem_darken().
-
Vector library:
hb_vector_svg_set_precision()and its paint counterpart renamed tohb_vector_draw_set_precision()/hb_vector_paint_set_precision()(SVG-specific naming is inaccurate with the PDF backend added).hb_vector_draw_glyph()/hb_vector_paint_glyph()now returnvoid(werehb_bool_t). Paint additionally gains a draw fallback for non-color glyphs. Use the matching_or_fail()variants for thehb_bool_treturn.
-
Raster library:
hb_raster_draw_glyph()/hb_raster_paint_glyph()now returnvoid(werehb_bool_t). Paint additionally gains a draw fallback for non-color glyphs. Use the matching_or_fail()variants for thehb_bool_treturn.
-
General:
- Many read-only getters gained const on their object argument.
- Six public draw / paint funcs getters across raster, vector, and gpu now take a const-pointer to the relevant context instance instead of being singletons:
hb_raster_draw_get_funcs (const hb_raster_draw_t *)`
hb_raster_paint_get_funcs (const hb_raster_paint_t *)
hb_vector_draw_get_funcs (const hb_vector_draw_t *)
hb_vector_paint_get_funcs (const hb_vector_paint_t *)
hb_gpu_draw_get_funcs (const hb_gpu_draw_t *)
hb_gpu_paint_get_funcs (const hb_gpu_paint_t *)
This is what lets vector_paint dispatch to SVG- vs PDF- flavored callbacks transparently when called from outside code; the others currently use the instance for symmetry only.
-
-
New API
-
Draw:
+HB_DRAW_LINE_CAP_BUTT
+HB_DRAW_LINE_CAP_ROUND
+HB_DRAW_LINE_CAP_SQUARE
+hb_draw_line_cap_t
+hb_draw_line()
+hb_draw_rectangle()
+hb_draw_circle() -
Paint:
+hb_paint_push_clip_path_start_func_t
+hb_paint_push_clip_path_end_func_t
+hb_paint_sweep_gradient_tile_func_t
+hb_paint_push_group_for_func_t
+hb_paint_push_group_for()
+hb_paint_funcs_set_push_group_for_func()
+hb_paint_reduce_linear_anchors()
+hb_paint_normalize_color_line()
+hb_paint_sweep_gradient_tiles()
+hb_paint_push_clip_path_start()
+hb_paint_push_clip_path_end()
+hb_paint_funcs_set_push_clip_path_start_func()
+hb_paint_funcs_set_push_clip_path_end_func() -
GPU library:
+HB_GPU_SHADER_STAGE_VERTEX
+HB_GPU_SHADER_STAGE_FRAGMENT
+HB_GPU_SHADER_LANG_INVALID
+hb_gpu_shader_stage_t
+hb_gpu_paint_t
+hb_gpu_paint_create_or_fail()
+hb_gpu_paint_reference()
+hb_gpu_paint_destroy()
+hb_gpu_paint_set_user_data()
+hb_gpu_paint_get_user_data()
+hb_gpu_paint_get_funcs()
+hb_gpu_paint_set_palette()
+hb_gpu_paint_get_palette()
+hb_gpu_paint_set_custom_palette_color()
+hb_gpu_paint_clear_custom_palette_colors()
+hb_gpu_paint_set_scale()
+hb_gpu_paint_get_scale()
+hb_gpu_paint_glyph()
+hb_gpu_paint_encode()
+hb_gpu_paint_clear()
+hb_gpu_paint_reset()
+hb_gpu_paint_recycle_blob()
+hb_gpu_paint_shader_source()
+hb_gpu_paint_glyph_or_fail()
+hb_gpu_shader_source()
+hb_gpu_draw_shader_source()
+hb_gpu_draw_clear()
+hb_gpu_draw_get_scale()
+hb_gpu_draw_glyph_or_fail() -
Raster library:
+hb_raster_draw_clear()
+hb_raster_draw_glyph_or_fail()
+hb_raster_paint_clear()
+hb_raster_paint_glyph_or_fail()
+hb_raster_paint_set_palette()
+hb_raster_paint_get_palette()
+hb_raster_paint_get_foreground()
+hb_raster_paint_set_background()
+hb_raster_paint_get_background() -
Vector library:
+HB_VECTOR_FORMAT_PDF
+hb_vector_draw_clear()
+hb_vector_draw_get_precision()
+hb_vector_draw_get_format()
+hb_vector_draw_glyph_or_fail()
+hb_vector_draw_new_path()
+hb_vector_draw_set_foreground()
+hb_vector_draw_get_foreground()
+hb_vector_draw_set_background()
+hb_vector_draw_get_background()
+hb_vector_paint_clear()
+hb_vector_paint_get_precision()
+hb_vector_paint_get_format()
+hb_vector_paint_get_foreground()
+hb_vector_paint_set_background()
+hb_vector_paint_get_background()
+hb_vector_paint_get_palette()
+hb_vector_paint_glyph_or_fail()
+hb_vector_paint_set_svg_prefix()
+hb_vector_paint_get_svg_prefix()
-
-
Removed API
-
GPU library:
-hb_gpu_shader_fragment_source() (replaced by hb_gpu_shader_source(stage))
-hb_gpu_shader_vertex_source() (replaced by hb_gpu_shader_source(stage))
-hb_gpu_draw_get_extents() (extents are now an out-parameter of hb_gpu_draw_encode()) -
Vector library:
-hb_vector_draw_set_flat()
-hb_vector_draw_get_flat()
-hb_vector_paint_set_flat()
-hb_vector_paint_get_flat()
-
14.1.0
- GPU library improvements:
- Add anti-aliased rendering for small sizes.
- Store font scale in blob header.
- Port scale/ppem support to MSL, WGSL, and HLSL shaders.
- Fix contour breaks and bounds quantization in encode.
- Fix garbled rendering after font change in web demo.
- Various robustness fixes.
- Various fuzzing fixes for
harfbuzz-raster,harfbuzz-gpuandharfbuzz-vectorlibraries. - Move
HB_NO_CFFfromHB_LEANtoHB_NO_DRAWclosure, and fixHB_TINYbuild. - New API:
+hb_gpu_draw_set_scale()
14.0.0
- New
libharfbuzz-gpulibrary: GPU text rasterization based on the Slug algorithm by Eric Lengyel. Encodes glyph outlines on the CPU into compact blobs that the GPU decodes and rasterizes directly in the fragment shader, with no intermediate bitmap atlas.
Shader sources provided in GLSL, WGSL, MSL, and HLSL.
Newhb-gpuinstalled utility for interactive GPU text rendering.
Live web demo: https://harfbuzz.github.io/hb-gpu-demo/ - New
harfbuzz-world.ccamalgamated source for building a subset of all HarfBuzz libraries into one compilation unit, driven by a customhb-features.h. - Updated README with libraries overview and project description.
- Various bug fixes.
- New API:
- hb_gpu_draw_t
- hb_gpu_draw_create_or_fail()
- hb_gpu_draw_reference()
- hb_gpu_draw_destroy()
- hb_gpu_draw_set_user_data()
- hb_gpu_draw_get_user_data()
- hb_gpu_draw_get_funcs()
- hb_gpu_draw_glyph()
- hb_gpu_draw_encode()
- hb_gpu_draw_get_extents()
- hb_gpu_draw_reset()
- hb_gpu_draw_recycle_blob()
- hb_gpu_shader_lang_t
- hb_gpu_shader_fragment_source()
- hb_gpu_shader_vertex_source()
13.2.1
- Fix regression in tracing messages from previous release.
13.2.0
- Fix
hb-viewglyph positioning with--glyphsinput fromhb-shape --ned. - Various fuzzing fixes for
harfbuzz-subset,harfbuzz-rasterandharfbuzz-vectorlibraries. - Various improvements to tracing messages.
- Various documentation improvements.
- New API:
- HB_OT_SHAPE_BUFFER_FORMAT_SERIAL
- hb_ot_shape_get_buffer_format_serial()
13.1.1
- Support gzip-compressed
SVGglyphs inharfbuzz-rasterandharfbuzz-vectorlibraries. This new functionality requireszlib, and will not be available if HarfBuzz is built withoutzlib. - Improve handling of
SVGglyphs inharfbuzz-rasterandharfbuzz-vectorlibraries. - Further harden application of
stchfeature against malicious fonts. - Various fuzzing fixes.
- Various build fixes:
- Add missing
chafadependency tohb-rasterutility, and remove accidentalcairodependency. - Don’t build raster and vector fuzzers if the library is disabled.
- Add meson options for enabling / disabling
libpngandzlib. - Support building
harfbuzz-rasterandharfbuzz-vectorlibraries with CMake.
- Add missing
13.1.0
- The
harfbuzz-rasterlibrary can now render bitmap color glyph formats (CBDTandsbix). It now also has an API to serialize / deserialize images to and from PNGs. This new functionality requireslibpng, and will not be available if HarfBuzz is built withoutlibpng. - Install
hb-rastercommand line utility. - Fix overflow when applying
stchfeature with malicious fonts. - Fix memory leaks in
harfbuzz-rasterandharfbuzz-vectorin error conditions, as well as more robust handling of allocation failures. - Various documentation improvements and build fixes.
- New API:
+hb_raster_image_serialize_to_png_or_fail()
+hb_raster_image_deserialize_from_png_or_fail()