summaryrefslogtreecommitdiffstats
path: root/tiny_skia/src/text.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tiny_skia/src/text.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tiny_skia/src/text.rs b/tiny_skia/src/text.rs
index 1246bbd5..603a3e16 100644
--- a/tiny_skia/src/text.rs
+++ b/tiny_skia/src/text.rs
@@ -49,6 +49,7 @@ impl Pipeline {
font: Font,
horizontal_alignment: alignment::Horizontal,
vertical_alignment: alignment::Vertical,
+ advanced_shape: bool,
pixels: &mut tiny_skia::PixmapMut<'_>,
clip_mask: Option<&tiny_skia::Mask>,
) {
@@ -63,6 +64,7 @@ impl Pipeline {
content,
font,
size,
+ advanced_shape,
};
let (_, buffer) = self.render_cache.allocate(font_system, key);
@@ -130,6 +132,7 @@ impl Pipeline {
size: f32,
font: Font,
bounds: Size,
+ advanced_shape: bool,
) -> (f32, f32) {
let mut measurement_cache = self.measurement_cache.borrow_mut();
@@ -140,6 +143,7 @@ impl Pipeline {
size,
font,
bounds,
+ advanced_shape,
},
);
@@ -161,6 +165,7 @@ impl Pipeline {
bounds: Size,
point: Point,
_nearest_only: bool,
+ advanced_shape: bool,
) -> Option<Hit> {
let mut measurement_cache = self.measurement_cache.borrow_mut();
@@ -171,6 +176,7 @@ impl Pipeline {
size,
font,
bounds,
+ advanced_shape,
},
);
@@ -390,6 +396,7 @@ impl Cache {
.family(to_family(key.font.family))
.weight(to_weight(key.font.weight))
.stretch(to_stretch(key.font.stretch)),
+ !key.advanced_shape,
);
let _ = entry.insert(buffer);
@@ -420,6 +427,7 @@ struct Key<'a> {
size: f32,
font: Font,
bounds: Size,
+ advanced_shape: bool,
}
type KeyHash = u64;