Mitchell Hashimoto
8edf52f832
Add some padding to emoji
2022-10-06 15:45:05 -07:00
Mitchell Hashimoto
b18309187e
Strikethrough ( #19 )
...
Not as straightforward as it sounds, but not hard either:
* Read OS/2 sfnt tables from TrueType fonts
* Calculate strikethrough position/thickness (prefer font-advertised if possible, calculate if not)
* Plumb the SGR code through the terminal state -- does not increase cell memory size
* Modify the shader to support it
The shaders are getting pretty nasty after this... there's tons of room for improvement. I chose to follow the existing shader style for this to keep it straightforward but will likely soon refactor the shaders.
2022-10-06 15:03:19 -07:00
Mitchell Hashimoto
3d4aacd51d
underline is derived from the primary font
2022-10-04 11:08:07 -07:00
Mitchell Hashimoto
c149696f61
redoing some of the baseline calcs, remove from shader
2022-10-04 10:00:32 -07:00
Mitchell Hashimoto
90e4d12f79
only scale fonts to height
2022-09-07 15:59:23 -07:00
Mitchell Hashimoto
c1bb6450b0
fix some emoji sizing
2022-09-07 14:41:37 -07:00
Mitchell Hashimoto
480d262bc1
Calculate grid_width properly, use that instead of wide mask in shader
2022-09-05 11:38:53 -07:00
Mitchell Hashimoto
3231b84927
Ligatures
...
This introduces a naive first pass at integrating ligatures. The basic
ligatures (such as "==" in some fonts) work great. Skin-toned emoji are
struggling a bit.
This isn't the most performant way to do this, either, and I plan on
improving that.
2022-09-05 11:38:52 -07:00
Mitchell Hashimoto
483bb90cf9
shader: only downsample glyph if its bigger than width plus padding
2022-08-28 16:57:30 -07:00
Mitchell Hashimoto
13225a2d78
remove done shader TODO
2022-08-20 17:39:34 -07:00
Mitchell Hashimoto
8a1d7070b3
render wide chars
2022-08-20 16:49:55 -07:00
Mitchell Hashimoto
6026fdf834
only downsample size if its an emoji
2022-08-20 10:37:12 -07:00
Mitchell Hashimoto
22ed65a818
really hacked in emoji support, time to clean it up
2022-08-20 10:37:11 -07:00
Mitchell Hashimoto
eeaad799e5
get rid of Z buffer stuff
...
This optimization will take more work, and we already got a lot of the
way there by optimizing how we send data down to the GPU.
2022-08-19 13:48:34 -07:00
Mitchell Hashimoto
390d95a5af
Enable depth buffer, add depth to shader
2022-08-19 10:07:30 -07:00
Mitchell Hashimoto
f53efa633a
initial underline support, can be improved
2022-06-28 14:22:25 -07:00
Mitchell Hashimoto
75c3dc4386
render: bar cursor style
2022-05-20 13:17:31 -07:00
Mitchell Hashimoto
bd7855da46
when losing focus, show hollow box
2022-04-22 21:58:15 -07:00
Mitchell Hashimoto
d250bcda65
fix the baseline for font rendering
2022-04-19 19:30:30 -07:00
Mitchell Hashimoto
e2ed1ed745
shader modes, draw a jank cursor
2022-04-19 13:54:50 -07:00
Mitchell Hashimoto
7a00c54f25
cell: convert atlas x/y to NDC in shader
2022-04-19 09:20:55 -07:00
Mitchell Hashimoto
ac8120f073
update some comments
2022-04-19 09:02:50 -07:00
Mitchell Hashimoto
c43c1d38f1
add background pass
2022-04-19 08:54:39 -07:00
Mitchell Hashimoto
81d8ca5b9c
render text from our terminal!
2022-04-18 17:57:08 -07:00
Mitchell Hashimoto
4d9b67fa65
model direct gpu cell
2022-04-15 09:10:32 -07:00
Mitchell Hashimoto
e672c9d7d5
calculate grid size in dedicated struct, tests
2022-04-15 08:16:22 -07:00
Mitchell Hashimoto
ce70efd771
render a rainbow grid
2022-04-14 17:44:40 -07:00
Mitchell Hashimoto
544286509f
grid render a few cells
2022-04-14 17:14:49 -07:00