Skip to content

Commit

Permalink
fix: Use text_overflow value for paragraph's ellipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Oct 4, 2024
1 parent b5ffa42 commit cbf31ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/core/src/render/skia_measurer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use freya_node_state::{
FontStyleState,
HighlightMode,
LayoutState,
TextOverflow,
};
use torin::prelude::{
Alignment,
Expand Down Expand Up @@ -229,8 +228,8 @@ pub fn create_paragraph(
paragraph_style.set_max_lines(font_style.max_lines);
paragraph_style.set_replace_tab_characters(true);

if font_style.text_overflow == TextOverflow::Ellipsis {
paragraph_style.set_ellipsis("…");
if let Some(ellipsis) = font_style.text_overflow.get_ellipsis() {
paragraph_style.set_ellipsis(ellipsis);
}

let mut paragraph_builder = ParagraphBuilder::new(&paragraph_style, font_collection);
Expand Down

0 comments on commit cbf31ef

Please sign in to comment.