mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-24 12:46:10 +03:00
refactor: use if expression instead of switch
This commit is contained in:
@ -27,18 +27,7 @@ pub const Face = switch (options.backend) {
|
||||
/// using whatever platform method you can.
|
||||
pub const default_dpi = if (builtin.os.tag == .macos) 72 else 96;
|
||||
|
||||
pub const FreetypeLoadFlags = switch (options.backend) {
|
||||
.freetype,
|
||||
.fontconfig_freetype,
|
||||
.coretext_freetype,
|
||||
=> config.Config.FreetypeLoadFlags,
|
||||
|
||||
.coretext,
|
||||
.coretext_harfbuzz,
|
||||
.coretext_noshape,
|
||||
.web_canvas,
|
||||
=> void,
|
||||
};
|
||||
pub const FreetypeLoadFlags = if (options.backend.hasFreetype()) config.Config.FreetypeLoadFlags else void;
|
||||
pub const freetype_load_flags_default = if (options.backend.hasFreetype()) .{} else {};
|
||||
|
||||
/// Options for initializing a font face.
|
||||
|
Reference in New Issue
Block a user