-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Letter spacing #11
Comments
I have reproduced a similar issue where the ellipsis and characters in the text or html string are breaking onto a new line on initial load. I don't think it has to do with letter spacing, but the main font is loading in AFTER the react ellipsis component has mounted. Essentially, the fallback font has a smaller footprint than the downloaded font, thus breaking the truncation. This could be circumvented by allowing the user to pass an argument to the responsiveHOC to forceReload the ellipsis component after a setTimeout. The argument should be a timeout in milliseconds. |
@gareys good catch about the web font issue. But I don't think this component should provide a timeout param, which would be quite weird. You can set a timeout outside the component and pass a different Also, there seems some APIs better than timeout to listen a font loaded event, like Using |
I am still trying to find a solution for this.. I tried the prefetch/preload css and it doesn't seem to help :/ It seems as if the plugin is only pulling from Times where we have a custom font that isn't being recognized. I got around this by forcing a font on |
Looks like after you add more than .5px of letter spacing that it breaks the ... to a new line. Does the code handle scenarios like this?
The text was updated successfully, but these errors were encountered: