Hacker News new | ask | show | jobs
by zawaideh 576 days ago
The other issue is that the arabic font is not rendering correctly in the vector version. It's rendering left to right (instead of right to left) with characters broken up instead of linked.
2 comments

The whole point of vector tiles is that the rendering is local and controlled by a style configuration (except for the tile schema) that can be changed. So the brokenness you are seeing is either in the style or the library that is rendering the contents locally.
Indeed, but that is probably not going to help end users of apps.
Well nobody claimed things are going to get simpler.

It is difficult to beat raster tiles in that respect. vector tiles split up responsibility for what you get visually over multiple moving pieces with different provenance and operators.

> It is difficult to beat raster tiles in that respect.

Intuitively, why can't the local vector rasterizer do whatever the server-side tile rasterizer does, especially if both are fully custom?

Partially because they're completely different stacks -- the client side is WebGL + Javascript, and the server side is whatever they've been doing for 15 years.

They're probably missing a raqm/freebidi or something in the stack on the client side.

Ah, so the input into the client-side isn't OSM-like data (i.e. OSM XML or some high-level transform of that), but rather something closer to a vector graphics format like SVG?

That makes sense then, thank you!

It can, it's just that they typically don't, because they use an off the shelf data schema for the tiles and a library to handle the rendering.

Having the data in tiles also complicates some things (where the renderer needs to consider merged tiles to get a similar result).

For Arabic specifically, different users want text to render differently, so you'd want to do it on the client if you can.

(Some countries use Roman numerals and some use Arabic numerals for numbers. And by Arabic numerals I don't mean 1-9.)

All Arabic-speaking countries use Arabic numerals. Some use Western Arabic numerals (123) and some use Eastern Arabic numerals (١٢٣).

Roman numerals are I, V, X, etc.

it looks like the selected font doesn't support arabic text, producing the disconnected characters.
It's likely an issue with displaying Arabic text in WebGL, since that needs to handle all of the possible options for each letter in the text-shaping.
I'm not sure how the QGIS vector tile renderer works, but for the github demo page it would be easy to add the RTL text plugin to MapLibre to correctly handle the RTL text: https://maplibre.org/maplibre-gl-js/docs/examples/mapbox-gl-...