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

improve text quality #543

Merged
merged 24 commits into from Sep 8, 2015
Merged

improve text quality #543

merged 24 commits into from Sep 8, 2015

Conversation

andreasplesch
Copy link
Contributor

by oversampling by a factor of two but keeping the textured rectangle the same size. Addresses issue #541 . It would be straightforward to make the oversampling factor a custom field of the text node (default 1 or 2) for backwards compatibility.

@mlimper
Copy link
Contributor

mlimper commented Sep 7, 2015

Nice, thanks - I would agree to your proposal of making this a custom field of the text node.
Could you add the field before we merge this one?

@andreasplesch
Copy link
Contributor Author

Will do. I would prefer to set the default for this custom field ('quality') to 2. I cannot think of a case where the larger texture would be a problem, and it does look much better. Any reason not to set it to 2 ?
I will also bracket the max. to 10 to avoid extremely large textures. And the min. to 0.5.

@andreasplesch
Copy link
Contributor Author

I added a 'quality' field to the FontStyle node with a default of 2.0 and enforced bracketing to 0.5 and 10. FontStyle seemed more appropriate than Text since it really is a style option. I updated the two examples referenced in issue #541 to use the custom quality factors. Let me know if there is anything else.

@mlimper
Copy link
Contributor

mlimper commented Sep 8, 2015

That's great, thanks a lot for this contribution.

mlimper added a commit that referenced this pull request Sep 8, 2015
improve text quality ('quality' field in FontStyle for oversampling)
@mlimper mlimper merged commit be941e5 into x3dom:master Sep 8, 2015
@andreasplesch
Copy link
Contributor Author

Glad to contribute.

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

Successfully merging this pull request may close these issues.

None yet

2 participants