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

i3bar does not seem to have subpixel rendering #3604

Open
prempaolo opened this Issue Jan 28, 2019 · 9 comments

Comments

Projects
None yet
4 participants
@prempaolo
Copy link

prempaolo commented Jan 28, 2019

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

The main problem is that i3bar does not seem to render fonts using subpixel rendering. I tried to make a comparison with another bar (lemonbar), which instead seems to work fine. I encounter this problem only on i3bar, all my other applications work as expected. I tried to modify the .Xresources file, but it does not work. If I change, for example, the dpi value in that file, I see the effects on i3bar, so I know that it will look for settings in the .Xresources. The content of such file is the following:

Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

I don't know if this is a bug or I am missing some configuration, but I cannot find a way to make it work.

Expected Behavior

i3bar should render fonts using subpixel rendering, resulting in a sharper result of the characters.

Reproduction Instructions

As I already mentioned, I don't know if this is a bug or I misconfigured something, but it affects only i3bar every time I start it.

Environment

Output of i3 --moreversion 2>&-:

i3 version: 
Binary i3 version:  4.16 (2018-11-04) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16 (2018-11-04) (pid 586)to abort…)
Loaded i3 config: /home/paolo/.config/i3/config (Last modified: Mon 28 Jan 2019 12:04:02 AM CET, 38239 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

This is the part in the i3 config where I set the font and the bar:

font pango:Hack Nerd Font Mono 7
bar {
	font pango:Hack Nerd Font Mono 9
	colors {
			background $darkblack
			statusline $darkwhite
			separator $cyan
			focused_workspace  $blue $darkblue $darkblack
			active_workspace   $blue $blue $darkwhite
			inactive_workspace $darkblack $darkblack $white
			#urgent_workspace   $darkblack $darkblack $white
		}
	status_command i3blocks
	position top
	mode dock
	modifier None
}

I followed the guide to debug i3bar but the only log I found in the file is the following:

ERROR block_reap:328: [record] bad exit code 1
- Linux Distribution & Version:
                   -`                    paolo@arch
                  .o+`                   ----------------
                 `ooo/                   OS: Arch Linux x86_64
                `+oooo:                  Host: K56CB 1.0
               `+oooooo:                 Kernel: 4.20.3-arch1-1-ARCH
               -+oooooo+:                Uptime: 11 hours, 19 mins
             `/:-:++oooo+:               Packages: 1447 (pacman)
            `/++++/+++++++:              Shell: bash 5.0.0
           `/++++++++++++++:             Resolution: 1366x768
          `/+++ooooooooooooo/`           WM: i3
         ./ooosssso++osssssso+`          Theme: Adwaita [GTK2], oomox-gruvbox-numix [GTK3]
        .oossssso-````/ossssss+`         Icons: Adwaita [GTK2], oomox-gruvbox-numix [GTK3]
       -osssssso.      :ssssssso.        Terminal: st
      :osssssss/        osssso+++.       Terminal Font: Hack Nerd Font
     /ossssssss/        +ssssooo/-       CPU: Intel i7-3517U (4) @ 3.000GHz
   `/ossssso+/:-        -:/+osssso+-     GPU: Intel 3rd Gen Core processor Graphics Controll
  `+sso+:-`                 `.-/+oso:    GPU: NVIDIA GeForce GT 740M
 `++:.                           `-/+/   Memory: 4081MiB / 7861MiB
 .`                                 `/
- Are you using a compositor (e.g., xcompmgr or compton): yes, compton
@i3bot

This comment has been minimized.

Copy link

i3bot commented Jan 28, 2019

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@mzanibelli

This comment has been minimized.

Copy link

mzanibelli commented Jan 28, 2019

Hi @prempaolo ,

Do you have freetype2-cleartype installed? Is seems to be needed on Arch.

@prempaolo

This comment has been minimized.

Copy link
Author

prempaolo commented Jan 28, 2019

Hi,
yes, I have it installed and I tried both with freetype2 in the official repos and freetype2-cleartype in the AUR.

@mzanibelli

This comment has been minimized.

Copy link

mzanibelli commented Jan 28, 2019

Then I'd recommend testing it with i3status instead of i3blocks. Don't forget to restart X between your tests!

@prempaolo

This comment has been minimized.

Copy link
Author

prempaolo commented Jan 28, 2019

I tried also with i3status and every time I made a change in a file, I rebooted the system to check if it was working. Unfortunately, no results yet!

@mzanibelli

This comment has been minimized.

Copy link

mzanibelli commented Jan 29, 2019

Weird.

Seems to work for me with the mentionned package, Source Code Pro Regular 11 and the following fonts.conf:

    <match target="font">
        <edit mode="assign" name="antialias">
            <bool>true</bool>
        </edit>
        <edit mode="assign" name="embeddedbitmap">
            <bool>false</bool>
        </edit>
        <edit name="autohint" mode="assign">
            <bool>false</bool>
        </edit>
        <edit mode="assign" name="hinting">
            <bool>true</bool>
        </edit>
        <edit mode="assign" name="hintstyle">
            <const>hintslight</const>
        </edit>
        <edit mode="assign" name="lcdfilter">
            <const>lcddefault</const>
        </edit>
        <edit mode="assign" name="rgba">
            <const>rgb</const>
        </edit>
    </match>
@prempaolo

This comment has been minimized.

Copy link
Author

prempaolo commented Jan 29, 2019

I tried with your exact config and font but the result is the same. The weird thing is that I see this problem only with i3bar!

@orestisf1993

This comment has been minimized.

Copy link
Member

orestisf1993 commented Jan 29, 2019

Please run i3bar like this and upload the output: i3bar --bar_id=bar-0 -V

@prempaolo

This comment has been minimized.

Copy link
Author

prempaolo commented Jan 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment