davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.27k stars 613 forks source link

What font am I missing? #913

Closed Aster89 closed 5 years ago

Aster89 commented 5 years ago

I just have a simple question, not a bug report, but I still fill the full report.

Version

Version: 1.5.2

Configuration

Output of rofi -help)

Launch Command

rofi -combi-modi window#drun#ssh -font "hack 20" -show combi

Steps to reproduce

Open rofi, normally, and look at the entries relative to already opened applications

What behaviour you see

I see I miss some font, but I don't know how to determine which one(s). Screen

What behaviour you expect to see

The font well reproduced, so I'd like to receive help in discovering what font I should install.

DaveDavenport commented 5 years ago

That looks more like something is corrupting the window/desktop name.

0020 is a control character?

Aster89 commented 5 years ago

0020? The unicode space?

DaveDavenport commented 5 years ago

can you post out.txt of:

xprop  -root  > out.txt
DaveDavenport commented 5 years ago

0020? The unicode space?

aah silly me, read it as decimal :smile:

DaveDavenport commented 5 years ago

anyway, check fontconfig setup for fallback fonts. I am not too familiar with it.

Aster89 commented 5 years ago
$ xprop -root
VimRegistry(STRING) = "2200007 GVIM", "2a00002 VIM"
_NET_ACTIVE_WINDOW(WINDOW): window id # 0xa00009
ESETROOT_PMAP_ID(PIXMAP): pixmap id # 0x1400004
_XROOTPMAP_ID(PIXMAP): pixmap id # 0x1400004
GDK_VISUALS(INTEGER) = 43, 130
XAUTOLOCK_SEMAPHORE_PID(INTEGER) = -127, 4, 0, 0
I3_CONFIG_PATH(UTF8_STRING) = "/home/enrico/.config/i3/config"
I3_PID(CARDINAL) = 1149
I3_SOCKET_PATH(UTF8_STRING) = "/run/user/1000/i3/ipc-socket.1149"
_NET_CLIENT_LIST(WINDOW): window id # 0xe0000f, 0x1800001, 0xa00009
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x1800001, 0xe0000f, 0xa00009
_NET_CURRENT_DESKTOP(CARDINAL) = 0
_NET_DESKTOP_VIEWPORT(CARDINAL) = 0, 0, 0, 0
_NET_DESKTOP_NAMES(UTF8_STRING) = "2: ", "10: "
_NET_NUMBER_OF_DESKTOPS(CARDINAL) = 2
_NET_SUPPORTED(ATOM) = _NET_SUPPORTED, _NET_SUPPORTING_WM_CHECK, _NET_WM_NAME, _NET_WM_VISIBLE_NAME, _NET_WM_MOVERESIZE, _NET_WM_STATE_STICKY, _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_DEMANDS_ATTENTION, _NET_WM_STATE_MODAL, _NET_WM_STATE_HIDDEN, _NET_WM_STATE_FOCUSED, _NET_WM_STATE, _NET_WM_WINDOW_TYPE, _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_UTILITY, _NET_WM_WINDOW_TYPE_TOOLBAR, _NET_WM_WINDOW_TYPE_SPLASH, _NET_WM_WINDOW_TYPE_MENU, _NET_WM_WINDOW_TYPE_DROPDOWN_MENU, _NET_WM_WINDOW_TYPE_POPUP_MENU, _NET_WM_WINDOW_TYPE_TOOLTIP, _NET_WM_WINDOW_TYPE_NOTIFICATION, _NET_WM_DESKTOP, _NET_WM_STRUT_PARTIAL, _NET_CLIENT_LIST, _NET_CLIENT_LIST_STACKING, _NET_CURRENT_DESKTOP, _NET_NUMBER_OF_DESKTOPS, _NET_DESKTOP_NAMES, _NET_DESKTOP_VIEWPORT, _NET_ACTIVE_WINDOW, _NET_CLOSE_WINDOW, _NET_MOVERESIZE_WINDOW
_NET_WM_NAME(UTF8_STRING) = "i3"
_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0x400063
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "it", "", ""
XFree86_has_VT(INTEGER) = 1
XFree86_VT(INTEGER) = 1
Aster89 commented 5 years ago

0020 is a control character?

I'd answer Yes, it is, that's what wikipedia says, but I suspect you're question wants a different answer :nerd_face:

Aster89 commented 5 years ago

anyway, check fontconfig setup for fallback fonts. I am not too familiar with it.

So how should I preceed?

A-Louarn commented 5 years ago

Hi, I have the exact same problem. I too use i3 with emojis / fontawesome characters in workspace names, and some of them are padded with \u0020 characters.

I feel like this is not a font issue (since i3 and termite show absolutely no \u0020 chars, and Rofi shows the correct symbol), but more an issue with how Rofi handles emoji / fontawesome characters (in particular the spaces after those characters)

If it helps, here is a screenshot and my xprop -root:

ESETROOT_PMAP_ID(PIXMAP): pixmap id # 0x2800004
_XROOTPMAP_ID(PIXMAP): pixmap id # 0x2800004
_NET_ACTIVE_WINDOW(WINDOW): window id # 0x4e00003
AT_SPI_BUS(STRING) = "unix:abstract=/tmp/dbus-wCRm8ZhMWf,guid=bfc99b25223861caa21a03705c73b315"
GDK_VISUALS(INTEGER) = 336, 415
XFree86_DDC_EDID1_RAWDATA(INTEGER) = 0, -1, -1, -1, -1, -1, -1, 0, 48, -28, -101, 4, 0, 0, 0, 0, 0, 25, 1, 4, -107, 34, 19, 120, -22, 87, 85, -92, 88, 85, -98, 36, 13, 80, 84, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 54, -128, -96, 112, 56, 31, 64, 48, 32, 53, 0, 88, -62, 16, 0, 0, 26, 82, 43, -128, -96, 112, 56, 31, 64, 48, 32, 53, 0, 88, -62, 16, 0, 0, 26, 0, 0, 0, -2, 0, 70, 55, 72, 72, 50, -128, 49, 53, 54, 87, 70, 54, 10, 0, 0, 0, 0, 0, 0, 65, 49, -98, 0, 16, 0, 0, 10, 1, 10, 32, 32, 0, 29
I3_CONFIG_PATH(UTF8_STRING) = "/home/<user>/.config/i3/config"
I3_PID(CARDINAL) = 1002
I3_SOCKET_PATH(UTF8_STRING) = "/run/user/1000/i3/ipc-socket.1002"
_NET_CLIENT_LIST(WINDOW): window id # 0x1200003, 0x1800010, 0x2200006, 0x3400010, 0x3e00003, 0x4000003, 0x4400005, 0x5000003, 0x5200003, 0x5600001, 0x5e00003, 0x4e00003
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x3e00003, 0x5000003, 0x5200003, 0x4000003, 0x5600001, 0x5e00003, 0x4e00003, 0x3400010, 0x2200006, 0x1800010, 0x4400005, 0x1200003
_NET_CURRENT_DESKTOP(CARDINAL) = 2
_NET_DESKTOP_VIEWPORT(CARDINAL) = 3840, 0, 3840, 0, 3840, 0, 3840, 0, 1920, 408, 1920, 408, 1920, 408, 1920, 408, 0, 408
_NET_DESKTOP_NAMES(UTF8_STRING) = "2:", "4:", "6:", "11:", "1:", "3:", "9:", "10:", "0:"
_NET_NUMBER_OF_DESKTOPS(CARDINAL) = 9
_NET_SUPPORTED(ATOM) = _NET_SUPPORTED, _NET_SUPPORTING_WM_CHECK, _NET_WM_NAME, _NET_WM_VISIBLE_NAME, _NET_WM_MOVERESIZE, _NET_WM_STATE_STICKY, _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_DEMANDS_ATTENTION, _NET_WM_STATE_MODAL, _NET_WM_STATE_HIDDEN, _NET_WM_STATE_FOCUSED, _NET_WM_STATE, _NET_WM_WINDOW_TYPE, _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_UTILITY, _NET_WM_WINDOW_TYPE_TOOLBAR, _NET_WM_WINDOW_TYPE_SPLASH, _NET_WM_WINDOW_TYPE_MENU, _NET_WM_WINDOW_TYPE_DROPDOWN_MENU, _NET_WM_WINDOW_TYPE_POPUP_MENU, _NET_WM_WINDOW_TYPE_TOOLTIP, _NET_WM_WINDOW_TYPE_NOTIFICATION, _NET_WM_DESKTOP, _NET_WM_STRUT_PARTIAL, _NET_CLIENT_LIST, _NET_CLIENT_LIST_STACKING, _NET_CURRENT_DESKTOP, _NET_NUMBER_OF_DESKTOPS, _NET_DESKTOP_NAMES, _NET_DESKTOP_VIEWPORT, _NET_ACTIVE_WINDOW, _NET_CLOSE_WINDOW, _NET_MOVERESIZE_WINDOW
_NET_WM_NAME(UTF8_STRING) = "i3"
_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0x400063
RESOURCE_MANAGER(STRING) = "Xft.autohint:\t9\nXft.dpi:\t96\nXft.antialias:\t1\nXft.rgba:\trgb\nXft.hinting:\ttrue\nXft.hintstyle:\thintslight\nXft.pixelsize:\t9\nXft.lcdfilter:\tlcddefault\n"
_XKB_RULES_NAMES(STRING) = "evdev", "dell", "fr", "bepo", ""
XFree86_has_VT(INTEGER) = 1
XFree86_VT(INTEGER) = 7
Xorg_Seat(STRING) = "seat0"
DaveDavenport commented 5 years ago

