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

Swaybar subpixel font rendering #3163

Closed
mrlotfi opened this issue Nov 20, 2018 · 11 comments
Closed

Swaybar subpixel font rendering #3163

mrlotfi opened this issue Nov 20, 2018 · 11 comments

Comments

@mrlotfi
Copy link

mrlotfi commented Nov 20, 2018

I am using sway version 1.0-beta.1-211-gbf7af9c6 (Nov 20 2018, branch 'master') on archlinux. I felt that the fonts are a bit blurry on the swaybar compared to i3bar. So I took a screenshot and found that the swaybar is not using subpixel rendering. On the other hand window titles are rendered properly. Is this the expected behaviour or is this a bug?

image

image

@emersion
Copy link
Member

I thought we had subpixel rendering in swaybar. Are you using fractional scaling?

@vperilla
Copy link

I am using factional scaling

barra

@mrlotfi
Copy link
Author

mrlotfi commented Nov 21, 2018

I thought we had subpixel rendering in swaybar. Are you using fractional scaling?

No. I have only overridden the default font using font pango: xxxxxx option.

@emersion
Copy link
Member

We do use cairo subpixel font rendering. Not sure what's wrong here.

@lephe
Copy link

lephe commented Nov 23, 2018

FWIW, I have the same gray antialias here (just built sway 77554f5 on wlroots c70b8f6) and a close-to-default configuration. The relevant part would be...

bar {
    status_command i3blocks
    position top
    font "Droid Sans Mono 10"
    colors { ... }
}

swaybar-gray-antialias

My display is HiDPI (1920×1080) but the scale factor is 1.

@ggreer
Copy link
Contributor

ggreer commented Nov 27, 2018

Perhaps it's a bug detecting your screen's subpixel output. In common/cairo.c, to_cairo_subpixel_order() defaults to CAIRO_SUBPIXEL_ORDER_DEFAULT if the subpixel order is WL_OUTPUT_SUBPIXEL_UNKNOWN. That renders text with antialiasing and no hinting. I have this bug on one of my laptops, but it uses an eDP->LVDS converter.

I guess some debug logging in that function could be useful.

@emersion
Copy link
Member

You can check subpixel is correctly detected with weston-info.

@lephe
Copy link

lephe commented Nov 27, 2018

Interestingly weston-info fails in my case:

interface: 'wl_output', version: 3, name: 24
	x: 0, y: 0, scale: 1,
	physical_width: 344 mm, physical_height: 193 mm,
	make: 'Unknown', model: '0x38ED',
	subpixel_orientation: unknown, output_transform: normal,
	mode:
		width: 1920 px, height: 1080 px, refresh: 40.064 Hz,
		flags:
	mode:
		width: 1920 px, height: 1080 px, refresh: 60.096 Hz,
		flags: current

I'm not sure which API is responsible for detecting it -is this the Wayland server? I'm wondering if it's possible to specify subpixel alignment in a static way (such as a config file).

@emersion
Copy link
Member

wlroots detects your output's subpixel orientation. It does so via DRM (drmModeConnector.subpixel).

@ascent12
Copy link
Member

wlroots detects your output's subpixel orientation. It does so via DRM (drmModeConnector.subpixel).

Also note that a bunch of hardware doesn't report this to us, so it's often just "unknown".

ggreer added a commit to ggreer/wlroots that referenced this issue Feb 11, 2019
drmModeConnector.subpixel doesn't seem to detect subpixel order on many displays (especially laptops). Allow subpixel order to be manually set.

My plan is to make a corresponding PR for sway with adds a subpixel output option. Then swaywm/sway#3163 will be fixed.
ggreer added a commit to ggreer/sway that referenced this issue Feb 11, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel order to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 11, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel order to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 11, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel order to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 11, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel order to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 11, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel order to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 11, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/wlroots that referenced this issue Feb 12, 2019
drmModeConnector.subpixel doesn't seem to detect subpixel order on many displays (especially laptops). Allow subpixel order to be manually set.

The corresponding PR for sway adds a subpixel output option: swaywm/sway#3645

Once both are merged, swaywm/sway#3163 will be fixed.
ggreer added a commit to ggreer/sway that referenced this issue Feb 12, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
emersion pushed a commit to swaywm/wlroots that referenced this issue Feb 13, 2019
drmModeConnector.subpixel doesn't seem to detect subpixel order on many displays (especially laptops). Allow subpixel order to be manually set.

The corresponding PR for sway adds a subpixel output option: swaywm/sway#3645

Once both are merged, swaywm/sway#3163 will be fixed.
ggreer added a commit to ggreer/sway that referenced this issue Feb 13, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 15, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 15, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 17, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 26, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 26, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 26, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 26, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 26, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Feb 26, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Mar 11, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Mar 11, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
ggreer added a commit to ggreer/sway that referenced this issue Mar 17, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses swaywm#3163
emersion pushed a commit that referenced this issue Mar 24, 2019
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.

Addresses #3163
@RedSoxFan
Copy link
Member

Closing via #3645

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

No branches or pull requests

7 participants