font: use regular JB Mono with dedicated Symbol font

Fixes #7069

I'm not sure if this will have follow-on negative effects. In my day to
day usage everything looks fine but its hard to really know. I think our
best chance is to merge this and see what feedback we get. I know for
sure positively that it does two things:

  1. Fixes the small symbols noted in #7069.
  2. Makes our binary size smaller since we no longer have unnecessary
     symbols embedded in our stylized fonts.
This commit is contained in:
Mitchell Hashimoto 2025-04-15 09:19:03 -07:00
parent 392aab2e4a
commit 129ca02f95
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
10 changed files with 15 additions and 5 deletions

View File

@ -291,6 +291,15 @@ fn collection(
load_options.faceOptions(),
) },
);
_ = try c.add(
self.alloc,
.regular,
.{ .fallback_loaded = try Face.init(
self.font_lib,
font.embedded.symbols,
load_options.faceOptions(),
) },
);
// On macOS, always search for and add the Apple Emoji font
// as our preferred emoji font for fallback. We do this in case

View File

@ -6,12 +6,13 @@
//! redistribution and include their license as necessary.
/// Default fonts that we prefer for Ghostty.
pub const regular = @embedFile("res/JetBrainsMonoNerdFont-Regular.ttf");
pub const bold = @embedFile("res/JetBrainsMonoNerdFont-Bold.ttf");
pub const italic = @embedFile("res/JetBrainsMonoNerdFont-Italic.ttf");
pub const bold_italic = @embedFile("res/JetBrainsMonoNerdFont-BoldItalic.ttf");
pub const regular = @embedFile("res/JetBrainsMono-Regular.ttf");
pub const bold = @embedFile("res/JetBrainsMono-Bold.ttf");
pub const italic = @embedFile("res/JetBrainsMono-Italic.ttf");
pub const bold_italic = @embedFile("res/JetBrainsMono-BoldItalic.ttf");
pub const emoji = @embedFile("res/NotoColorEmoji.ttf");
pub const emoji_text = @embedFile("res/NotoEmoji-Regular.ttf");
pub const symbols = @embedFile("res/SymbolsNerdFontMono-Regular.ttf");
/// Fonts with general properties
pub const arabic = @embedFile("res/KawkabMono-Regular.ttf");
@ -24,7 +25,7 @@ pub const nerd_font = @embedFile("res/JetBrainsMonoNerdFont-Regular.ttf");
pub const code_new_roman = @embedFile("res/CodeNewRoman-Regular.otf");
pub const inconsolata = @embedFile("res/Inconsolata-Regular.ttf");
pub const geist_mono = @embedFile("res/GeistMono-Regular.ttf");
pub const jetbrains_mono = @embedFile("res/JetBrainsMonoNoNF-Regular.ttf");
pub const jetbrains_mono = @embedFile("res/JetBrainsMono-Regular.ttf");
pub const julia_mono = @embedFile("res/JuliaMono-Regular.ttf");
/// Cozette is a unique font because it embeds some emoji characters

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.