mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-23 12:16:11 +03:00
font: fix sign of usWinDescent interpretation
This commit is contained in:
@ -647,7 +647,9 @@ pub const Face = struct {
|
|||||||
const win_descent: f64 = @floatFromInt(os2.usWinDescent);
|
const win_descent: f64 = @floatFromInt(os2.usWinDescent);
|
||||||
break :vertical_metrics .{
|
break :vertical_metrics .{
|
||||||
win_ascent * px_per_unit,
|
win_ascent * px_per_unit,
|
||||||
win_descent * px_per_unit,
|
// usWinDescent is *positive* -> down unlike sTypoDescender
|
||||||
|
// and hhea.Descender, so we flip its sign to fix this.
|
||||||
|
-win_descent * px_per_unit,
|
||||||
0.0,
|
0.0,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -689,7 +689,9 @@ pub const Face = struct {
|
|||||||
const win_descent: f64 = @floatFromInt(os2.usWinDescent);
|
const win_descent: f64 = @floatFromInt(os2.usWinDescent);
|
||||||
break :vertical_metrics .{
|
break :vertical_metrics .{
|
||||||
win_ascent * px_per_unit,
|
win_ascent * px_per_unit,
|
||||||
win_descent * px_per_unit,
|
// usWinDescent is *positive* -> down unlike sTypoDescender
|
||||||
|
// and hhea.Descender, so we flip its sign to fix this.
|
||||||
|
-win_descent * px_per_unit,
|
||||||
0.0,
|
0.0,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user