Skip to content

text rendering looks terrible at low and medium point sizes #17190

Open

Description

@hinaria

hello!

servo's text rendering looks really bad (at least on windows 10) at small point sizes, especially compared how chrome, edge and firefox the same slab of text. i'm using the latest nightly build (published on 2017-06-05).

the spacing between glyphs looks off (kerning issues?), but ignoring that, the glyphs themselves look "wrong". they're blurry and fat.

here is one screenshot that shows how it severely affects small point sizes. at least to my untrained eye, at large point sizes all i can say is that the glyphs look a little fatter compared to chrome and firefox:
servo example

this affects real world pages, too:
wikipedia example

servo home example

the page used in the first example is available online at http://a.unyaa.com/2017/wr-644cb.html, which you can type into servo and another browser to evaluate yourself.

Activity

  1. added
    P-windows
    on Jun 6, 2017
  2. changed the title [-]text rendering looks terrible at low point sizes[/-] [+]text rendering looks terrible at low and medium point sizes[/+] on Jun 6, 2017
  3. atouchet commented on Jun 8, 2017

    @atouchet
    Contributor

    This has been bothering me as well. I believe this is a somewhat recent change too. For reference here is a screenshot of the Servo Windows build from March 13:

    Windows UI

  4. hinaria commented on Jun 8, 2017

    @hinaria
    ContributorAuthor

    servo was still ok on 2017-04-13 (equivalent to your 2017-03-13 screenshot). haven't had the time to do a dissect on changes between then and now to find the offending change.

    unsure if this should be filed in a separate issue(?), but even when the change is reverted, servo's glyph rendering still looks crappy compared with all other browsers. i think this is partially servo layouting, and partially webrender rasterization.

  5. atouchet commented on Jul 30, 2017

    @atouchet
    Contributor

    This issue appears to be noticeably improved in the latest nightly build.

  6. hinaria commented on Jul 31, 2017

    @hinaria
    ContributorAuthor

    I'm not sure if it has - take a look at the screen capture below (taken from today's nightly build, 2017-07-30). Specifically, compare "Sandra Annette" here (in the main body, but also in the right sidebar) with "Sandra Annette" from my opening comment.

    example

    We fixed the incorrect line height issue in #17340 last month, but the glyph layout and rendering does not feel like it's changed for me.

    Or has the situation really improved, and are my eyes and biases playing tricks on me?

  7. atouchet commented on Jul 31, 2017

    @atouchet
    Contributor

    It's still not great for sure but I do see a really noticeable difference on some sites. For example the Browser.html homescreen.

    Here's a screencap from today's build:

    Browser.html homescreen

    That looks much better to me than the example in your original post, at least in terms of blurriness and font thickness. There still appear to be some kerning issues.

  8. hinaria commented on Jul 31, 2017

    @hinaria
    ContributorAuthor

    you're right, i stand corrected! thank you.

    there are still some issues with sub-pixel + aa, but it should not be too much work to make layout better.

    i'll also experiment with a directwrite implementation for layout - i've been using it with webrender in another project and have had great results with it.

  9. atouchet commented on Sep 21, 2017

    @atouchet
    Contributor

    The kerning issues appear to be largely fixed with #18567.

  10. atouchet commented on Oct 17, 2017

    @atouchet
    Contributor

    The Browser.html homescreen font rendering appears to be getting thicker again.

    Servo

    Edit: This is improved again in the latest nightly.

  11. atouchet commented on Nov 9, 2017

    @atouchet
    Contributor

    The latest WebRender updates appear to have largely fixed the Windows text rendering issues. Screenshots from the latest nightly build:

    Servo

    Servo

    Servo

    @hinaria what do you think? Should this issue be closed now?

  12. glennw commented on Nov 9, 2017

    @glennw
    Member

    @atouchet Thanks for following up on this!

  13. atouchet commented on Jan 11, 2018

    @atouchet
    Contributor

    @glennw I've been taking a closer look at the Windows text rendering and I think there are still a few issues (and maybe a regression since my last post). However I'm not sure which of these are deliberate behaviours or not. Let me know if it would be better to open a WebRender issue report for any/all of these.

    Here are a few comparison images from DuckDuckGo, GitHub, and Hacker News. The top versions are Servo and the bottom versions are Firefox (without WebRender).

    DuckDuckGo

    GitHub

    Hacker News

    The DuckDuckGo examples are fairly close but the Servo version looks slightly darker and there is more vertical spacing between lines (this might just be another Servo problem). In the GitHub examples the Servo text looks noticeably blurrier than the Firefox text. In the Hacker News examples the Servo text appears thicker than the Firefox text and wider too. The smaller text look like they aren't even the same font sizes, I'm not sure what's going on there.

    Some specific issues I've noticed:

    1. Text pixel colour is now uniform where it used to be somewhat variable. This has changed since my last post where Servo did not used to behave this way. For example here is a zoomed image of Sandra Bullock's Wikipedia page. The top paragraph is from the latest Servo nightly build and the bottom paragraph is from my previous post from November.

    Wikipedia

    The black text is now completely monochrome and it did not used to be (it is easier to see this when clicking on the image to load it full size). Is this intentional or a regression? I believe this may be the cause of text appearing darker or thicker in Servo as this appears to impact multiple sites.

    Hacker News

    When the Hacker News text is viewed zoomed in it's clear that the text isn't any thicker but that the grey instead of the lighter colours make it look that way.

    1. Some text exhibits blurry or inconsistent glyph rendering. For example on GitHub:

    GitHub

    The quotation marks and certain letters (like the H in "GitHub") appear much less defined in Servo. There are also noticeable inconsistencies between different examples of the same letters. In the Servo example the "p"s in "privacy policy" do not look the same at all, the second one is much blurrier. In the Firefox example the letters look identical.

    1. Spacing and size issues. I don't know if this is due to the text rendering or not but as seen in the DuckDuckGo and Hacker News examples there are some issues where the spacing and size of text in Servo does not match that of Firefox.
  14. glennw commented on Jan 11, 2018

    @glennw
    Member

    @atouchet Thanks for writing this up! I'll also CC @gankro who works on text + WR + gecko - he may have some comments / thoughts on this too.

  15. Gankra commented on Jan 11, 2018

    @Gankra
    Contributor

    It just looks like servo's bindings to webrender are messed up, and it has disabled subpixel-aa on all of its text. No clue where (just woke up and downloaded the nightly build).

    This isn't an issue that affects gecko.

  16. atouchet commented on Jan 19, 2018

    @atouchet
    Contributor

    I bisected the text colour issue and the first nightly build with the problem is 2017-11-23.

    I also tested the previous working builds with the other problems I was having and they are still apparent. For example Hacker News in Servo 2017-11-11 (top) vs. Firefox (bottom):

    Hacker News

    The Servo text still appears thicker and blurrier and size and spacing issues are still there as well.

  17. atouchet commented on Mar 9, 2018

    @atouchet
    Contributor

    The text colour issue has been fixed but the other problems still occur in the latest nightly build.

  18. webbedspace commented on Aug 5, 2026

    @webbedspace

    I did a quick comparison using this:

    <!doctype html><body style="font-family:sans-serif;font-size:10px;background:white">privacy policy</body>

    Top to bottom: Servo, Chrome, Firefox
    Image

    So the subpixel rendering is a bit different for specifically this case.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-platform/fontsP-windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions