Replace magic boolean with new Hinting enum

This commit is contained in:
Héctor Ramón Jiménez 2025-11-23 20:43:33 +01:00 committed by Jeremy Soller
parent 48eda6bd7d
commit d779057d9c
16 changed files with 96 additions and 50 deletions

View file

@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
use cosmic_text::{
Action, Attrs, Buffer, Edit, Family, FontSystem, Metrics, Motion, SwashCache, SyntaxEditor,
SyntaxSystem,
Action, Attrs, Buffer, Edit, Family, FontSystem, Hinting, Metrics, Motion, SwashCache,
SyntaxEditor, SyntaxSystem,
};
use std::{env, fs, num::NonZeroU32, rc::Rc, slice};
use tiny_skia::{Paint, PixmapMut, Rect, Transform};
@ -45,7 +45,7 @@ fn main() {
Buffer::new(
&mut font_system,
font_sizes[font_size_i].scale(display_scale),
false,
Hinting::Disabled,
),
&syntax_system,
"base16-eighties.dark",