> but when rendering you could stretch individual glyphs to the desired width

“Individual glyphs” :)

It’s Arabic, so you wouldn’t stretch a single glyph, id would have to e done after shaping so you can work out the next run (either a single Aleph or the joined characters) in order to know what is stretchable (then throw it to your layout step)