bbidulock / blackboxwm

A window manager for X11
Other
167 stars 28 forks source link

Font rendering issue on Alpine Linux #21

Closed tanertas closed 5 years ago

tanertas commented 5 years ago

I compiled successfully blackbox on Alpine Linux but it appeared to has a font rendering issue which I couldn't figured out why.

Compile environment:

Gcc 8.2 x86_64
CFLAGS="-Os -fomit-frame-pointer"
LDFLAGS="-Wl,--as-needed"

Compile steps:

./autogen.sh
./configure --prefix=/usr --mandir=/usr/share/man --disable-nls
make

Linking status:

$ ldd /usr/bin/blackbox
    /lib/ld-musl-x86_64.so.1 (0x7f4e8e57c000)
    libXft.so.2 => /usr/lib/libXft.so.2 (0x7f4e8e314000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0x7f4e8e104000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0x7f4e8dfe1000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f4e8de8c000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f4e8de78000)
    libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f4e8e57c000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x7f4e8dc3e000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7f4e8d98e000)
    libXrender.so.1 => /usr/lib/libXrender.so.1 (0x7f4e8d784000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0x7f4e8d55e000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0x7f4e8d53b000)
    libuuid.so.1 => /lib/libuuid.so.1 (0x7f4e8d335000)
    libbz2.so.1 => /usr/lib/libbz2.so.1 (0x7f4e8d128000)
    libpng16.so.16 => /usr/lib/libpng16.so.16 (0x7f4e8cefa000)
    libz.so.1 => /lib/libz.so.1 (0x7f4e8cce3000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0x7f4e8cae0000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x7f4e8c8da000)
    libbsd.so.0 => /usr/lib/libbsd.so.0 (0x7f4e8c6c8000)

blackbox-font

bbidulock commented 5 years ago

Probably has more to do with what's in LANG=?

tanertas commented 5 years ago

I tried en_US, en_US-UTF-8 for LANG and LC_ALL but didn't have any affect.

bbidulock commented 5 years ago

Try a null LANG, i.e.:

LANG= /usr/bin/blackbox
tanertas commented 5 years ago

Try a null LANG, i.e.:

LANG= /usr/bin/blackbox

No effect. Other WMs like jwm, openbox, fluxbox have no such issue on same environment.

bbidulock commented 5 years ago

If that's the Gray style, you need "Sans Serif-9" font. If you have no such font, you will probably get just boxes like that.

tanertas commented 5 years ago

If it is a missing font issue, shouldn't blackbox fallback a default X font like "fixed"? Btw, I already played with font settings. According to any font that I set, the appearance of boxes changes accordingly. I never able get any single character that rendered properly.

bbidulock commented 5 years ago

fixed miscellaneous fonts are not used anymore, but if you set the font name in the style file to something that you know is installed, it might vet the problem.

tanertas commented 5 years ago

Ok, for instance here is the screenshot of menu when I set the font for FreeSans-9.

blackbox-font2

bbidulock commented 5 years ago

Sorry, but I can't recreate that on any other distro. I am at a loss to help you further. Must have something to do with font setup. Maybe open a terminal and type locale in it to double check your language settings?

tanertas commented 5 years ago

Alpine Linux is musl-libc based distro. Since I didn't experience any similar problem with any other X app on Alpine, this issue may related with some glibc specific code/optimization historically preserved in blackbox code.

dhgutteridge commented 5 years ago

FWIW, I can't reproduce this on NetBSD, either. (Which, of course, uses its own BSD libc.)

bbidulock commented 5 years ago

@tanertas please close this issue if it is no longer a problem.