Mitchell Hashimoto
7f40881747
font: faces use primary grid metrics to better line up glyphs
...
Fixes #895
Every loaded font face calculates metrics for itself. One of the
important metrics is the baseline to "sit" the glyph on top of. Prior to
this commit, each rasterized glyph would sit on its own calculated
baseline. However, this leads to off-center rendering when the font
being rasterized isn't the font that defines the terminal grid.
This commit passes in the font metrics for the font defining the
terminal grid to all font rasterization requests. This can then be used
by non-primary fonts to sit the glyph according to the primary grid.
2023-12-02 09:51:15 -08:00
Mitchell Hashimoto
ec8f3d036e
renderer/opengl: implement min contrast
2023-12-01 21:55:51 -08:00
Mitchell Hashimoto
bb60d2c1c0
renderer/opengl: urls
2023-11-29 15:30:23 -08:00
Mitchell Hashimoto
cf8a0bdaec
renderer: handle Kitty images where z < 0 for all placements
2023-11-20 21:34:17 -08:00
Mitchell Hashimoto
9988dedb80
renderr/opengl: stylistic
2023-11-20 09:45:38 -08:00
Mitchell Hashimoto
2a10af90a3
renderer/opengl: draw images
2023-11-19 22:43:39 -08:00
Mitchell Hashimoto
64cacce1cf
renderer/opengl: setup image uniforms
2023-11-19 22:33:06 -08:00
Mitchell Hashimoto
76c76ce85e
renderer/opengl: upload kitty image textures
2023-11-19 22:08:07 -08:00
Mitchell Hashimoto
e55cb274ba
config: custom-shader-animation
2023-11-17 21:51:07 -08:00
Mitchell Hashimoto
61f10dc583
renderer/opengl: new gpucell
2023-11-17 21:51:07 -08:00
Mitchell Hashimoto
8253fc1f31
renderer/opengl: shaders only need one color input
2023-11-17 21:51:07 -08:00
Mitchell Hashimoto
2db36646ac
renderer/opengl: some comments
2023-11-17 21:51:07 -08:00
Mitchell Hashimoto
39e7055853
renderer/opengl: enable animations
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
c8a51a2158
renderer/opengl: create the screen texture
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
fbc13d08b0
renderer/opengl: set resolution uniform on screen size change
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
2559d6b367
renderer/opengl: increment time uniform
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
e0afa442c4
renderer/opengl: better organization of custom shader state
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
47971e7663
renderer/opengl: setup uniform buffer objects for custom shaders
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
5fc91401f2
renderer/opengl: draw custom shaders, simplified
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
da600fee8f
renderer/opengl: pull out cell program drawing to dedicated func
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
1fedc912f0
renderer/opengl: create ubos
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
3502db0f5f
renderer/opengl: start custom program work
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
cc630f10ac
renderer/opengl: only one GPUCell
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
fb0929a11b
renderer/opengl: extract cell program state to dedicated struct
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
46dd084ee9
renderer/opengl: wip
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
8576acb89e
renderer/opengl: move opengl API to pkg/opengl
2023-11-17 21:51:04 -08:00
Mitchell Hashimoto
389712a698
renderer/opengl: switch to new update vs draw
2023-11-17 21:50:34 -08:00
Mitchell Hashimoto
45dfbfe53c
renderer: address issue with inverted cells
2023-11-17 21:47:24 -08:00
Raiden1411
7a239835d2
core: add config option to invert fg and bg of cell when selected
2023-11-18 01:04:14 +00:00
Krzysztof Wolicki
44a48f62f1
change unmodified var
s to const
s in anticipation of zig changes
2023-11-17 15:46:46 +01:00
Mitchell Hashimoto
b5bf7e9d3b
Merge pull request #890 from mitchellh/faint-bg
...
renderer: faint should not be applied to bg alpha
2023-11-15 11:41:35 -08:00
Mitchell Hashimoto
ed3e3764d9
renderer: faint should not be applied to bg alpha
...
Fixes #889
2023-11-15 11:38:16 -08:00
Mitchell Hashimoto
ad24e5e687
renderer/opengl: use new preedit format
2023-11-15 09:59:08 -08:00
Mitchell Hashimoto
5c8c4bb06e
renderer/opengl: handle wide preedit
2023-11-10 17:30:14 -08:00
Gregory Anders
171292a063
core: implement OSC 12 and OSC 112 to query/set/reset cursor color
2023-11-09 16:21:07 -06:00
Gregory Anders
33753f59c8
core: implement OSC 104, 110, and 111 to reset colors
2023-11-09 16:17:21 -06:00
Lukáš Dvořák
bca7140248
balanced padding cleanup
2023-10-30 14:56:02 +01:00
Lukáš Dvořák
6887ea7e53
fix window-padding-balance in combination with explicit padding
2023-10-30 13:46:19 +01:00
Mitchell Hashimoto
06edc311a1
renderer/opengl: reclaim cell buffer memory when resizing
2023-10-28 11:38:20 -07:00
Mitchell Hashimoto
ab35a21dc2
renderer: render cursor behind colored emoji
2023-10-16 12:57:23 -07:00
Mitchell Hashimoto
b4070eb67e
renderer: unfocused cursor should always be fully opaque
2023-10-14 14:11:15 -07:00
Mitchell Hashimoto
ff38d3e358
config: add cursor-opacity
2023-10-14 14:08:06 -07:00
Mitchell Hashimoto
7167cf9054
renderer: default cursor color to foreground
...
Fixes #667
2023-10-14 14:02:17 -07:00
Mitchell Hashimoto
4f5a05e087
renderer: render cursor over wide character if on tail part
2023-10-13 14:39:10 -07:00
Mitchell Hashimoto
7995d44cfb
font: render sprites with a configurable grid cell width
...
Fixes #666
2023-10-13 14:31:55 -07:00
Mitchell Hashimoto
b98cc3d79f
config: add remaining font modifiers
2023-10-04 22:08:19 -07:00
Mitchell Hashimoto
5c1fbd09cd
font: shaper dynamically allocates cell buffer
...
Pathlogical grapheme clusters can use a LOT of memory, so we need to be
able to grow.
2023-09-26 17:59:16 -07:00
Mitchell Hashimoto
b1389cbbfe
renderer: support font style changing at runtime
2023-09-26 08:51:04 -07:00
Mitchell Hashimoto
4b791f3ee1
renderer: always reset font group on config change
2023-09-26 08:18:11 -07:00
Mitchell Hashimoto
4b8056afd8
renderer/opengl: remove gpucell lru cache
...
There was no noticable performance improvement and it complicated the
code and also diverged it from Metal.
2023-09-22 09:47:01 -07:00