Skip to content

Commit a5e3275

Browse files
Make FontConfig code compile.
1 parent cc45597 commit a5e3275

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fontique/src/backend/fontconfig/cache.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// Copyright 2024 the Parley Authors
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

4-
use super::{Stretch, Style, Weight};
4+
use styled_text::{Stretch, Style, Weight};
55
use fontconfig_cache_parser::{Cache, CharSetLeaf, Object, Pattern, Value};
66
use std::io::Read;
77
use std::path::PathBuf;
88

9+
// FIXME(style): There's an argument for putting this into styled_text
910
fn stretch_from_fc(width: i32) -> Stretch {
1011
match width {
1112
63 => Stretch::EXTRA_CONDENSED,
@@ -15,6 +16,7 @@ fn stretch_from_fc(width: i32) -> Stretch {
1516
}
1617
}
1718

19+
// FIXME(style): There's an argument for putting this into styled_text
1820
fn style_from_fc(slant: i32) -> Style {
1921
match slant {
2022
100 => Style::Italic,
@@ -23,6 +25,7 @@ fn style_from_fc(slant: i32) -> Style {
2325
}
2426
}
2527

28+
// FIXME(style): There's an argument for putting this into styled_text
2629
fn weight_from_fc(weight: i32) -> Weight {
2730
const MAP: &[(i32, i32)] = &[
2831
(0, 0),

0 commit comments

Comments
 (0)