-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Allow specifying scale_factor #29
base: main
Are you sure you want to change the base?
Conversation
Hmm, having played with this a little now, I'd say that, at least for my purposes, adjusting the So perhaps I should pull out the help text related code and re-PR that? |
It helps with fonts that have corners like Roboto. But the effect is only visible at large font sizes |
I did not, so the effect is that with the same |
Nope, but I'll give it a try. Thanks @bdon! |
Whew, that was an interesting challenge. I couldn't figure out the really correct place to add the That worked, ish. The other metrics are all wrong (doubled, I assume), so the rendering is all kinds of wonky. But at least I could compare characters to characters. At smaller sizes, the characters look weird. They're "sharper" in that some of the straight lines are less fuzzy, but the width of the straight lines is inconsistent. Curved lines are inconsistent as well. Take a look at these samples: At larger sizes, rendering is better. But I'd have a hard time saying the overall effect is better, just looks different (in a way that might be achievable just through changes in paint styles). Additional note, just for completeness: At @wipfli's suggestion, I compared the sizes of the double resolution PBFs after gzipping. The 1x resolution PBFs were all 1.2M uncompressed (checked using |
Interesting, thanks @cboone. If you don't change MapLibre GL JS, but just use half the font size in your style.json file, what happens? To you get identical size fonts? |
I added a
scale-factor
option to the CLI, with the existing value of1.0
as the default. Playing with @wipfli's idea https://github.com/wipfli/double-resolution-font.I also improved the CLI help text a little. Happy to break that out into a separate PR if that's better.
Let me know what you think and if I can make any changes or if this is not needed / wanted. No problems here, just thought I might as well contribute it back upstream.
Thanks for all the awesome work!
cc: @bdon @wipfli