mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-18 00:15:44 +00:00
Fix hinting tests and imports after merging upstream/main
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cfa99b45ce
commit
71aa12c076
2 files changed
+5
-3
No files matched your search
@@ -7,7 +7,9 @@ use std::sync::{Arc, Mutex, RwLock};
|
||||
|
||||
use kurbo::BezPath;
|
||||
use skrifa::instance::{Location, LocationRef, Size};
|
||||
use skrifa::outline::{DrawSettings, Engine, GlyphStyles, Hinting, HintingInstance, HintingOptions, OutlineGlyphFormat, OutlinePen, SmoothMode, Target};
|
||||
use skrifa::outline::{
|
||||
DrawSettings, Engine, GlyphStyles, Hinting, HintingInstance, HintingOptions, OutlineGlyphFormat, OutlinePen, SmoothMode, Target,
|
||||
};
|
||||
use skrifa::raw::FileRef;
|
||||
use skrifa::string::StringId;
|
||||
use skrifa::{GlyphId, MetadataProvider};
|
||||
|
||||
@@ -436,9 +436,9 @@ fn screen_hinting_runs_a_tricky_fonts_instructions_with_the_monochrome_target()
|
||||
let ppem = 11.0 * 96.0 / 72.0 * 1.45;
|
||||
let drawn = |target: Target, gid: u32| {
|
||||
let h = HintingInstance::new(&outlines, Size::new(ppem), face.location(), HintingOptions { engine: Engine::Interpreter, target }).unwrap();
|
||||
let mut pen = FlipPen(BezPath::new());
|
||||
let mut pen = FlipPen { path: BezPath::new(), room: usize::MAX, over: false };
|
||||
outlines.get(GlyphId::new(gid)).unwrap().draw(DrawSettings::hinted(&h, false), &mut pen).unwrap();
|
||||
pen.0
|
||||
pen.path
|
||||
};
|
||||
// The target decides whether the instructions may move points sideways (the light target's
|
||||
// backward compatibility forbids it): this font's instructions only move points vertically,
|
||||
|
||||
Reference in new issue
Block a user