compiling again doesnt change font size though

This commit is contained in:
Gabriel Dinner-David
2024-11-23 06:25:48 -05:00
parent 133520e067
commit fa24e0482b
4 changed files with 7 additions and 3 deletions

View File

@ -67,7 +67,8 @@ pub const App = struct {
.renderer_health,
.color_change,
.pwd,
.config_change_conditional_state,
.reload_config,
.config_change,
=> log.info("unimplemented action={}", .{action}),
}
}

View File

@ -2638,6 +2638,7 @@ pub fn changeConditionalState(
/// Expand the relative paths in config-files to be absolute paths
/// relative to the base directory.
fn expandPaths(self: *Config, base: []const u8) !void {
if (builtin.cpu.arch == .wasm32) return error.WasmCannotExpandPaths;
const arena_alloc = self._arena.?.allocator();
// Keep track of this step for replays

View File

@ -383,8 +383,8 @@ pub const Wasm = struct {
const y_start = -@as(isize, @intCast(cell.render.glyph.atlas_y));
try ctx.call(void, "putImageData", .{
if (cell.render.presentation == .emoji) colour_data else gray_data,
x_start + @as(isize, @intCast(cell.x * grid.metrics.cell_width)) + cell.render.glyph.offset_x,
y_start + @as(isize, @intCast(cell.y * grid.metrics.cell_height)) + cell.render.glyph.offset_y,
x_start + @as(isize, @intCast(cell.x * grid.metrics.cell_width)) - cell.render.glyph.offset_x,
y_start + @as(isize, @intCast(cell.y * grid.metrics.cell_height)) - cell.render.glyph.offset_y,
cell.render.glyph.atlas_x,
cell.render.glyph.atlas_y,
cell.render.glyph.width,

View File

@ -34,12 +34,14 @@ fn run_(str: []const u8) !void {
try config.finalize();
std.log.err("font-size {}", .{config.@"font-size"});
config.@"font-size" = 32;
std.log.err("font-size {}", .{config.@"font-size"});
const app = try App.create(alloc);
// Create our runtime app
var app_runtime = try apprt.App.init(app, .{});
const surface = try alloc.create(Surface);
const apprt_surface = try alloc.create(apprt.Surface);
try surface.init(alloc, &config, app, &app_runtime, apprt_surface);
try surface.updateConfig(&config);
std.log.err("{}", .{surface.size});
try surface.renderer.setScreenSize(surface.size);
const esc = "\x1b[";