-
Notifications
You must be signed in to change notification settings - Fork 819
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
[WIP] Borders and country name rework #3553
Conversation
It seem to be almost the same as |
Looking at border style, there is some room for making one more pattern for https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#Rendering One simple idea would be to render level 3 with longer lines, another one could be to render level 5 with 3 dots. I guess the first one is better, because we have not too much of such fat lines, while slim ones are used more often. |
Currently disused railways and smallest admin borders are already similar, because colors of slim lines are not too visible: https://www.openstreetmap.org/way/461746771#map=19/52.25954/20.98289 current master z9+ rendered with small dashes (current z7+8 pattern): |
Rendering level 5 with 3 dots and longer dashes ( https://www.openstreetmap.org/#map=18/50.17957/18.62354 Before After |
I think it looks worst with longer dashes (more similar to railway pattern) It's related to #2872 |
Which railway pattern does it remind you? I do not see any resemblance, so I think it's safe. It's also unusual pattern (which is good for artificial objects like borders), railways would be more regular: https://wiki.openstreetmap.org/wiki/LinesTab#Railways Longer dashes make it more distinct from 1 and 2 dots patterns. Using regular dashes with 3 dots (1+3 also 2+2, 3+2 and 3+3): |
@kocio-pl Your test renders show bold country names without I think we agree that character spacing is no longer required (see also the comment by sommerluk). Could you make that change in the code? |
Thanks for checking the code, now it's removed. |
@rrzefox Thanks a lot! @kocio-pl Maybe Initially, I thought |
b6a8d13
to
05c48a9
Compare
I finally was able to focus on this important task. I have added new pattern for z5 as planned, because I see no resemblance with railway and that would help us with highest admin levels to be distinct. @sommerluk I have added a simple Bold clone and turned it into medium in the code, I hope this is OK. Here is a comparison of medium and regular font (just to show how they are different) - what do you think about it? Medium Regular |
@kocio-pl Well, the rendering is indeed strange. And I do not really understand why.
Theoretically, this should work. Pitfalls in the fallback chain might be
But nevertheless, the question is why the fallback chain is triggered. Let’s take województwo śląskie as example. The label renders wrong – for both, medium (fallback to regular for the second word) and semi-bold (fallback for both words). If I understand it correctly, Mapnik chooses the font together with Harfbuzz, and they try to keep at least hole words always in the same font. If a font does not provide all characters for a given word, they fall back to the next font in the chain, and so on. The big question is: Why is the fallback chain triggered at all? I’ve tested the label “województwo śląskie” with Noto Sans in all relevant weight variants using InDesign (which does quite a good job in Unicode-conform rendering and shows missing characters): The result is that there are no missing characters. So everything should be fine. I don’t understand why it doesn’t render correctly. Note that additionally to the fallback, there seems also to be a problem with different line spacing. (By the way: Where did you get the Noto Sans Medium/Semi-bold font you are using? Github?) Given that for both – Medium and Semi-bold – there are rendering issues, and we do not understand the reason, I propose not to include Medium/Semi-bold in this PR. Maybe later there can be another PR that focuses exclusively on Medium/Semi-bold. |
Maybe also in a later PR, legacy DejaVu support could be dropped. Given that Noto is quite wide-spread today, dropping DejaVu could avoid some side effects in the fallback chain. |
Most probably I was following installation instructions (and looking at files it was year ago): I will try to update them and see the results. Could you make independent tests on your system? |
Then you have downloaded from Github, which should be fine.
Not sure, I’m currently quite busy with other stuff, so I do not have much time… |
OK, we have time to test things and find the problem before release. If that fails, I will just drop this part. BTW: @rrzefox Could you update the code on your system so we could check if this is not just the issue with my setup? |
Why do you think it was |
I looked at all the Noto fonts on my system, and the CJK fonts are the only ones where the lowercase l has a tail, so I assume it's that one. |
That’s reasonable. Between Noto Sans and Noto Sans CJK, apart from “l”, there are some minor differences also in “s” and “e”, but that’s more difficult to see, especially on the low-resolution rendering we have here.
Yes and no. Anyway, the LGC font Noto Sans Medium is (correctly) the first choice in the list of @kocio-pl so I would assume that LGC font Noto Sans Medium covers Polish diacritics and there is no further fallback. But apparently my assumption is wrong. Google’s Noto Sans CJK is actually Adobe’s Source Han Sans – just a copy that has been renamed: Google is commissioning most of it’s Noto fonts to Monotype. One exception are the CJK fonts: For these fonts, they have collaborated with Adobe because it’s really a huge project. So Adobe is producing its CJK font Source Han Sans with a design that match both, Adobe’s own LGC font Source Sans Pro and also Google’s LGC font Noto Sans. After releasing Source Han Sans, they copy the font, rename it to Noto and integrate it in the Noto family. Now the problem is that Adobe adds the most common LGC characters from Source Sans Pro directly to its Source Han Sans font – as a sort of fallback. Google however follows a different policy with the other Noto fonts: Usually, there are no LGC fallback characters, so when you use for example Noto Sans Hebrew than this font will not have any LGC characters. So Noto Sans CJK is an exception, and additionally its LGC fallback glyphs are not what you would expect, but rather Source Sans Pro glyphs. *LGC = Latin, Greek & Cyrillic scripts |
Could anybody else make such test to check what is the problem? @Adamant36? @jeisenbe? |
I tried to fetch your branch, but I am getting errors that the project is
not loading properly. First there was an error about the fabric.svg
missing; I fixed this by rebasing on the master branch, but now I am told I
am missing many fonts, eg Noto Sans Medium, Noto Sans CJK JP Medium, etc.
Do I need to download a new set of fonts to render this branch?
I’m using the Docker container on MacOS to run kosmtik.
…On Mon, Dec 31, 2018 at 6:20 PM kocio-pl ***@***.***> wrote:
Could anybody else make such test to check what is the problem? @Adamant36
<https://github.com/Adamant36>? @jeisenbe <https://github.com/jeisenbe>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3553 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AoxshG5-nQczsr1AmWfh6VUVk96SqEO3ks5u-dbPgaJpZM4ZJufC>
.
|
I would also rather tend to Semi-bold (but I could live also with the other options). Anyway, if this gets changed, we would have to make some smaller adaptions on the font list, and also change the install instructions. As far as I know, Noto Sans Medium is not packaged with Ubuntu – is this correct? If so, I could provide some alternative download instructions. And we need to warn the operations team when making a release, so that they are aware of the change. Not sure if they will actually install these fonts, but as we have a fallback, that’s not such a big problem. |
Would you like to prepare separate code with Semi-bold? I can revert Medium changes and leave Italic for now. |
As I’m currently really, really busy with other stuff, I would prefer not to write a new PR myself. However, I could help you with the font list:
About the install instruction: Could you check if semi-bold or medium are available on Ubuntu? (I’m not using Ubuntu, so that’s a little difficult for me. On openSuse all these are available however…) If they are available, which is the package name? |
I would support leaving italic for now and looking at state names in a separate PR, as it seems that more tests are needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that you working on this, it's a serious problem that does need addressing.
Could you perhaps propose the change of the label font and the color change in different PRs? They are independent from each other, right?
I also think this color is too close to railways. On low zoom, I think this color is great. However, on high zoom, it might easily be confused with a type of railway, or perhaps even a type of road.
Perhaps we should abandon the idea of having the same border color on all zoom levels?
I think this PR in the current form should not be merged.
Sure, state labels changes are different thing, so I will remove it soon from this PR.
Ok, that sounds sane for me.
|
939bf59
to
4f23825
Compare
That sounds reasonable. Or perhaps the new color can be even more gray (or a different color) if it is only for low zoom. Perhaps an abrupt change in color works as well, we'd need to test that.
I have no opinion on that at the moment. |
I think I regret that change now. |
Since we have 9 levels rendered (l2-l10): https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#Rendering we need to use 9 steps palette: https://meyerweb.com/eric/tools/color-blend/#6B516B:AC46AC:7:hex or if we combine colors with the same pattern (l7+l8, l9+l10) we need just 7 color steps: https://meyerweb.com/eric/tools/color-blend/#6B516B:AC46AC:5:hex |
Test with the 7-color palette suggested by @kocio-pl: |
@matthijsmelissen Can you provide some examples of places where gray borders might be a problem? Btw. See #2872 (comment). I think we should change some railway types rendering, because they cause conflicts with borders even when they are violet, so "palette solution" doesn't work for me anyway. |
For example https://user-images.githubusercontent.com/5439713/49116116-ee33eb00-f29c-11e8-9a62-c415df1a1f21.png is for me hard to read. |
@vholten Could you paste the link to the code branch with the 7 colors palette so I could test it more? |
Thanks! Could you also adjust the label colors accordingly? |
The color of country labels was already adjusted, state labels may work with that color as well. In both branches I made country names bold. |
Sorry for late reply, I am still recovering with my focus on this repo and was unable to get where the problem is. My idea is to make all the labels correspond to the line color, not only country and state labels. I think it will make it more clear that they are referring to the same admin level. |
ec82c00
to
6510aee
Compare
Fixes #3489.
Closes #3526.
Related to #621 and #3102.
Related to #3563
Changes proposed in this pull request:
#ac46ac
+75% of grey =#6b516b
)This has been discussed and tested before, so now just a short summary: current borders are too bright, especially on low zoom levels and on the water. Other forks have already tried to make them darker using green tint, however it looks bad on the water, looks a bit blurry in general and is too close to natural reserve boundaries. Using pure grey makes some other (however less serious) problems, pointed out in #2695 (comment).
Using dark violet looks good on low zoom, looks good on the water and is different than natural reserve boundaries. It's also similar to the current style, so people should be less surprised. Making country names bold helps to recognize them more easily than currently.
Some examples (I hope @rrzefox could apply it to test such important change on the whole planet):
https://www.openstreetmap.org/#map=6/51.849/20.116
https://www.openstreetmap.org/#map=16/49.5738/22.6873
https://www.openstreetmap.org/#map=11/54.3842/19.7208
https://www.openstreetmap.org/#map=12/52.2356/20.8412
https://www.openstreetmap.org/#map=19/52.25929/20.99742
https://www.openstreetmap.org/#map=18/52.23921/21.03554