-
Notifications
You must be signed in to change notification settings - Fork 824
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
Japanese Fonts Too Small / Halo (Stroke) too small / Shields misrendered #294
Comments
What font would you suggest? |
There's a few separate issues raised in this ticket, and I'd like to see them all addressed. One big problem for me is that I (unfortunately) can't read any non-latin scripts, which often makes it hard to assess the output.
So yes, I am interested in fixing all these issues, but for most of them I need expert help! |
yea, as a Californian, I'm used to Street names and Freeway numbers. It's opposite in Japan. They used to name every important road (and still do), but in the last 20 years switched to numbering most primary and secondary roads (hence road names and shield numbers). But almost every motorway uses a name (北関東道 = North Kanto Expressway, or "Kita-Kanto") and is not associated with any number whatsoever. I can research some fonts for you, however, I understand the idea of the license restrictions, but I am unfamiliar with the types needed for these projects. I assume something with a similar license as DejaVu Sans? as an old graphic designer now tracing in OSM, I know when something looks wrong. I know of but I do not understand the underlying code/system/CSS/guts of the system. I will be happy to be the eyes to check things, or ask the others around me here to check how readable things are. After looking over some royalty free fonts, 3 problems come up -
There are 3 types of fonts for generally used - brush, serif (mincho), and and san-serif (gothic), and of course a few stylized fonts thrown in too. Then there is their weight - usually a number. the bigger the number, the more "bold" the font is - 3 is light, while 5 is a little bolded. 6 and 8 are pretty rare. There are other letters that tell you about it's use. Google led me to http://www.wazu.jp/gallery/Fonts_Japanese2.html, which has good examples of the 3 kinds of fonts, but most of them seem to be from inside other programs or packs. Japanese Sourceforge has a listings for a couple different free fonts.(http://sourceforge.jp/magazine/09/04/27/0313213/3), and one seems to be pretty good, called Ume (Uu-meh "plum") it has a lot of combinations available. Ume Gothic C4 or C5 looks pretty good at 13 pt, which would be good for the shields and theme-park / zoo / park / town hall place names I'll keep looking for some fonts for you. PS: the font rendered onto the roads themselves and labels for basic locations, and towns look very readable, no need to mess with those. |
I think the first problem to tackle is the falling back to Unifont, a bitmap font designed for completeness, not looks. This is not restricted to Japanese, but effects any language that isn't covered by DejaVu Sans
The most fundamental restriction is that we need to be able to get the font on a system running Ubuntu. I'm not sure there are any legal reasons that prevent someone from purchasing a completely proprietary font and using it for their tile server. The best resource on Unicode fonts I found was Unicode Font Guide For Free/Libre Open Source Operating Systems GNU FreeFont does not contain Chinese and Japanese glyphs. The only two pan-unicode font that they mention which do not have a cost assocated with them are Bitstream Cyberbit and GNU Unifont. Bitstream Cyberbit 1.1 is under a single user license, which is definitely not ideal, although it might be usable. A particular paragraph on the unifont page seems relevant for this
Based on that, it sounds like a "virtual font set" is the best option, but frankly, I'm out of my depth here. |
@gravitystorm Are you even happy with DejaVu as the default font? I know it's got reasonable unicode coverage, but is it a good map font? Note to self: http://font.ubuntu.com/ looks to have bold japanese glyphs |
As someone who is totally unfamiliar with linux (and honestly, PCs) I'm surprised the OS would have trouble with TTF (Truetype) files. They have been the basis for fonts for a long time now. Ah, patent issues. http://en.wikipedia.org/wiki/TrueType#Linux_and_other_platforms it looks like there was a serious issue with freetype and non-western fonts, but that has been resolved with version 2.4 - so we should be able to get standard TTF fonts on a linux box now - but as a long time Apple tech, thats way out of my depth. |
What is the font being used for the park and building names? it seems to be different than the theme park names. Also, the City name font is pretty good too. |
Should I try breaking down the other issues into other tickets? Im new to collaborative and ticket systems. eg:
2
3
4
5
|
One issue per ticket is best |
The reason we're falling back to a bitmap font isn't because TTF doesn't work, it's because unifont is bitmap. DejaVu is TTF. |
oh, then any TTF font should work then, assuming it can prioritize which font to look for a character in first. I assume that is part of localization for large programs? Ume => DejaVu => unifont. I assume al the tiny road labels are unifont because there is no antialiasing whatsoever, so it is easy to read at 9pt, but if you use 13 or something for the larger labels, I imagine it looks really ugly. |
Yes, we can prioritise. the fonts. It's most likely to be
... since as you mention above, often the good non-latin fonts will have poor latin characters. DejaVu is fine for all the characters that it supports, and it doesn't have any japanese characters at all. Incidently, it's interesting to hear that different labels look good and bad, since they are all just unifont. I suspect since it's a bitmap font the glyphs are significantly different at different point sizes, rather than just scaling larger. |
From what I can gather, it's got one size of glyphs.
What happens if |
Most of the freeware Japanese fonts I saw don't have many other glyphs, unless it is one of those like unifont. Ume has nothing but Chinese, Japanese, English, and the extra glyphs they like in Japan (it seems). having crap Roman glyphs is the biggest worry - I guess having a good Roman English font first would be the easiest way to solve it - I imagine that would take care of most of Europe. |
Well, yes, bitmapped fonts can look good. Unifont doesn't, as it's optimized for coverage and speed of development of new glyphs, not for looks.
Although there's probably improvements to the labelling that can be done, let's try to get the fonts worked out first, because unifont looks terrible. In the theme of "less terrible", I've installed the |
I look forward to seeing the results =D I do think OSM has a definite advantage because of the color coding. Less terrible is always better! |
So, I was mislead by my browser doing a fallback, giving the impression that it had CJK characters. I still do see some easy improvements, but we're going to have to look at other fonts to get proper CJK characters. |
So, there are four relevant fonts for Japanese according to the Unifont guide: Unifont, Bitstream Cyberbit, Sazanami Gothic ゴシック體 and Mincho 明朝體. Unifont is ugly, and Bitstream Cyberbit is not re-distributable, but makes a good reference. Sazanami Gothic is a closer match to the sans-serif look of DejaVu, but there's an issue. After the Kochi Font controversy some fonts were regarded as non-free. Debian is recommending Wikipedia's list includes Droid Sans Fallback, IPA Gothic, Mona Font, and VL Gothic. |
according to the wiki, they remade Kochi as kochi-substitute, and that is the basis for Sazanami. But (at least on my mac) Sasanami looks ugly compared to the others. VL gothic looks the best out of all of them at 13,14,and 18 pt. 12 pt looses so much detail, so I would say 13pt is the minimum size for VL Gothic. VL P Gothic has a better Roman character set, the Kanji seem identical. The "gothic" fonts are all san-serif, so it will always match the modern DejaVu, helvetica, Arial, Verdana, Gil Sans, etc. The "Mincho" font's are all serif fonts, like Bitstream above, Times, Garamond, etc. Sifting through the fonts is a bit easer when you can discount them by name alone. (Sans, gothic, modern, etc) |
Keeping with one issue per ticket, let's try to focus on font selection for now The current count of font-size in the stylesheet is
|
Well, andy is looking at increasing font size, so 10pt might be more realistic, but I wouldn't think the stuff that's 8pt right now will go up to 13. I take it IPA Gothic, Mona Font and Droid Sans Fallback aren't as good as VL Gothic? |
yea, 8 =13 is too big of a jump. I oooked at IPA, and normal VL looked better. I'll check mona and droid shortly. getting rid of 8pt should be a priority - there is a visible difference in the characters between 8 to 9. I'm wondering how they would look rendered in the tiles (instead of my mac) because of the anti-ailising difference. it looks like there is some attempt an anti-alising the fonts only when they are rotated, so they will look different than the screen caps above when actually in tiles. |
I posted to talk on the subject of fallback fonts: https://lists.openstreetmap.org/pipermail/talk/2014-January/068896.html This is wider than just Japanese, but is related. |
Droid is def better looking than unifont - it is a bit thicker, so it is easier to read the train station's names, for example. Without a fallback font, all the Japanese characters are missing. because droid looks better, it opens up a possibility of using other softer colors for fonts (less jarring ones) because it is more readable and seemingly anti-aliased. |
PS: if you want to check "readability" of these characters (or any of these asian scripts), look at how their horizontal lines are rendered. there is a big difference between 8 and 9 point in my little pictures of VL above. The "東京" in Tokyo disneyland is much easier to read at 9 pt than 8 pt because the horizontal lines and the empty space in the characters are blurred into grey at 8pt, while at 9pt they are distinct - black lines and white space. even though I have no idea how to read Korean, just looking at the lines in the labels around downtown Seoul and Incheon (where most people are) shows droid is slightly better than than standard OSM because there is less blurring of the character into the stroke. |
Mona and its related fonts are probably what is inside unifont - it is an old bitmapped font. droid looks pretty good, but I'm having a hard time finding a unified TTF file with all the languages together. https://github.com/android/platform_frameworks_base/tree/master/data/fonts has the fonts broken up by language (which might be good for -carto, as we can specify a different font for each language?) Comparing VL Gothic to Droid Sans, Droid is the winner until 13 pt. VL gothic looks a lot better at 13, at least here on my Mac. test characters: Tokyo - tesu |
Any Further news / updates on this issue? I'm not sure I'm of much help anymore, but I'm interested in seeing the fonts get updated/ enlarged. |
Writing up what I've done is on my to-do list, but I haven't found the time yet |
I'm also working to CJK and starting with easier alphabets, because Han unification is going to be a pain. |
Is the answer to use different text rules in China and Japan? |
I'd rather do something based on language detection from name:xx tags. I have some ideas in my head on how this can be done, but it's not trivial, hence me starting with Thai, a much easier language to do font selection for |
That doesn’t work if name:ja and name:zh are the same, which may well make sense. |
Fixes gravitystorm#680 Fixes gravitystorm#203 Fixes gravitystorm#202 (mostly) Fixes gravitystorm#146 (mostly) Cross-reference gravitystorm#294 mapnik/mapnik#2020 Starts organization for gravitystorm#508 Replace existing PNG road shields with new SVG ones. This allows for easier adjustment of colour and width as well as sharper high-resolution rendering. At the same time, a number of other shield related bugs are fixed. To aid in organization, a new shields directory is created.
Fixes gravitystorm#680 Fixes gravitystorm#203 Fixes gravitystorm#202 (mostly) Fixes gravitystorm#146 (mostly) Cross-reference gravitystorm#294 mapnik/mapnik#2020 Starts organization for gravitystorm#508 Replace existing PNG road shields with new SVG ones. This allows for easier adjustment of colour and width as well as sharper high-resolution rendering. At the same time, a number of other shield related bugs are fixed. To aid in organization, a new shields directory is created.
Fixes gravitystorm#693 Fixes gravitystorm#680 Fixes gravitystorm#203 Fixes gravitystorm#202 (mostly) Fixes gravitystorm#146 (mostly) Cross-reference gravitystorm#294 mapnik/mapnik#2020 Starts organization for gravitystorm#508 Replace existing PNG road shields with new SVG ones. This allows for easier adjustment of colour and width as well as sharper high-resolution rendering. At the same time, a number of other shield related bugs are fixed. To aid in organization, a new shields directory is created.
Did anybody test whether Mapnik 3 improves the situation? |
As far as I see, the following things have been discussed here:
I’m not sure about the proposed feature/zoom level changes. But for the rest, I propose to close this issue and continue the work in the specialized issues. |
A lot of the labels in Japanese are using a light stroke font instead of a bolded font when the English is rendered bold.
Train stations, amusement parks, motorways, and other important places have hard names to read in non-roman characters because they are rendered smaller than they should be for the kanji.
Examples:
Train Stations http://www.openstreetmap.org/#map=17/36.41395/139.33339
The Kanji for Nishikiryu is difficult to read.
Parks http://www.openstreetmap.org/#map=18/35.73297/139.74664
(The Rikugi-en Garden's complicated kanji is unreadable, for example)
Tokyo Disneyland http://www.openstreetmap.org/#map=15/35.6293/139.8818
Tokyo Disneyland's label (東京ディズニーランド) is impossible to see, let alone read. (thin stroke, no contrast, tiny size) The labels on the parking isles? totally visible. (A whole 'nother issue issue of not rendering labels on parking isles at lower zoom levels)
Motorway labels http://www.openstreetmap.org/#map=15/36.3551/139.1981
The shield labels for the motorways are rendered completely wrong, overlapping the kanji. The Kanji font is very feint. Contrast this to the trunk label (17) right above it.
Also the exit labels are not very readable either. Usually you need these labels when going to a new place, so it is difficult to guess complicated kanji or read faint ones
Most of these issues can be remedied by the choice of a better font that includes bolded characters for Japanese / Chinese. I assume you are using the same font for these features in all regions, but that font doesn't seem to have bold weight 6 characters (W6). The font choice is also a serif font (you can see the strokes in the characters) for some features, when that is unneeded and makes things very hard to read at the small level they are rendered, whereas a san-serif font (no strokes) which is used in other places, is perfect for this Job.
TL;DR : Japanese characters are faint / garbled / rendered incorrectly in some situations. Update the font to a san-serif with bold characters available, or at lease use only san-serif fonts for non-roaman languages, or increase the font size.
The text was updated successfully, but these errors were encountered: