Skip to content

Commit 5624521

Browse files
committed
Move the shaping log so that the text doesn't need to be generated twice
1 parent 1ce1f32 commit 5624521

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/renderer/fonts/caching_shaper.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,6 @@ impl CachingShaper {
375375

376376
let mut resulting_blobs = Vec::new();
377377

378-
let text = word.text();
379-
trace!("Shaping text: {text:?}");
380-
381378
for (cluster_group, font_pair) in self.build_clusters(word, style) {
382379
let features = self.get_font_features(
383380
font_pair
@@ -439,6 +436,7 @@ impl CachingShaper {
439436
let key = ShapeKey::new(text.to_string(), style);
440437

441438
if !self.blob_cache.contains(&key) {
439+
trace!("Shaping text: {text:?}");
442440
let blobs = self.shape(word, style);
443441
self.blob_cache.put(key.clone(), blobs);
444442
}

0 commit comments

Comments
 (0)