-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 readability of text-pitch-alignment: "viewport" text #3057
Comments
Setting The default Streets style doesn’t set |
That's related to the observations in #2668 (comment) and the caveats in #2668 (comment). Definitely agree there's room for improvement. |
I agree. The readability of Overall, our plans to address pitched text readability are captured by the |
@jfirebaugh I don't think so |
Noting that one specific aspect of this is that perspective is not accounted for in text orientation. If you look at this JSFiddle First, 2nd, & 3rd Streets should be rotated 180° to be closer to "upright", but if you change the pitch to 0 the same orientation is correct. |
Update: after syncing up over the last couple of weeks seperately with @yhahn, @lucaswoj, and @pveugen, I've started to revisit this issue. Per chat, if @ChrisLoer has bandwidth, he and I are going to push on some incremental improvements for pitched label rendering, starting with this issue. To summarize and expand on the above conversations:
|
There seem to two main causes of illegibility:
|
@jfirebaugh I agree with ^
My comments about this are here.
From what I understand from @yhahn, the foreshortening factor was put in place to avoid other legibility issues around label placement/collision boxes not taking into account the unskewing of pitched labels (which is particularly problematic for curved labels, as @jfirebaugh mentioned). I agree that it would be best to remove the foreshortening and address the other issues. As @yhahn mentioned in the original PR, in order to transform label placements and collision box size/positioning to accurately reflect the rendering of labels with viewport pitch alignment, we probably need to adjust both the rotation and x/y movement. Currently we are adjusting for viewport pitch alignment in the render, shader and collision tile, but in order to do ^, it seems like we may need to make adjustments further upstream. I think shaping.js is where the first relevant calculations take place (e.g. label length and glyph positioning), but I don't know whether it make sense for Shaping to take into account pitch/pitch-alignment (conceptually it doesn't seem like the right place). /cc @ChrisLoer |
#4781 has landed: while I'm sure there are further improvements we'll want to make, I think that basically addresses this issue. |
mapbox-gl-js version:Master
Steps to Trigger Behavior
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: