This commit is contained in:
Mitchell Hashimoto
2024-08-23 21:19:20 -07:00
parent ce6c5517af
commit ac3e2163f3
2 changed files with 4 additions and 4 deletions

View File

@ -328,7 +328,7 @@ pub fn completeStyles(self: *Collection, alloc: Allocator) CompleteError!void {
} }
} }
// Create an synthetic italic font face from the given entry and return it. // Create a synthetic bold font face from the given entry and return it.
fn syntheticBold(self: *Collection, entry: *Entry) !Face { fn syntheticBold(self: *Collection, entry: *Entry) !Face {
// Not all font backends support synthetic bold. // Not all font backends support synthetic bold.
if (comptime !@hasDecl(Face, "syntheticBold")) return error.SyntheticBoldUnavailable; if (comptime !@hasDecl(Face, "syntheticBold")) return error.SyntheticBoldUnavailable;
@ -348,7 +348,7 @@ fn syntheticBold(self: *Collection, entry: *Entry) !Face {
return face; return face;
} }
// Create an synthetic italic font face from the given entry and return it. // Create a synthetic italic font face from the given entry and return it.
fn syntheticItalic(self: *Collection, entry: *Entry) !Face { fn syntheticItalic(self: *Collection, entry: *Entry) !Face {
// Not all font backends support synthetic italicization. // Not all font backends support synthetic italicization.
if (comptime !@hasDecl(Face, "syntheticItalic")) return error.SyntheticItalicUnavailable; if (comptime !@hasDecl(Face, "syntheticItalic")) return error.SyntheticItalicUnavailable;

View File

@ -187,7 +187,7 @@ pub const Face = struct {
errdefer ct_font.release(); errdefer ct_font.release();
var face = try initFont(ct_font, opts); var face = try initFont(ct_font, opts);
// TO determine our synthetic bold line width we get a multiplier // To determine our synthetic bold line width we get a multiplier
// from the font size in points. This is a heuristic that is based // from the font size in points. This is a heuristic that is based
// on the fact that a line width of 1 looks good to me at 12 points // on the fact that a line width of 1 looks good to me at 12 points
// and we want to scale that up roughly linearly with the font size. // and we want to scale that up roughly linearly with the font size.