Make FontSystem not self-referencing
This commit is contained in:
parent
0548d7ae59
commit
506a4194be
10 changed files with 206 additions and 175 deletions
|
|
@ -20,10 +20,10 @@ fn swash_image(
|
|||
context: &mut ScaleContext,
|
||||
cache_key: CacheKey,
|
||||
) -> Option<SwashImage> {
|
||||
let font = match font_system.get_font(cache_key.font_id) {
|
||||
let font = match font_system.get_font(cache_key.font_key) {
|
||||
Some(some) => some,
|
||||
None => {
|
||||
log::warn!("did not find font {:?}", cache_key.font_id);
|
||||
log::warn!("did not find font {:?}", cache_key.font_key.id);
|
||||
return None;
|
||||
}
|
||||
};
|
||||
|
|
@ -63,10 +63,10 @@ fn swash_outline_commands(
|
|||
) -> Option<Vec<swash::zeno::Command>> {
|
||||
use swash::zeno::PathData as _;
|
||||
|
||||
let font = match font_system.get_font(cache_key.font_id) {
|
||||
let font = match font_system.get_font(cache_key.font_key) {
|
||||
Some(some) => some,
|
||||
None => {
|
||||
log::warn!("did not find font {:?}", cache_key.font_id);
|
||||
log::warn!("did not find font {:?}", cache_key.font_key.id);
|
||||
return None;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue