[BUG] No search icon in rofi search input field
Describe the bug No search icon appears in rofi-window in the search input field
To Reproduce Press CTR+Meta+Return to lauch rofi
Expected behavior There schould be a search icon in the search input field (left to the cursor position/search label). Instead there is a glyph consisting of four rectangles.
Screenshot
Distribution
- Fedora Workstation 41 (current packages, with hyprland packages from https://copr.fedorainfracloud.org/coprs/solopasha/hyprland/) . ML4W installed according to the official wiki (tag release 2.0.7.3).
Additional context My installation probably misses a font or another asset. A message in the installer about required and optional fonts/assets or a list of dependencies in the wiki would probably be helpful to me and other users. Love the dot-flies, BTW. Thanks guys.
Thanks for testing. Will check on my system and give you feedback. One Question. Have you the ms-tt-fonts installed? The Microsoft font package?
I am on fedora and I can see the search icon. Can you also check that Font Awesome has been installed?
Hello, I have the following packages installed: msttcore-fonts-installer 2.6.1 from https://mscorefonts2.sourceforge.net/ fontawesome-6-brands-fonts.noarch 1:6.7.2-1.fc41 updates fontawesome-6-free-fonts.noarch 1:6.7.2-1.fc41 updates fontawesome-fonts-all.noarch 1:6.7.2-1.fc41 updates fontawesome-fonts-web.noarch 1:6.7.2-1.fc41 updates
Furthermore, the command:
fc-list --format="%{family[0]}\n" | sort | uniq
yields the following output:
Abadi MT Condensed
Agency FB
Algerian
Andale Mono
Arial
Arial Black
Arial Rounded MT Bold
Bahnschrift
Baskerville Old Face
Bauhaus 93
Bell MT
Berlin Sans FB
Berlin Sans FB Demi
Bernard MT Condensed
Blackadder ITC
Bodoni MT
Book Antiqua
Bookman Old Style
Bookshelf Symbol 7
Bradley Hand ITC
Breitkopf Fraktur
Britannic Bold
Broadway
Broadway-Engraved
Brush Script MT
C059
Caladea
Calibri
Californian FB
Calisto MT
Cambria
Cambria Math
Candara
Cantarell
Carlito
Castellar
Centaur
Century
Century Gothic
Century Schoolbook
Chiller
Colonna MT
Comfortaa
Comic Sans MS
Consolas
Constantia
Cooper Black
Copperplate Gothic Bold
Copperplate Gothic Light
Corbel
Courier New
Curlz MT
D050000L
DejaVu Sans
Droid Arabic Kufi
Droid Sans
Droid Sans Armenian
Droid Sans Devanagari
Droid Sans Ethiopic
Droid Sans Fallback
Droid Sans Georgian
Droid Sans Hebrew
Droid Sans Japanese
Droid Sans Tamil
Droid Sans Thai
Dubai
Ebrima
Edwardian Script ITC
Elephant
Engravers MT
Eras Bold ITC
Eras Demi ITC
Eras Light ITC
Eras Medium ITC
FantasqueSansM Nerd Font
FantasqueSansM Nerd Font Mono
FantasqueSansM Nerd Font Propo
Felix Titling
Fira Code
Fira Sans
Fira Sans Condensed
Font Awesome 6 Brands
Font Awesome 6 Free
Footlight MT Light
Forte
Franklin Gothic Book
Franklin Gothic Demi
Franklin Gothic Demi Cond
Franklin Gothic Heavy
Franklin Gothic Medium
Franklin Gothic Medium Cond
Freestyle Script
French Script MT
Gabriola
Gadugi
Garamond
Georgia
Gigi
Gill Sans MT
Gill Sans MT Condensed
Gill Sans MT Ext Condensed Bold
Gill Sans Ultra Bold
Gill Sans Ultra Bold Condensed
Gloucester MT Extra Condensed
Goudy Old Style
Goudy Stout
Haettenschweiler
Harlow Solid Italic
Harrington
High Tower Text
HoloLens MDL2 Assets
HP Simplified
Impact
Informal Roman
Ink Free
Javanese Text
Jokerman
Jomolhari
Juice ITC
Kristen ITC
Kunstler Script
Leelawadee UI
Liberation Mono
Liberation Sans
Liberation Serif
Lucida Bright
Lucida Calligraphy
Lucida Console
Lucida Fax
Lucida Handwriting
Lucida Sans
Lucida Sans Typewriter
Lucida Sans Unicode
Madan
Magneto
Maiandra GD
Malgun Gothic
Marlett
Matura MT Script Capitals
Microsoft Himalaya
Microsoft JhengHei
Microsoft JhengHei UI
Microsoft New Tai Lue
Microsoft PhagsPa
Microsoft Sans Serif
Microsoft Tai Le
Microsoft YaHei
Microsoft YaHei UI
Microsoft Yi Baiti
MingLiU-ExtB
MingLiU_HKSCS-ExtB
Mistral
Modern No. 20
Mongolian Baiti
Monotype Corsiva
Montserrat
MS Gothic
MS Outlook
MS PGothic
MS Reference Sans Serif
MS Reference Specialty
MS UI Gothic
MT Extra
MV Boli
Myanmar Text
Niagara Engraved
Niagara Solid
Nimbus Mono PS
Nimbus Roman
Nimbus Sans
Nimbus Sans Narrow
Nirmala UI
Noto Color Emoji
Noto Naskh Arabic
Noto Sans
Noto Sans Arabic
Noto Sans Armenian
Noto Sans Bengali
Noto Sans Canadian Aboriginal
Noto Sans Cherokee
Noto Sans CJK HK
Noto Sans CJK JP
Noto Sans CJK KR
Noto Sans CJK SC
Noto Sans CJK TC
Noto Sans Devanagari
Noto Sans Ethiopic
Noto Sans Georgian
Noto Sans Gujarati
Noto Sans Gurmukhi
Noto Sans Hebrew
Noto Sans Kannada
Noto Sans Khmer
Noto Sans Lao
Noto Sans Math
Noto Sans Meetei Mayek
Noto Sans Mono
Noto Sans Mono CJK HK
Noto Sans Mono CJK JP
Noto Sans Mono CJK KR
Noto Sans Mono CJK SC
Noto Sans Mono CJK TC
Noto Sans Ol Chiki
Noto Sans Oriya
Noto Sans Sinhala
Noto Sans Symbols
Noto Sans Symbols 2
Noto Sans Tamil
Noto Sans Telugu
Noto Sans Thaana
Noto Sans Thai
Noto Serif
Noto Serif Armenian
Noto Serif Bengali
Noto Serif CJK HK
Noto Serif CJK JP
Noto Serif CJK KR
Noto Serif CJK SC
Noto Serif CJK TC
Noto Serif Devanagari
Noto Serif Ethiopic
Noto Serif Georgian
Noto Serif Gujarati
Noto Serif Gurmukhi
Noto Serif Hebrew
Noto Serif Kannada
Noto Serif Khmer
Noto Serif Lao
Noto Serif Oriya
Noto Serif Sinhala
Noto Serif Tamil
Noto Serif Telugu
Noto Serif Thai
NSimSun
OCR A Extended
Old English Text MT
Onyx
Open Sans
OpenSymbol
P052
Padauk
PakType Naskh Basic
Palace Script MT
Palatino Linotype
Papyrus
Parchment
Perpetua
Perpetua Titling MT
Playbill
PMingLiU-ExtB
Poor Richard
Pristina
Rage Italic
Ravie
RIT Meera New
RIT Rachana
Rockwell
Rockwell Condensed
Rockwell Extra Bold
Script MT Bold
Segoe MDL2 Assets
Segoe Print
Segoe Script
Segoe UI
Segoe UI Emoji
Segoe UI Historic
Segoe UI Symbol
Showcard Gothic
Sigmar One
SimSun
SimSun-ExtB
Sitka Banner
Sitka Display
Sitka Heading
Sitka Small
Sitka Subheading
Sitka Text
Snap ITC
Source Code Pro
Source Sans 3
Standard Symbols PS
Stencil
STIX
Sylfaen
Symbol
Symbola
Tahoma
TeamViewer15Host
Tempus Sans ITC
Times New Roman
Trebuchet MS
Tw Cen MT
Tw Cen MT Condensed
Tw Cen MT Condensed Extra Bold
UnifrakturMaguntia
URW Bookman
URW Gothic
Vazirmatn
Verdana
Viner Hand ITC
Vivaldi
Vladimir Script
Webdings
Wide Latin
Wingdings
Wingdings 2
Wingdings 3
Yu Gothic
Yu Gothic UI
Z003
I guess it is this font that generates the side effect https://mscorefonts2.sourceforge.net/
❯❯ yay -S ttf-ms-fonts .. Success done
❯❯ fc-cache -fv
I am running Arch and I can still see the four rectangles as well.
I've been poking around the fonts installed by dnf and the rofi config files. The package fontawesome-6-free installs two font files with different font weights and number of glyphs. The proper one seems to be:
/usr/share/fonts/fontawesome-6-free-fonts/Font Awesome 6 Free-Solid-900.otf
Maybe rofi tries to load the wrong one upon launching? Anyway, setting the font explicitly in the config file:
~/.config/rofi/config.rasi
has resolved the issue on my side.
Here's the patch:
--- config.rasi.old 2024-12-28 17:01:36.791867695 +0100
+++ config.rasi 2024-12-28 16:54:49.236695990 +0100
@@ -83,6 +83,7 @@
textbox-prompt-colon {
enabled: true;
expand: false;
+ font: "FontAwesome6Free 11";
str: " ";
padding: 1em 1em 0em 0em;
text-color: @foreground;
Setting the font explicitly in other places, where awesome glyphs are used probably wouldn't hurt. BTW, I haven't changed my font setup described in the previous post.
@marcinfreitag Thanks for testing. I will test with the new font declaration.
@marcinfreitag Hi. Can you try to change the font settings in ~/.config/rofi/config.rasi at the beginning to
/* ---- Configuration ---- */
configuration {
modi: "drun,filebrowser,window,run";
font: "Fira Sans 11,FontAwesome6Free 11";
..
Servus, this is what I've tried so far:
-
I reverted my patch and applied the changes exactly as you had asked.
-
The result, alas, was the same bug as in my initial post, since there is a line below in the config file (~/.config/rofi/config.rasi) that declares the font again in an external file and sets it to Fira Sans 11 again (A tiny suggestion: one global font declaration should suffice, either in the external file or in config.rasi directly).
/* ---- Load font ---- */
@import "~/.config/ml4w/settings/rofi-font.rasi"
- I commented out the line mentioned above and the UI uses FontAwesome exclusively as the result (see the screenshot below).
I don't know if declaring separate fonts for character ranges is even supported by rofi. So sorry, I've been using hyprland only for two month by now. Creating a patched version of fira sans 11 with glyphs from font awesome would probably be an overkill. I'm going to install a fresh instance of fedora workstation in jan-feb and try to find out which ms font causes this issue.
Further debug info (clean fedora 41 workstation).
In order to test whether a particular font breaks the ML4W setup, it is sufficient to move it to the font folder (/usr/share/fonts on fedora systems) and check the apps that use Font Awesome glyphs straight away. It's unnecessary to regenerate the font cache after adding/deleting the font files.
I set up a clean system with the copr repo https://copr.fedorainfracloud.org/coprs/solopasha/hyprland/ enabled. Then I performed a system update, rebooted the pc and then installed the ML4W dotfiles with all the defaults according to the wiki (I didn't installed the dependencies, the script handled this for me). Then I copied the font files from the package msttcore-fonts-installer 2.6.1 from https://mscorefonts2.sourceforge.net/ started the launcher and checked the app launcher. I haven't tested the font behaviour in the user font folder as I expect a similar result.
The result is as follows:
Safe fonts:
andalemo.ttf, cambriaz.ttf, consolai.ttf, corbelb.ttf, verdana.ttf
, calibri.ttf , candara.ttf , consolaz.ttf, corbeli.ttf, verdanab.ttf
, calibrib.ttf, candarab.ttf, constan.ttf , corbelz.ttf, verdanai.ttf
, calibrii.ttf, candarai.ttf, constanb.ttf, trebuc.ttf , verdanaz.ttf
, calibriz.ttf, candaraz.ttf, constani.ttf, trebucbd.ttf, webdings.ttf
, cambriab.ttf, consola.ttf , constanz.ttf, trebucbi.ttf
, cambriai.ttf, consolab.ttf, corbel.ttf, trebucit.ttf
unsafe fonts:
arial.ttf , ariblk.ttf , courbd.ttf , georgiab.ttf, tahoma.ttf, timesi.ttf
, arialbd.ttf, comic.ttf , courbi.ttf , georgiai.ttf, times.ttf
, arialbi.ttf, comicbd.ttf, couri.ttf , georgiaz.ttf, timesbd.ttf
, ariali.ttf , cour.ttf , georgia.ttf, impact.ttf, timesbi.ttf
Having any of the "unsafe fonts" in the font directory causes the search glyph in rofi being replaced by the 'fi' phrase or by four rectangles (see the screenshot in my first post). This is "interesting" and I wonder whether other fonts could cause a similar issue.
I have 'fi' appearing as search icons across the GUI, not just in Rofi but also in Clipman. Will removing these unsafe fonts fix the issue?
Been having the same issue. Clean Fedora install, AutoInstall ML4W, no search icon out of the box. No other font packages installed either. @marcinfreitag suggestion fixed it for me.
Simply declaring the font in the "textbok-prompt-colon" explicitly in all affected configs fixed it for me: config.rasi for main app launcher, config-compact.rasi for keybindings menu etc. and config-cliphist for clipboard manager
textbox-prompt-colon {
font: "FontAwesome6Free 11";
}
P.S: tried changing the rofi-font.rasi as well to add the two font declarations and while that fixed the icon it also rendered all the rest of the text in FontAwesome which is akward.
Changed icon to an arrow in 2.9.8