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
Change default value for text-font to Noto Sans Regular #311
Comments
I don't have any objections, but there isn't a near future plan to release a major breaking change version. |
That's perfectly fine, we can revisit this at at a later date - just seems odd to have an unusable default |
I can't argue with that... |
Good idea in general, but this would be a breaking change in the style specification which I think we should avoid. Or am I missing something? |
Technically yes, but if you relay on the default font you are probably doing something wrong. |
Yes. Specifying fonts needs to be done in conjunction with specifying the URL for fonts, so defaults make little practical sense. |
+1 |
Another alternative is to avoid having a default Several components have to be set and served properly in order for the text to show. Having a default for |
Another option is to have a style property of "global default font" in order to reduce the need to specify the font for every label and allow override this when you want to set a different font for a specific label. |
I think this option can, and should, be incorporated with any of the alternatives: changing the default or removing the default all together. |
I like the approach of removing an implicit default and permitting an explicit default to reduce “noise.” |
I also like not having an implicit default. Having to specify the font stack for every layer is indeed tedious, so I like the idea of adding an explicit, user-specified default for all layers. Also, this is tangential, but while we're talking about changing the spec for fonts anyway... I have run into situations where it would be nice to serve different font stacks from different URLs. This can currently be accomplished using a request transform, but it would be nice if the style spec supported specifying different URLs for each font stack. I think this could be done in such a way as to be a non-breaking change. |
I would recommend opening a different discussion around multiple glyph urls. |
I was wondering how different the fonts look:
It looks like the font weight but also the default line height change noticably. Does anyone have some real live examples? Maybe with white text on dark which will likely make the thinner weights more visible… |
By this reasoning we should remove the default, and not change it. |
My suggestion here it to change the behavior from implicit to explicit default - i.e. have it declared and not hard coded. |
I think making the global default font configurable with the default set to the current value is a good idea. Like this we can avoid a breaking change to the style specification but still have an easy way to configure a global default font. What should the new property look like? |
Since the property is called What I suggest is:
|
Sounds good. Shouldn't the new default be |
How about |
Sure, both suggestion are fine by me. |
Also, does an array of strings actually cause MapLibre to fall back when something isn't found? I thought that was something that happened server-side in mapbox land. Not that I wouldn't welcome such functionality! |
It does not fall back on the client, you need to build a fallback by generating a static fontstack with multiple TTFs, or dynamically composing them, and then putting a comma in the fontstack name. |
* Change it from Open Sans Regular, Arial Unicode MS Regular which does not have a freely licensed reproducible build.
Closing to avoid backwards-compatible changes with limited benefit. Maybe for a future major revision... |
Design Proposal: Change the default value of text-font.
Motivation
The current default
text-font
if no value is specified isOpen Sans Regular, Arial Unicode MS Regular
maplibre-style-spec/src/reference/v8.json
Line 1783 in d665496
The issues with this current situation:
Proposed Change
Change the default value to
Noto Sans Regular
. This is an openly licensed font designed for maximum coverage, and can be made available for most MapLibre users.API Modifications
This is a breaking change if users depend on the old default behavior. There shouldn't be many, unless their client is fetching from Mapbox.
Migration Plan and Compatibility
This should accompany a major version release of maplibre-gl-js and maplibre-native, because of the change in default value behavior.
Rejected Alternatives
Related Issues
maplibre/maplibre-gl-js#2990
maplibre/maplibre-gl-js#1051
maplibre/font-maker#16
The text was updated successfully, but these errors were encountered: