[BUG] Terminal font detection issue on Alacritty

Read the FAQ first

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

Description

When running Fastfetch in Alacritty, the font detection module incorrectly reports the font name as "alacritty" instead of the actual configured font family.

Image

This happens when the Alacritty configuration is in the newer TOML format and uses nested tables for font definition like this:

[font]
size = 12.0
normal = { family = "Maple Mono NL NF CN", style = "Regular" }
bold = { family = "Maple Mono NL NF CN", style = "Bold" }
italic = { family = "Maple Mono NL NF CN", style = "Italic" }
bold_italic = { family = "Maple Mono NL NF CN", style = "Bold Italic" }

According to detectAlacritty(), it looks like the current code only queries for top-level keys "family" and "size"

        FFpropquery fontQueryToml[] = {
            {"family =", &fontName},
            {"size =", &fontSize},
        };

resulting in the fallback being triggered

    if(fontName.length == 0)
        ffStrbufAppendS(&fontName, "alacritty");

The top-level key "family" is not valid in the latest Alacritty configuration whatsoever, and since people can use multiple style-specific fonts at the same time, the parsing logic might be better off handling the entire [font] table and merge the result?

Version used

fastfetch 2.55.1 (aarch64)

Bug prevalence

Always

Regression

Not sure

Installation

Package manager

Package manager

pacman

Screenshots

No response

Configuration

System information

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