Skip to content
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

Calculate compressor ratio automatically #90

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

petewarman
Copy link

I've added in a few lines in order to calculate correct compressor ratio on the fly rather than having to manually configure the plugin for each typeface.

Probably also worth pointing out that removing the compressor attribute changes the API.

@davatron5000
Copy link
Owner

So whitespace nowrap, what if you wanted text to wrap to 2 lines but also wanted to maintain scalability?

@petewarman
Copy link
Author

Ah ok. That's a different use case to how I imagined this was used.

The nowrap is just left in to get around the occasional rounding error in webkit. Shouldn't be too hard to find another way around that.

Would also need to add in a multiline parameter to configure how many lines to break over.

@petewarman
Copy link
Author

So thinking about it - text wrapping doesn't provide equal length lines so multi line support is always going to require some manual tweaking. I've added in a scale factor which is used to determine what percentage of the width the text should occupy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants