ZiYueCommentary / Blitz3D

Blitz3D TSS Source
zlib License
6 stars 4 forks source link

Underline and strikethrough #15

Open ZiYueCommentary opened 2 months ago

ZiYueCommentary commented 2 months ago

Adding underline or strikethrough to glyph when loading fonts.

iiAngel commented 2 months ago

Recently saw the comment you left on the PR, thanks for contacting. 😉

My question is does the strikethrough/underline line have to be scaled (relative to text size) or it can be just 1 pixel in width?

ZiYueCommentary commented 2 months ago

They should being scaled. I found that there is underlinePosition and underlineThickness in TT_Postscript, so underline should be simpler relatively.

Sadly configurations for strikethrough are not available in all font formats. My thought is using underlineThickness for thickness, and render at (median + baseline) / 2.

Strikethrough and underline should be rendered with glyphs together, just like vanillia Blitz3D (maybe?).

Strikethrough can be delayed if it is too difficult. Thank you for collaborating! 😉