mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Upgrade to fontdue 0.8
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
This commit is contained in:
parent
3e71d1b559
commit
607bdbfcf8
5 changed files with 14 additions and 5 deletions
|
@ -58,7 +58,7 @@ linked_hash_set = "0.1.4"
|
|||
image = { version = "0.24", optional = true }
|
||||
resvg = { workspace = true, optional = true }
|
||||
# font embedding
|
||||
fontdue = { version = "0.7.1", optional = true }
|
||||
fontdue = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
i-slint-parser-test-macro = { path = "./parser-test-macro" }
|
||||
|
|
|
@ -200,7 +200,7 @@ fn embed_glyphs_with_fontdb<'a>(
|
|||
fontdb.with_face_data(face_id, |font_data, face_index| {
|
||||
let fontdue_font = match fontdue::Font::from_bytes(
|
||||
font_data,
|
||||
fontdue::FontSettings { collection_index: face_index, scale: 40. },
|
||||
fontdue::FontSettings { collection_index: face_index, scale: 40., ..Default::default() },
|
||||
) {
|
||||
Ok(fontdue_font) => fontdue_font,
|
||||
Err(fontdue_msg) => {
|
||||
|
@ -321,7 +321,11 @@ fn get_fallback_fonts(fontdb: &sharedfontdb::FontDatabase) -> Vec<fontdue::Font>
|
|||
.with_face_data(face_id, |face_data, face_index| {
|
||||
fontdue::Font::from_bytes(
|
||||
face_data,
|
||||
fontdue::FontSettings { collection_index: face_index, scale: 40. },
|
||||
fontdue::FontSettings {
|
||||
collection_index: face_index,
|
||||
scale: 40.,
|
||||
..Default::default()
|
||||
},
|
||||
)
|
||||
.ok()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue