hearth icon indicating copy to clipboard operation
hearth copied to clipboard

terminal: implement built-in box-drawing characters

Open marceline-cramer opened this issue 2 years ago • 13 comments

Box-drawing characters are special Unicode characters used for drawing shapes in terminal interfaces. Most fonts don't come with glyphs for these characters, so it's typically up to the terminal emulator to draw these characters instead.

Without implementing this, many terminal programs will fail to display properly because of missing glyphs. This is moderately high-priority to correct with regards to Hearth's development.

To implement this, we can reference the built-in glyphs generated by Alacritty. A major difference between Alacritty's glyph rendering and Hearth's is that it renders its glyphs to GPU-ready textures but Hearth uses meshes for non-MSDF glyphs. This will need to be kept in mind while designing our procedural glyph generation code. We will also need to introduce code to take glyphs for specific characters from the built-in code but glyphs from the loaded font otherwise.

Although this is moderate priority and high difficulty, implementing this will not require much graphics-specific knowledge. Everything can be done CPU-side with no need to modify any GPU-related code.

marceline-cramer avatar Feb 11 '23 04:02 marceline-cramer