Skip to content

Wrong line breaks  #161

@noahsol30

Description

@noahsol30

Sometimes upon first component load the react-truncate component will render the text with broken lines. I've checked previous issues opened here and saw that it's a know limitation.
I understand that this happens when the custom font has loaded after the component has rendered. We have written a code that verifies it :
document.fonts.ready.then(() => { {render the component } })

We have limited the number of lines to 2 but sometimes we get it as 4 breaking the whole component:
Lorem ipsum dolor sit amet,Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Duis dui

Read more

But we are still getting reports of line breaks with the suggested work around. We have also tried lowering the letter spacing but there is also a limit to how much we can reduce it.

What can be done in such case? Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions