Rendering of Arabic language labels

First and foremost, thanks for the awesome project.

I wanted to report a couple of bug in the rendering of Arabic language labels on the maps:

  1. Arabic place names often include diacritics. Those are being rendered as individual characters on the maps instead of as diacritics on the characters themselves. Example, Al-Quds (Jerusalem) is labelled ال ق ً دس instead of القُدس. See screenshot below.

  2. Sometimes, Arabic labels are rendered right to left correctly, but the letters are disconnected. e.g. the label for القاطع is rendered as ا ل ق ا ط ع. See the second screenshot in my tweet for examples (Discourse won’t allow me to upload two images in one post). Important to note is that in most cases, those labels are rendered correctly, but there is a noticeable number of incorrectly rendered labels.

Finally, not a bug, but an important point nonetheless: the font used to render the Arabic labels is Tahoma. It used to be one of the default system fonts in many cases, but operating systems have shifted away from it because it’s not easy to read in Arabic. There are many open fonts that you could use as an alternative. I would suggest Lateef or Katibeh, both are FOSS fonts available on Google Fonts.

I’m happy to provide further details and specialized Arabic language knowledge if needed (although I’m not sure how helpful I can be with the technical details of font rendering).

Hi @majdal,

thanks so much for the very detailed report!

I’ll ping the dev who created Mapsurfer.NET, he unfortunately left our group a while ago.

Are you able to confirm that (some of) this is not an issue on OSM labels? I’m not too familiar with the rendering specifics myself, but I’d guess that the input for the name comes directly from OSM tags. I can’t verify it’s an issue in OSM, but maybe you can have a quick look on one of the bad examples.

Although I’m fairly sure it’s pure rendering issue as you suggest.

1 Like

Thanks for the reply, @nils!

I hadn’t realized that you use Mapserfer.NET in the stack. Looking at the Github repo, it hasn’t been updated since 2018, which is a long time…

The way that the OSM renderer deals with this issue by dropping the diacritics from the labels. The image below shoes the same label as in the bottom-left hand side (بيت أمر), from the original OSM tiles.


FYI, the problem with Arabic label rendering is a chronic one in the map community. It pains me that it continues to be so until now. Even Mapbox hasn’t bothered to fix Arabic font rendering: See the example below: