Replies: 1 comment 1 reply
-
It would actually be really nice if glyphon had a built-in way to render underlines, selection highlights, and strike-throughs. In theory this could just be done using triangle meshes. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm thinking about rendering text-decorations (like
underline
,strikethrough
). My understanding is that this isn't something built into glyphon (or cosmic text), which means I'll need to render the decoration myself, which makes sense.What I'm stuck on is rendering breaks or gaps in the decoration to ensure the legibility of the text. Here's a screenshot of firefox with text-decoration underline. Note that the underline is masked out around the descender so that the descender is fully legible.
Does glyphon or cosmic-text provide me any way to know where the descenders are, so I can render the underline correctly? I'd be happy with, like, a list of boxes somewhere in the CPU, or some ability to render text with an additional 1-px width to a stencil texture.
Beta Was this translation helpful? Give feedback.
All reactions