chore: zig fmt

This commit is contained in:
Tim Culverhouse
2025-03-06 09:56:23 -06:00
parent e07b6fdf6b
commit 22ed08cfd8

View File

@ -1392,29 +1392,29 @@ pub fn rebuildCells(
// Try to read the cells from the shaping cache if we can. // Try to read the cells from the shaping cache if we can.
self.font_shaper_cache.get(run) orelse self.font_shaper_cache.get(run) orelse
cache: { cache: {
// Otherwise we have to shape them. // Otherwise we have to shape them.
const cells = try self.font_shaper.shape(run); const cells = try self.font_shaper.shape(run);
// Try to cache them. If caching fails for any reason we // Try to cache them. If caching fails for any reason we
// continue because it is just a performance optimization, // continue because it is just a performance optimization,
// not a correctness issue. // not a correctness issue.
self.font_shaper_cache.put( self.font_shaper_cache.put(
self.alloc, self.alloc,
run, run,
cells, cells,
) catch |err| { ) catch |err| {
log.warn( log.warn(
"error caching font shaping results err={}", "error caching font shaping results err={}",
.{err}, .{err},
); );
};
// The cells we get from direct shaping are always owned
// by the shaper and valid until the next shaping call so
// we can safely use them.
break :cache cells;
}; };
// The cells we get from direct shaping are always owned
// by the shaper and valid until the next shaping call so
// we can safely use them.
break :cache cells;
};
// Advance our index until we reach or pass // Advance our index until we reach or pass
// our current x position in the shaper cells. // our current x position in the shaper cells.
while (shaper_cells.?[shaper_cells_i].x < x) { while (shaper_cells.?[shaper_cells_i].x < x) {
@ -1637,29 +1637,29 @@ pub fn rebuildCells(
// Try to read the cells from the shaping cache if we can. // Try to read the cells from the shaping cache if we can.
self.font_shaper_cache.get(run) orelse self.font_shaper_cache.get(run) orelse
cache: { cache: {
// Otherwise we have to shape them. // Otherwise we have to shape them.
const cells = try self.font_shaper.shape(run); const cells = try self.font_shaper.shape(run);
// Try to cache them. If caching fails for any reason we // Try to cache them. If caching fails for any reason we
// continue because it is just a performance optimization, // continue because it is just a performance optimization,
// not a correctness issue. // not a correctness issue.
self.font_shaper_cache.put( self.font_shaper_cache.put(
self.alloc, self.alloc,
run, run,
cells, cells,
) catch |err| { ) catch |err| {
log.warn( log.warn(
"error caching font shaping results err={}", "error caching font shaping results err={}",
.{err}, .{err},
); );
};
// The cells we get from direct shaping are always owned
// by the shaper and valid until the next shaping call so
// we can safely use them.
break :cache cells;
}; };
// The cells we get from direct shaping are always owned
// by the shaper and valid until the next shaping call so
// we can safely use them.
break :cache cells;
};
const cells = shaper_cells orelse break :glyphs; const cells = shaper_cells orelse break :glyphs;
// If there are no shaper cells for this run, ignore it. // If there are no shaper cells for this run, ignore it.