Add set_hinting method to Buffer

This commit is contained in:
Héctor Ramón Jiménez 2025-11-27 23:18:30 +01:00 committed by Jeremy Soller
parent d779057d9c
commit a07a619054
14 changed files with 54 additions and 48 deletions

View file

@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
use cosmic_text::{
Action, Attrs, Buffer, Edit, Family, FontSystem, Hinting, Metrics, Scroll, Shaping, SwashCache,
Action, Attrs, Buffer, Edit, Family, FontSystem, Metrics, Scroll, Shaping, SwashCache,
};
use std::{collections::HashMap, env, fs, num::NonZeroU32, rc::Rc, slice};
use tiny_skia::{Color, Paint, PixmapMut, Rect, Transform};
@ -25,7 +25,7 @@ fn main() {
let mut swash_cache = SwashCache::new();
let mut buffer = Buffer::new_empty(Metrics::new(14.0, 20.0), Hinting::Disabled);
let mut buffer = Buffer::new_empty(Metrics::new(14.0, 20.0));
let mut buffer = buffer.borrow_with(&mut font_system);