Skip to content

Commit

Permalink
Sort Noto Sans CJK with Arabic
Browse files Browse the repository at this point in the history
Like Arabic, we don't want this font to redefine the rendering
of common symbols.
  • Loading branch information
pnorman committed Jul 16, 2022
1 parent 02c5b24 commit 400c298
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions style/fonts.mss
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,34 @@ used in “name” tags in OSM. Most of the list is in alphabetical order,
but there are some exceptions.
- Noto Sans is before all other fonts
- The CJK fonts are manually ordered. The used CJK font covers all CJK
languages, but defaults to the japanese glyph style if various glyph
styles are available. We have to default to one of JP, KR, SC, TC because
this carto style has no knowledge about what language the “names” tag
contains. As in Korea Han characters are not so widely used, it seems
better to default to either Chinese or Japanese. As Chinese exists in the
two variants SC/TC, it won’t be a uniform rendering anyway. So we default
to Japanese. However, this choice stays somewhat arbitrary and subjective.
See also https://github.com/gravitystorm/openstreetmap-carto/issues/2208
2. Noto provides various variants of Arabic: Noto Kufi Arabic, Noto Naskh
Arabic, Noto Nastaliq Urdu and Noto Sans Arabic. Kufi and Urdu styles are not
widespread in use. Noto Sans Arabic (a Naskh-style low-contrast “Sans” font) and
Noto Naskh Arabic are the fonts with the greatest coverage and provide an UI
variant. This style uses Noto Sans Arabic UI because it’s consistent with the
other Sans fonts and legible. The Arabic fonts are placed behind Sans fonts
because they might re-define some commonly used signs like parenthesis or
quotation marks, and the arabic design should not overwrite the standard design.
The list still includes Noto Naskh Arabic UI for compatibility on systems
without Noto Sans Arabic UI.
3. Noto Serif is used for scripts that are not supported by Noto Sans. Currently
- Noto Arabic and Noto CJK JP are placed behind sans fonts because commonly
used signs like parenthesis or quotation marks, and their design should
not overwrite the standard design.
3. The used CJK font covers all CJK languages, but defaults to the Japanese
glyph style if various glyph styles are available. We have to default to one
of JP, KR, SC, TC because this style has no knowledge about what language the
“names” tag contains. As in Korea Han characters are not so widely used, it is
better to default to either Chinese or Japanese. As Chinese exists in the two
variants SC/TC, it won’t be a uniform rendering anyway. So we default to
Japanese. However, this choice stays somewhat arbitrary and subjective.
4. Similar to CJK Han Unification, there are multiple scripts for Arabic
scripts, and the style has no way to know what language the text is in. This
style uses Noto Sans Arabic UI because it’s consistent with the other Sans
fonts and legible.
5. Noto Serif is used for scripts that are not supported by Noto Sans. Currently
this is only Tibetan: The old Noto Sans Tibetan has been renamed to Noto Serif
Tibetan in 2015, since then only Noto Serif Tibetan gets updated.
4. Noto provides two variants of Emoji: Noto Color Emoji and Noto Emoji. The
6. Noto provides two variants of Emoji: Noto Color Emoji and Noto Emoji. The
colour variant is a SVG flavoured OpenType font that contains coloured emojis.
This is not useful in cartography, so we use the “normal” monochromatic
Noto Emoji.
5. Fallback fonts. Hanazono covers almost all CJK characters, even in Unicode
7. Fallback fonts. Hanazono covers almost all CJK characters, even in Unicode
Plane 2.
*/

Expand All @@ -55,7 +52,6 @@ font-directory: url('fonts');
A regular style.
*/
@book-fonts: "Noto Sans Regular",
"Noto Sans CJK JP Regular",
"Noto Sans Adlam Regular",
"Noto Sans Adlam Unjoined Regular",
"Noto Sans Armenian Regular",
Expand Down Expand Up @@ -116,6 +112,7 @@ A regular style.
"Noto Sans Vai Regular",
"Noto Sans Yi Regular",

"Noto Sans CJK JP Regular",
"Noto Sans Arabic UI Regular", "Noto Naskh Arabic UI Regular",

"Noto Serif Tibetan Regular",
Expand All @@ -129,7 +126,6 @@ A bold style is available for almost all scripts. Bold text is heavier than
regular text and can be used for emphasis. Fallback is a regular style.
*/
@bold-fonts: "Noto Sans Bold",
"Noto Sans CJK JP Bold",
"Noto Sans Adlam Bold",
"Noto Sans Adlam Unjoined Bold",
"Noto Sans Armenian Bold",
Expand Down Expand Up @@ -165,6 +161,7 @@ regular text and can be used for emphasis. Fallback is a regular style.
"Noto Sans Thaana Bold",
"Noto Sans Thai UI Bold",

"Noto Sans CJK JP Bold",
"Noto Sans Arabic UI Bold", "Noto Naskh Arabic UI Bold",

"Noto Serif Tibetan Bold",
Expand Down

0 comments on commit 400c298

Please sign in to comment.