Skip to content

sans-serif font makes list item bullet render incorrectly #17321

Closed

Description

@duckinator

List item fonts show up as font fallback box glyphs if you set the font family to sans-serif.

screenshot_2017-06-14_09-06-18

<!DOCTYPE html>
<style>
  li { font-family: sans-serif; }
</style>

<ul>
  <li>beep boop</li>
</ul>

Changing to font-family: sans-serif, serif; makes it work.

screenshot_2017-06-14_09-17-24

Activity

  1. duckinator commented on Jun 14, 2017

    @duckinator
    ContributorAuthor

    Possibly related to #17267 and #10045, but I'm not sure.

    fc-match output, since it seems potentially-relevant:

    $ fc-match serif     
    DejaVuSerif.ttf: "DejaVu Serif" "Book"
    $ fc-match sans-serif
    DejaVuSans.ttf: "DejaVu Sans" "Book"
    
  2. added
    C-has-manual-testcase
    on Jun 14, 2017
  3. duckinator commented on Jun 15, 2017

    @duckinator
    ContributorAuthor

    Here's a screenshot of that snippet:

    screenshot_2017-06-15_19-22-26

  4. duckinator commented on Jun 15, 2017

    @duckinator
    ContributorAuthor

    And yes, this is on Linux (specifically Manjaro Linux, which is based on ArchLinux).

  5. jonleighton commented on Feb 1, 2018

    @jonleighton
    Contributor

    I came across this issue too, and will try to come up with a fix.

    It appears than on Linux, when you use sans-serif, Servo will choose the ExtraLight variant of DejaVu Sans, rather than the Book variant. This happens because Servo's code doesn't set the weight of the ExtraLight variant correctly (it sets it to normal = 400). The code which then chooses a variant sees the ExtraLight one first, deems it sufficient, and so goes with that. The ExtraLight variant doesn't seem to contain the bullet character, hence why it gets rendered as a square. Perhaps there are actually two issues really:

    1. The wrong variant gets chosen.
    2. If the chosen variant doesn't contain a certain character, maybe we should fall back to a variant which does, in order to render that one character.
  6. jonleighton commented on Feb 1, 2018

    @jonleighton
    Contributor

    Related: #190

  7. added a commit that references this issue on Feb 6, 2018
  8. added a commit that references this issue on Feb 7, 2018
  9. added 2 commits that reference this issue on Feb 8, 2018
  10. duckinator commented on Oct 25, 2019

    @duckinator
    ContributorAuthor

    This appears to be fixed. 👍

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-layout/textA-platform/fontsC-has-manual-testcase

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions