Improved textlayout creation