mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
note font size todo
This commit is contained in:
@ -16,12 +16,12 @@ pub fn setup() void {
|
||||
// Our colorspace is sRGB.
|
||||
io.ConfigFlags |= cimgui.c.ImGuiConfigFlags_IsSRGB;
|
||||
|
||||
// Get our style
|
||||
const style = cimgui.c.igGetStyle();
|
||||
cimgui.c.ImGuiStyle_ScaleAllSizes(style, 2);
|
||||
|
||||
// Use our own embedded font
|
||||
{
|
||||
// TODO: This will have to be recalculated for different screen DPIs.
|
||||
// This is currently hardcoded to a 2x content scale.
|
||||
const font_size = 16 * 2;
|
||||
|
||||
const font_config: *cimgui.c.ImFontConfig = cimgui.c.ImFontConfig_ImFontConfig();
|
||||
defer cimgui.c.ImFontConfig_destroy(font_config);
|
||||
font_config.FontDataOwnedByAtlas = false;
|
||||
@ -29,7 +29,7 @@ pub fn setup() void {
|
||||
io.Fonts,
|
||||
@constCast(@ptrCast(Surface.face_ttf)),
|
||||
Surface.face_ttf.len,
|
||||
32,
|
||||
font_size,
|
||||
font_config,
|
||||
null,
|
||||
);
|
||||
|
Reference in New Issue
Block a user