From 6ba28949f5cc80553998a1dd244a782ea2b4f18c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 5 Feb 2026 15:24:53 -0700 Subject: [PATCH] [rust] Use HarfBuzz-style glyph outline Slightly slower, but matches our point order better. --- src/rust/font.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rust/font.rs b/src/rust/font.rs index 579219ac3..ddec6efca 100644 --- a/src/rust/font.rs +++ b/src/rust/font.rs @@ -15,7 +15,7 @@ use skrifa::color::{ use skrifa::font::FontRef; use skrifa::instance::{Location, NormalizedCoord, Size}; use skrifa::metrics::{BoundingBox, GlyphMetrics}; -use skrifa::outline::pen::OutlinePen; +use skrifa::outline::pen::{OutlinePen, PathStyle}; use skrifa::outline::DrawSettings; use skrifa::raw::tables::cpal::ColorRecord; use skrifa::raw::tables::vmtx::Vmtx; @@ -521,7 +521,8 @@ extern "C" fn _hb_fontations_draw_glyph_or_fail( let Some(outline_glyph) = outline_glyphs.get(glyph_id) else { return false as hb_bool_t; }; - let draw_settings = DrawSettings::unhinted(*size, location); + let draw_settings = DrawSettings::unhinted(*size, location) + .with_path_style(PathStyle::HarfBuzz); let mut draw_state = unsafe { std::mem::zeroed::() };