Adding text justification algorithm