Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Terminal font not correctly identified using xterm under FreeBSD #1095

Closed
fmc000 opened this issue Jul 14, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@fmc000
Copy link

fmc000 commented Jul 14, 2024

General description of bug:

  • Fastfetch shows "Terminal Font: fixed (8.0pt)" when terminal is xterm and OS is FreeBSD 14.1
  • What should happen: the font is actually "Liberation Mono 11" in my configuration
  • Fastfetch version used: 2.17.2
  • Did it work in an older version: I don't know - i just switched from mate-terminal (working) to xterm (not working)
  • Where did you get the binary: pkg install fastfetch

Often helpful information:

Screenshot:
Screenshot at 2024-07-14 14-40-48

The content of the configuration file you use (if any):

{
  "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
  "modules": [
    "kernel",
    "packages",
    "de",
    "terminalfont",
    "memory",
    "battery",
    "poweradapter",
  ]
}
@fmc000 fmc000 added the bug Something isn't working label Jul 14, 2024
@fmc000
Copy link
Author

fmc000 commented Jul 14, 2024

OK, I found the bug. In the source, in case of xterm, you look for:

ffParsePropFileHomeValues(".Xresources", 2, (FFpropquery[]) {
{"xterm*faceName:", &fontName},
{"xterm*faceSize:", &fontSize},
});

but .Xresources is somewhat case-insensitive, so I actually had:

XTerm*faceName: Liberation Mono
XTerm*faceSize: 11

and thus fastfetch went for the default, which is:

if (fontName.length == 0)
ffStrbufAppendS(&fontName, "fixed");
if (fontSize.length == 0)
ffStrbufAppendS(&fontSize, "8.0");

I therefore modified my .Xresources to use only lowercase letters and now it's all good.

Screenshot at 2024-07-14 18-11-43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant