font: update comment

This commit is contained in:
Mitchell Hashimoto
2023-06-30 22:55:41 -07:00
parent b5cc37e20c
commit e99376cac1

View File

@ -402,9 +402,7 @@ pub const Face = struct {
const lines = frame.getLines(); const lines = frame.getLines();
const line = lines.getValueAtIndex(macos.text.Line, 0); const line = lines.getValueAtIndex(macos.text.Line, 0);
// NOTE(mitchellh): For some reason, CTLineGetBoundsWithOptions // Get the bounds of the line to determine the ascent.
// returns garbage and I can't figure out why... so we use the
// raw ascender.
const bounds = line.getBoundsWithOptions(.{ .exclude_leading = true }); const bounds = line.getBoundsWithOptions(.{ .exclude_leading = true });
const bounds_ascent = bounds.size.height + bounds.origin.y; const bounds_ascent = bounds.size.height + bounds.origin.y;
const baseline = @floor(bounds_ascent + 0.5); const baseline = @floor(bounds_ascent + 0.5);