Does: echo -e "1:,\u0020|" | rofi -dmenu Show it correctly. (It does for me btw.).

DaveDavenport commented 5 years ago

rofi-2019-02-25-1337-00000

A-Louarn commented 5 years ago

Yes, when the comma is set directly after the firefox character, everything is shown correctly. But if the character following the firefox character is a space, the glitch appears:

$ echo -e "1:,\u0020|" | rofi -dmenu 2019-02-25_152524_5040x1920

$ echo -e "1:\u0020|" | rofi -dmenu 2019-02-25_152615_5040x1920

$ echo -e "1: \u0020|" | rofi -dmenu 2019-02-25_152701_5040x1920

Aster89 commented 5 years ago

@TheMrNomis , I can confir this behavior.

A-Louarn commented 5 years ago

By the way, I made a few tests, and the same bug is appearing with any unicode whitespace (as per https://www.fileformat.info/info/unicode/category/Zs/list.htm ) It also appears when using a zero-width space, albeit the zero-width space itself is not displayed (but the following spaces have the weird "missing character" box)

$ echo -e "1:\u200B\u0020|" | rofi -dmenu 2019-02-25_154121_5040x1920

The only exception is the Ideographic space (\u3000) which is displayed normally (a big space), and the following spaces are displayed correctly. EDIT: $ echo -e "1:\u3000\u0020|" | rofi -dmenu 2019-02-25_154437_5040x1920

DaveDavenport commented 5 years ago

with my font I cannot reproduce it. fun.

Can you try in another pango based application , like gedit (with this font).

A-Louarn commented 5 years ago

Yes, same glitch. May be a pango thing, then. 2019-02-25_154833_5040x1920

DaveDavenport commented 5 years ago

looks like it. I think I actually reported this one before a long time ago.

DaveDavenport commented 5 years ago

https://bugzilla.gnome.org/show_bug.cgi?id=780068 https://bugzilla.gnome.org/show_bug.cgi?id=775202 (also reported https://github.com/Anachron/i3blocks/issues/53)

cannot find the bugreported I commented on in the past.

A-Louarn commented 5 years ago

Yes, that's exactly the same bug. Apparently it's because font-awesome does not offer an ascii space. On arch, switching from ttf-font-awesome to otf-font-awesome worked around this bug.

I think there is nothing that can be done at the Rofi level, and this request could be closed. Thanks !

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.