Some of my users have requested a strikethrough text formatting option so I have just added that and while testing I noticed that it works in most components but not in one where I’m using TextLayout to draw the text.
I noticed that in this case the already implemented underlining also isn’t working.
It just doesn’t underline the text when using the TextLayout::createNativeLayout function. It does work with TextLayout::createStandardLayout which is however only used if the native layout fails (which isn’t the case here).
In CoreTextTypeLayout::createLayout and the functions called from there the underline attribute is never accessed. It kinda makes sense as the underline attribute doesn’t change the text layout per se. But as the createLayout function also sets the font to the TextLayout runs, it makes sense that it’s also not drawn when TextLayout::draw is called.
Any ideas how to make TextLayout also draw underlined text and in turn also my added strikethrough option which I’m of course happy to share with the community as a format patch?