From what I understand, it's up to fonts to turn Arabic (and Persian) characters from their canonical forms (Unicode around 600) to their glyph forms (Unicode around FB00) where appropriate.
(Arabic letters can be connected to their last and/or next character so they usually have 4 different glyph forms)
I am now trying to draw charts using Vaadin with labels which may contain such letters and some specific letters (like 'ک' or 'ی') stay in their base form no matter where they appear in the word, like what I expect is "الکتاب" and what I get is "الکتاب".
The solution I thought of was to manually change every letter into its appropriate glyph form using a HashMap of base forms to an array of glyph forms, but I believe there should be a way to do this in java's libraries. I have seen this answer which does a similar thing using GlyphVector on a font but it's kind of complicated for my case.
Thanks in advance.