I agree with Omer. I think that FriBidi should not deal with shaping but only with the implementation of the BiDi algorithm. You might want to create a different library called FriBidiShaping for that. Regards, Dov