Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRewrite css21_dev/html4/{font-family,fonts}-013.htm to use a free font #8053
Comments
|
If the generic names |
|
@metajack yes, probably. |
|
I don’t know if this is really a bug upstream. When microsoft fonts are not available other browsers seem to pick other, similar fonts. The tests doesn’t really require non-free fonts, it’s just the easiest way we know to make it pass unmodified in our code. There’s probably more stuff we can improve in our font selection code. (That said, if generic names work, there is no harm in making that change upstream too.) |
|
Other browsers have magic to fallback for some super-common fonts. The test suite almost certainly shouldn't rely on non-free fonts or unspecified behaviour, IMO. I'm happy to champion (or help to) upstream (and I don't think there will be any disagreement). |
|
This change cannot be made here; it will be overwritten automatically. |
|
Good point, I’ve added a step to the instructions in the original message. |
|
Willing to take this issue |
|
@0X1A, great! Feel free to ask questions here or on IRC (#servo on irc.mozilla.org). |
|
@SimonSapin So, changing the fonts to their generic counterparts does not solve the tests and I get a fail for both. Changing |
|
@0X1A Do you have your changes anywhere? |
|
@gsnedders Yes, the changes are available here |
|
|
|
As I just commented in #7625 I'm leaning towards there being some bug in the font-matching code? |
|
As per #9697, the switch to generic fonts fails on Linux, but passes on OSX |
|
Nevermind, I guess it fails on OSX on the builders too, despite passing locally on my OSX machine. |
|
Turns out this wasn't easy. |
These tests rely on some fonts from Microsoft whose license does not allow redistribution. Getting these fonts on our CI servers is proving troublesome: #7625 (comment)
They should be modified to use different fonts whose license is not as problematic. To do so:
msttcorefontspackage (or similar) is installed../mach test-css tests/wpt/css-tests/css21_dev/html4/fonts-013.htm tests/wpt/css-tests/css21_dev/html4/font-family-013.htm. The tests should pass."Times New Roman","Arial", and"Courrier New"withserif,sans-serif, andmonospace(without quotes) respectively../mach run tests/wpt/css-tests/css21_dev/html4/font-family-013.htmand./mach run tests/wpt/css-tests/css21_dev/html4/fonts-013.htmCheck that each file renders shows the word "Ţęşţ" (Test with some diacritics on each letter) six times, and not for example just a square for each letter or nothing at all.