[MapServer-users] Multi language worldmap (basemaps)
Richard Duivenvoorde
rdmailings at duif.net
Fri Apr 14 01:21:36 PDT 2023
Ok, more or less found a partial solution.
(but anybody with experience in a multilingual world map and labels, please let me know)
Using some python from
https://unix.stackexchange.com/questions/247108/how-to-find-out-which-unicode-codepoints-are-defined-in-a-ttf-file
I'm now able to find in which ttf font a missing glyph can be found...
Using the following in my fonts.lst:
sc fonts/DejaVuSansCondensed.ttf
scb fonts/DejaVuSansCondensed-Bold.ttf
noto fonts/NotoSans-Condensed.ttf
notob fonts/NotoSans-CondensedBold.ttf
uni fonts/unifont_sample.ttf
unib fonts/unifont_sample.ttf
tw fonts/UKIJCJK.ttf
And using
FONT "sc,noto,uni,tw" # does order matter?
I have a start to show labels in my small test setup with combined data from Pakistan, Taiwan and Afghanistan...
I still have other log messages now:
AH01215: Unable to load glyph 62314 for font "uni". Using ? as fallback.: /usr/lib/cgi-bin/mapserv
[Fri Apr 14 10:12:20.644638 2023] [cgi:error] [pid 141599] [client ::1:46140] AH01215: msGetGlyphByIndex(): General error message. unable to load glyph 62314 for font "uni": /usr/lib/cgi-bin/mapserv
while my script tells me 'glyph 62314' is in 'fonts/unifont_sample.ttf'...
Any info or insights are still being appreciated :-)
Regards,
Richard Duivenvoorde
On 4/14/23 09:18, Richard Duivenvoorde via MapServer-users wrote:
> Greetings List,
>
> Some years ago we used https://github.com/MapServer/basemaps/ to create a raw world map based on OSM data (on hindsight, that map already showed 'Tofu'[0] characters.
>
> Trying to refresh this setup, we want multilingual/multiline labels (so the English label/name below the local Locale label/name, IF available)..
>
> Using another OSM setup, I used Google Noto-fonts to have all glyphs/fonts/charactersets needed... that worked great
>
> But now using basemaps: if I load Pakistan, Taiwanese and Afghanistan data, and point to NotoSans-CondensedBold.ttf NotoSans-Condensed.ttf in my fonts.lst, I still get the three question marks in my Taiwan map... and mapserver telling me:
>
> [Thu Apr 13 19:52:52.364863 2023] [cgi:error] [pid 52200] [client ::1:37906] AH01215: Unable to find glyph for codepoint 37129. Using ? as fallback.: /usr/lib/cgi-bin/mapserv
> [Thu Apr 13 19:52:52.364878 2023] [cgi:error] [pid 52200] [client ::1:37906] AH01215: Unable to find glyph for codepoint 29509. Using ? as fallback.: /usr/lib/cgi-bin/mapserv
> [Thu Apr 13 19:52:52.364893 2023] [cgi:error] [pid 52200] [client ::1:37906] AH01215: Unable to find glyph for codepoint 28525. Using ? as fallback.: /usr/lib/cgi-bin/mapserv
> [Thu Apr 13 19:52:52.364913 2023] [cgi:error] [pid 52200] [client ::1:37906] AH01215: Unable to find glyph for codepoint 37129. Using ? as fallback.: /usr/lib/cgi-bin/mapserv
>
> etc etc...
>
> So no I wonder: SHOULD it be possible to have a world map with all kind of different language names in one mapfile?
> OR (as in https://github.com/MapServer/basemaps/blob/main/fonts.lst is there just one font used for a label)?
> OR do I have to create a long list of needed fonts (so mapserver can choose from those and pick one which has that 'codepoint'.
> OR is defining a Noto ttf not enough?
> OR do I miss some point...
>
> Anybody here has some experience with such an issue: create a map with both Khmer, Arabic, Japanese, Ukranian, Chinese and Dutch place name labels :-)
>
> Any pointers appreciated,
>
> Regards,
>
> Richard Duivenvoorde
>
> PS reading about https://mapserver.org/development/rfc/ms-rfc-98.html#rfc98, there is some font-cache I can refresh... ???
>
> [0] https://fonts.google.com/knowledge/glossary/tofu
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list