-
Notifications
You must be signed in to change notification settings - Fork 21
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
Don't rely on default font size #242
Comments
I had noticed the same thing using the iOS demo app, thanks for the sleuthing! From https://mapzen.com/documentation/tangram/draw/#font-parameters:
I've summarized the defaults below (different than the example in docs):
My preference is for ES and JS to have the same default text font size ( |
(Which would make this a Tangram ES issue, with no change for Bubble Wrap scene file.) |
A cursory glance at the relevant code in tangram-es leads me to believe that we currently do not default to a font size of 12 px: https://github.com/tangrams/tangram-es/blob/master/core/src/style/textStyle.h#L33 @karimnaaji or @hjanetzek can you clarify whether I'm looking at the right value and what the units for this are? |
Yes it seems that there is a mismatch on the default value here between JS and ES, we use 16pixels. @matteblair this is the right place to look at, the value is defined in the stylesheet default units (pixels). |
I've been noticing some odd road labels, and I think that the problem is relying on the default
font.size
parameter. For example, check out these big road labels for 14th Ave, 18th Ave, etc. on Tangram ES:They look more normal in Tangram JS, but in both cases I think it's falling back on the default font size, which must be smaller in JS (12px) - @tallytalwar or @karimnaaji?
This happens on (at least?) a few layers, including secondary and tertiary roads at some zooms. In this example, at z12 we're matching to
labels-secondary-default
, which has nofont
block but inherits some other font params fromroads
.Starting at z13, the font
size
is explicitly set:This also begs the question of whether we should even have a default
size
, or whether we should be requiring this to be set explicitly for labels to render? cc @matteblairThe text was updated successfully, but these errors were encountered: