tracestrack / tracestrack-maps

The stylesheet for carto and topo maps
https://www.tracestrack.com/information/
Creative Commons Zero v1.0 Universal
23 stars 2 forks source link

[CJK] Add support for Hong Kong SAR and Macau SAR locales #3

Closed SCLu17 closed 8 months ago

SCLu17 commented 8 months ago

Hong Kong (HK) and Macau (MO) use glyph sets that are distinct from both Mainland China’s and Taiwan’s. This is reflected in Noto Sans CJK via the ‘HK’ variant. Some common examples in-map include:

rect26-1 rect26-2

This is incorrectly implemented in tracestrack, which uses the ‘SC’ variant for both regions:

Screenshot from 2023-10-20 14-41-28 Screenshot from 2023-10-20 14-46-05

Since Japan and Taiwan already have relevant CJK localizations implemented, would it be possible to do the same for the two regions as well?

It should also be noted that for Noto/Source, there is no MO variant font file in the main release, only limited support in a test release. See also https://ccjktype.fonts.adobe.com/2019/02/mscs.html. Since the MO glyph set is modified from the HK glyph set, and the HK glyph set is in turn modified from Taiwan’s TC set, I suggest using either the HK or TC variant for Macau in the meantime, and using the TC variant as a fallback font for both regions.

See also https://github.com/gravitystorm/openstreetmap-carto/issues/2208. I refer also to the HK government’s and the Macau government’s official documentations.

quinncnl commented 8 months ago

Hi @SCLu17, thanks for reporting. This is doable and will be fixed soon. Actions needed:

  1. install font: Source Han Sans Hong Kong
  2. detect country/region from coordinates for HK/MO
  3. update stylesheet
quinncnl commented 8 months ago

Fixed. See https://www.openstreetmap.org/#map=19/22.50421/114.27011&layers=P Texts in Hong Kong and Macau are rendered with "Source Han Sans HC,思源黑體 香港". It takes about 10 days to see the changes in updated maps.