summaryrefslogtreecommitdiffstats
path: root/tiny_skia
diff options
context:
space:
mode:
Diffstat (limited to 'tiny_skia')
-rw-r--r--tiny_skia/Cargo.toml2
-rw-r--r--tiny_skia/src/text.rs9
2 files changed, 9 insertions, 2 deletions
diff --git a/tiny_skia/Cargo.toml b/tiny_skia/Cargo.toml
index 32645ac1..400eee6a 100644
--- a/tiny_skia/Cargo.toml
+++ b/tiny_skia/Cargo.toml
@@ -24,7 +24,7 @@ features = ["tiny-skia"]
[dependencies.cosmic-text]
git = "https://github.com/hecrj/cosmic-text.git"
-rev = "ad111a1df10d5da503620f4b841de5d41ebd4e73"
+rev = "b85d6a4f2376f8a8a7dadc0f8bcb89d4db10a1c9"
[dependencies.twox-hash]
version = "1.6"
diff --git a/tiny_skia/src/text.rs b/tiny_skia/src/text.rs
index a63da193..58079cc0 100644
--- a/tiny_skia/src/text.rs
+++ b/tiny_skia/src/text.rs
@@ -229,6 +229,13 @@ fn to_stretch(stretch: font::Stretch) -> cosmic_text::Stretch {
}
}
+fn to_shaping(shaping: Shaping) -> cosmic_text::Shaping {
+ match shaping {
+ Shaping::Basic => cosmic_text::Shaping::Basic,
+ Shaping::Advanced => cosmic_text::Shaping::Advanced,
+ }
+}
+
#[derive(Debug, Clone, Default)]
struct GlyphCache {
entries: FxHashMap<
@@ -396,7 +403,7 @@ impl Cache {
.family(to_family(key.font.family))
.weight(to_weight(key.font.weight))
.stretch(to_stretch(key.font.stretch)),
- matches!(key.shaping, Shaping::Basic),
+ to_shaping(key.shaping),
);
let _ = entry.insert(buffer);