gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.54k stars 823 forks source link

Asian scripts need a bigger font size than latin scripts #2265

Open sommerluk opened 8 years ago

sommerluk commented 8 years ago

The background:

Asian scripts need a bigger font size than latin scripts.

Asian scripts have ofen more complex glyphs than latin scripts. These glyphs have many details and many strokes. They need therefore a bigger font size to be as legible as lati scripts.

That means: A font that supports both – latin scripts and asian scripts – might be well legible at font size 10 for latin scripts. But it might need font size 15 or 20 for asian scripts to be as legible as latin script at font size 10.

The problem:

Currently, most text in this style is ≥ font size 10. This is okay for latin text, but too small for asian text.

No solutions?

gravitystorm commented 8 years ago

We already use multiple fonts, so it's possible to use different fonts for asian and latin characters. We also have the same situation with lots of other non-asian characters, like arabic, hebrew, berber etc.

Is it possible to find fonts with some sort of harmony in their sizes? Or are there rules for how large the glyphs are for "10pt" fonts that mean the ratio of sizes between a latin 'x' and a chinese character '贵' is always fixed, for a given font?

If necessary, we can always try asking in the mapnik project to support complex font specifications like "DejaVu Sans 10pt, Something Else 12pt". Or would making the decision based on Unicode code point ranges be a better idea than the font names?

sommerluk commented 8 years ago

The harmony between glyphs and fonts has various aspects. One of them is the form of the glyphs. Consistent glyph design is important for an overall harmony. A consistent type colour (grey level) is another aspect. And indeed the glyph size is another one: Usually CJK character’s size and position corresponds to the size and position of Latin capital characters of the same font, but slightly bigger.

If harmony is important, I think it’s best to switch to a font that covers many scripts and has a consistent design goal (dropping support for the currently used fonts). At #1067 Noto has been proposed, and this is probably the free font with the biggest coverage, and consistent design and harmony are goals of the Noto font development. Note than Noto is not one big font file, but it is split in smaller files, so CJK characters have their own file and Arabic characters have their own file.

Using a different size for CJK and maybe some other scripts would of course make the map more legible without changing the balance in regions with Latin scripts. It would however – independent of the question which font we use – break the harmony in glyph sizes. It might look inconsistent at low zoom levels, where you can see labels of various scripts on the same time on your screen. It might also look inconsistent for labels that contain both CJK and Latin characters. Technical considerations might include:

Overall, I see various concerns, but I don’t have a better solution either.

Other things which might improve a little bit the current situations are better CJK fonts (including a bold typeface) and Mapnik3 (if I understood correctly, this might give us some rendering improvements for free and handles text-dy sometimes differently).

Further reading:

jojo4u commented 8 years ago

In #2349 (comment) I non-UI variant seems to have a taller glyph which might help with this issue.

jojo4u commented 7 years ago

Answering myself: For Noto CJK no UI variant exists, so we can't play with this. For other scripts this stays a possibility.

jidanni commented 4 years ago

I wish the OSM website would be more fair to Asian users. I can read the words "Where is this?" just fine, but the Chinese characters are a blur except for the last, 店。 Let's not be a euro-centric website please. 9139-10 OK, I had to dig it out with "Query Features": 擺頭店 .