Skip to content

[BUG] Ghostty platform-dependent font-size default not detected correctly #1986

@scooter-gh

Description

@scooter-gh

Read the FAQ first

  • I have checked the FAQ but the issue is not covered

Description

Summary

Fastfetch does not correctly detect Ghostty’s default font-size when those values are omitted from Ghostty’s config (i.e. when relying on Ghostty’s platform defaults, or another font matching default font-size). This results in incorrect reporting of the terminal font size on non‑macOS platforms. Verified with Ghostty version 1.2.

What’s Happening

Ghostty omits default-valued settings from ghostty +show-config.
Fastfetch’s detectGhostty():

  • Parses only the printed lines.
  • If font-size is missing, it unconditionally sets it to "13".
  • This also applies to any configured font matching ghostty's default font-size (12 on non-macos).

However, per Ghostty’s source:

  • Default font size:
    @"font-size": f32 = switch (builtin.os.tag) { .macos => 13, else => 12, }
    Meaning: macOS = 13, all other platforms = 12.

Reproduction Steps

  1. Use Ghostty 1.2 on (for example) Linux.
  2. Ensure font-size is omitted or explicitly set to 12.
  3. Run:
    ghostty +show-config | grep '^font-size'
    (No output—because default.)
  4. Run:
    fastfetch -s terminalfont
    Observed: reports font-size 13.
    Expected: font-size 12.
  5. Set font-size = 14 in Ghostty config.
  6. Run both commands again:
    • ghostty +show-config now prints font-size = 14
    • Fastfetch reports 14 correctly.

Actual vs Expected

Platform Config (font-size) Ghostty prints line? Fastfetch (current) Expected
Linux omitted / 12 no 13 12
Linux 14 yes 14 14
macOS omitted / 13 no 13 13
macOS 12 yes 12 12

Root Cause

  • Ghostty suppresses default-valued keys → fastfetch sees no font-size line.
  • Fastfetch assumes absence means “use 13.”
  • Ghostty’s default differs by platform (13 only on macOS).

Version used

fastfetch 2.53.0 (x86_64)

Bug prevalence

Always

Regression

Not sure

Installation

Package manager

Package manager

pacman

Screenshots

No response

Configuration

System information

N/A

Features built-in

threads
vulkan
wayland
xcb-randr
xrandr
drm
drm_amdgpu
gio
dconf
dbus
imagemagick7
chafa
zlib
sqlite3
opencl
libpulse
libddcutil
libelf
libzfs
Directx Headers
System yyjson
linux/videodev2
linux/wireless

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions