mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
renderer/metal: font changes needs to reset cell contents
This commit is contained in:
@ -676,6 +676,15 @@ pub fn setFontGrid(self: *Metal, grid: *font.SharedGrid) void {
|
|||||||
const metrics = grid.metrics;
|
const metrics = grid.metrics;
|
||||||
self.grid_metrics = metrics;
|
self.grid_metrics = metrics;
|
||||||
|
|
||||||
|
// Reset our cell contents.
|
||||||
|
self.cells.resize(self.alloc, self.gridSize().?) catch |err| {
|
||||||
|
// The setFontGrid function can't fail but resizing our cell
|
||||||
|
// buffer definitely can fail. If it does, our renderer is probably
|
||||||
|
// screwed but let's just log it and continue until we can figure
|
||||||
|
// out a better way to handle this.
|
||||||
|
log.err("error resizing cells buffer err={}", .{err});
|
||||||
|
};
|
||||||
|
|
||||||
// Update our uniforms
|
// Update our uniforms
|
||||||
self.uniforms = .{
|
self.uniforms = .{
|
||||||
.projection_matrix = self.uniforms.projection_matrix,
|
.projection_matrix = self.uniforms.projection_matrix,
|
||||||
|
Reference in New Issue
Block a user