Page MenuHomePhabricator

[Consulting with community] Improve rendering of wordmark SVGs on lower resolution monitors
Open, MediumPublicBUG REPORT

Assigned To
Authored By
Iniquity
May 12 2022, 7:31 PM
Referenced Files
F58953543: Wikipedia-logo-v2-ru.svg.png
Mar 31 2025, 7:07 PM
F58953534: image.png
Mar 31 2025, 7:07 PM
F58925843: Option 4.png
Mar 26 2025, 4:08 PM
F58925845: Options 2:3.png
Mar 26 2025, 4:08 PM
F58925841: Option 3 together.png
Mar 26 2025, 4:08 PM
F58925839: Option 3.png
Mar 26 2025, 4:08 PM
F58925835: Option 2 together.png
Mar 26 2025, 4:08 PM
F58925833: Option 2.png
Mar 26 2025, 4:08 PM

Description

Description

This task was originally about the tagline on Russian Wikipedia appearing pixilated in Vector 2022. While looking into that issue we realized that there is a general problem with rendering of SVGs (particularly small SVGs with text in them) on lower resolution monitors. This task has therefore been re-scoped to address the general problem.

Explorations of different SVG rendering options: https://codepen.io/j4n/pen/mdxYwLN

Example of SVG rendering on Commons that uses a PNG fallback:
<img alt="File:Wikipedia-logo-v2-ru.svg" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Wikipedia-logo-v2-ru.svg/135px-Wikipedia-logo-v2-ru.svg.png?20110125092901" decoding="async" width="135" height="155" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Wikipedia-logo-v2-ru.svg/203px-Wikipedia-logo-v2-ru.svg.png?20110125092901 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Wikipedia-logo-v2-ru.svg/270px-Wikipedia-logo-v2-ru.svg.png?20110125092901 2x" data-file-width="135" data-file-height="155">

Original task description

At 1920x1080 resolution in the new vector, the logo subtitle looks very blurry and unreadable. In the English Wikipedia the same, but less critical.
Win10
Google Chrome 101

image.png (87×308 px, 8 KB)

image.png (76×311 px, 7 KB)

Details

Related Changes in Gerrit:

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson lowered the priority of this task from Medium to Low.Jan 30 2024, 5:41 PM
Jdlrobson raised the priority of this task from Low to Medium.

Have you considered removing the tagline altogether? Or write it in plain text not image?

Jdlrobson added a subscriber: ZMcCune.

@ZMcCune following up on our chat in the kitchen - knowing how to fix this might require some help talking through brand guidelines and working out if the web team is the best owners of this work. The current brand guidelines of taglines in Italics in standard font do not seem compatible with Cyrillic text for example. Who would be the best person in your team to talk about this?

Is there anything we can actually do here? Perhaps as part of our housekeeping sprint we could reach a final decision on this?

SToyofuku-WMF changed the task status from Open to In Progress.Dec 11 2024, 7:09 PM
SToyofuku-WMF subscribed.

pending estimate

Jdlrobson changed the task status from In Progress to Open.Jan 16 2025, 9:38 PM

In freezer, not in progress.

The current brand guidelines of taglines in Italics in standard font do not seem compatible with Cyrillic text for example. Who would be the best person in your team to talk about this?

FWIW I feel like Cyrillic is the only script that actually uses italic for taglines. Apart from Russian:

I assume it was done because tagline in many languages does not fit one line if you write it in normal font style.

Per the web team's quarterly grooming, these tasks are being removed from the team's backlog.

Aklapper edited subscribers, added: NBaca-WMF; removed: alexhollender_WMF.

Boldly declining as the task has been "removed from the Web-Team's backlog" but at the same time is supposed to be a Web-Team-Housekeeping task "for the Web-Team". Please do not do this, I guess.

Boldly declining as the task has been "removed from the Web-Team's backlog" but at the same time is supposed to be a Web-Team-Housekeeping task "for the Web-Team". Please do not do this, I guess.

Hi, Im sorry, but no, we cant close this task. It is blocker for the parent task.

The wordmark and tagline actually look noticeably different today than when this task was started. Here's a table for pixel-by-pixel comparison (click the bottom row to enlarge, use arrow keys to switch):

Adapted from old PNG logoOriginal screenshot, Chrome, 2022Chrome, todayFirefox, today
Normal size
image.png (68×219 px, 4 KB)
image.png (68×219 px, 7 KB)
image.png (68×219 px, 7 KB)
image.png (68×219 px, 9 KB)
x8 size
image.png (544×1 px, 34 KB)
image.png (544×1 px, 55 KB)
image.png (544×1 px, 51 KB)
image.png (544×1 px, 46 KB)

The files were changed in https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/849175 and again in https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/935824.

Subjectively, the tagline looks better than in 2022 now, while the wordmark looks worse. It seems to me that the tagline was shifted by a fraction of a pixel vertically in the 2022 version, making it blurry; and today the wordmark is similarly shifted, making it blurry. This should be easily fixable in the SVG file, by adjusting the positions and sizes so that the image elements fit the pixel grid.

The wordmark and tagline actually look noticeably different today than when this task was started. Here's a table for pixel-by-pixel comparison (click the bottom row to enlarge, use arrow keys to switch):

Adapted from old PNG logoOriginal screenshot, Chrome, 2022Chrome, todayFirefox, today
Normal size
image.png (68×219 px, 4 KB)
image.png (68×219 px, 7 KB)
image.png (68×219 px, 7 KB)
image.png (68×219 px, 9 KB)
x8 size
image.png (544×1 px, 34 KB)
image.png (544×1 px, 55 KB)
image.png (544×1 px, 51 KB)
image.png (544×1 px, 46 KB)

The files were changed in https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/849175 and again in https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/935824.

Subjectively, the tagline looks better than in 2022 now, while the wordmark looks worse. It seems to me that the tagline was shifted by a fraction of a pixel vertically in the 2022 version, making it blurry; and today the wordmark is similarly shifted, making it blurry. This should be easily fixable in the SVG file, by adjusting the positions and sizes so that the image elements fit the pixel grid.

Thanks for providing the screenshots and analysis! I think we should do this, plus remove the unnecessary italics, which will make the tagline more readable. Although this will not solve the accessibility problem in any case, since the tagline at 10 pixels fontsize, violates all recommendations.

I have a few options for folks to consider.

I think the reason this has been such an issue is that the taglines are just so small, and the italic forms of Cyrillic lettering in Linux Libertine have a lot of long, curvy, diagonal descenders. Obviously it's harder to render diagonal, curvilinear strokes with square pixels, so they look pixellated when they're that small.

The reason the font needs to be so small is that the words "Свободная энциклопедия" are relatively long, and the em-width of those characters is relatively wide in Linux Libertine, which means that the letters have to be very small in order to fit within the 120px max width of the tagline.

I have 3 options that I think could improve rendering:

Option 1
Just get rid of the italics but use the same font size. This probably won't "fix" the problem entirely, but it'll be an improvement. It looks like this (red is the current styling, black is the proposed):

Option 1.png (478×1 px, 119 KB)

Option 1 together.png (254×710 px, 52 KB)

Option 2
Option 2 is to use the display variant of Linux Libertine, which has a slightly narrower em-width, which means that I can increase the font size by 1px if I reduce the letter spacing by 4%.

Option 2.png (402×1 px, 107 KB)

Option 2 together.png (244×708 px, 54 KB)

Option 3
This is my preferred option. We could use a variant of Linux Libertine called Linux Biolinum, which has slightly bolder descenders and diagonal strokes, as well as fewer serif characteristics like the slab serifs in Libertine.

Option 3.png (450×1 px, 112 KB)

Option 3 together.png (288×694 px, 55 KB)

Option 2 vs. 3

Options 2:3.png (502×1 px, 117 KB)

Option 4
We could always remove the tagline, too. It's an option, though not one I'd prefer.
Option 4.png (238×694 px, 47 KB)

@Jdrewniak is going to spin up an instance that uses the first three options so folks can have a look at them in context.

Change #1131448 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/core@master] [WIP][DNM] ruwiki tagline options

https://gerrit.wikimedia.org/r/1131448

Test wiki created on Patch demo by JDrewniak (WMF) using patch(es) linked to this task:
http://patchdemo.wmcloud.org/wikis/ec8a547bb2/w/

just FYI I have those three design options on patchdemo under the following URLs:

  1. Option 1 - removing italic - http://patchdemo.wmcloud.org/wikis/ec8a547bb2/wiki/A?ruwikitagline=1
  2. Option 2 - Linux Libertine Display - http://patchdemo.wmcloud.org/wikis/ec8a547bb2/wiki/A?ruwikitagline=2
  3. Option 3 - Linux Biolinum - http://patchdemo.wmcloud.org/wikis/ec8a547bb2/wiki/A?ruwikitagline=3

Thanks for providing the link. Current logo for comparison: https://ru.wikipedia.org/wiki/Заглавная_страница?useskin=vector-2022
On my device, the 3rd option looks the most legible. However, all three options don’t seem to be displaying as well as either the current Russian logo or English logo does because they have a wide gap between the wordmark and the tagline and the wordmark seems squished in comparison to the pre-Vector 2022 logo:

image.png (82×388 px, 13 KB)

Wikipedia-logo-v2-ru.svg.png (155×135 px, 18 KB)

On this resolution, the difference between the 1st and the 3rd option is not that legible, so either one would be an improvement.

Thank you very much for the mockups! I agree with stjn that the test samples have the wrong indentation and are compressed in height compared to the original.

I have 3 options that I think could improve rendering:

On this renders I like 1st one and 3rd one too.

Just a question, how correct would it be to increase the slogan font to the minimum readable size and place it on two lines or allow it to protrude to the right of the logo?

Jdlrobson-WMF renamed this task from Improve rendering of wordmark SVGs on lower resolution monitors to [Consulting with community] Improve rendering of wordmark SVGs on lower resolution monitors.Apr 2 2025, 5:33 PM
Jdlrobson-WMF changed the task status from Open to In Progress.May 12 2025, 5:11 PM

Thank you very much for the mockups! I agree with stjn that the test samples have the wrong indentation and are compressed in height compared to the original.

I have 3 options that I think could improve rendering:

On this renders I like 1st one and 3rd one too.

Just a question, how correct would it be to increase the slogan font to the minimum readable size and place it on two lines or allow it to protrude to the right of the logo?

Good question!
Unfortunately the sizes for those elements are very rigid as far as I know (@Jdlrobson-WMF correct me if I'm wrong here).

Wordmark: 120px max-width, 32px max-height
Tagline: 120px max-width, 18px max-height

The versions above are already the max sizes, unfortunately. If we have some flexibility in the sizing of those elements, I'd love to explore using two lines or extending the tagline beyond 120px width.

Unfortunately the sizes for those elements are very rigid as far as I know (@Jdlrobson-WMF correct me if I'm wrong here).

For logo:
The logos are shared on mobile and desktop so mobile is the constraint here. For the wordmark, anything over 155px will overlap with the search input (and anything close to that will be visually odd on mobile). I'd say 142x33 is probably the upper bound here.

For tagline:
Since this only displays on desktop, in theory you can choose any width or height, but the choice will disrupt the size of the search bar, or the whitespace around the header (e.g. push the content down)

I don't think (plural) you’ve necessarily understood my comment. The problem isn’t that the height of the logo should be bigger, the problem is that in the new version, the dimensions of the wordmark are 135×20, while in the current one, they are 120×20. So in all three mockups the dimensions look wrong in the new version. It might’ve been a bug with configuration? If I manually switch the wordmark to the previous width, it looks better (though there is still too much space between the wordmark and the tagline).

Tagline space issue is a separate one and seems to be from the fact that the current version of the tagline is 120×11, while the new version of the tagline is 135×15, but the top margin for the tagline is hard-coded to be 5px no matter what height it is.

What’s needed here to make it work is not to make them any bigger or smaller, but to:

  1. adjust the wordmark size to reflect the actual width of the image (on the backend on Patch Demo, it is still 120×20, but then Vector 2022 renders it as 135×20 for some reason)
  2. adjust the space between the tagline and the wordmark based on the new height (hard-coded 5px makes the space bigger when the tagline is higher than usual)

Test wiki created on Patch demo by Jdlrobson using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/7a236e565b/w/

Test wiki on Patch demo by Jdlrobson using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org/wikis/7a236e565b/w/

I don't think (plural) you’ve necessarily understood my comment. The problem isn’t that the height of the logo should be bigger, the problem is that in the new version, the dimensions of the wordmark are 135×20,

Gotcha. I've updated the patchdemo so both wordmark and taglines have correct dimensions. Sorry for missing that.
New URL: https://patchdemo.wmcloud.org/wikis/e43713c995/wiki/Main_Page?ruwikitagline=3
Let me know what you think.

Test wiki on Patch demo by JDrewniak (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org/wikis/ec8a547bb2/w/

Test wiki created on Patch demo by JDrewniak (WMF) using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/73ad340de7/w/

Just fyi the last patchdemo I created is basically the same as Jon's above, just with option 3 as the default and ruwiki content https://patchdemo.wmcloud.org/wikis/73ad340de7/w/index.php?title=A

Jdlrobson-WMF changed the task status from In Progress to Open.May 20 2025, 6:22 PM

@ovasileva did we reach a decision on whether we want to deploy one of these new SVGs ?

Change #1131448 abandoned by Jdlrobson:

[mediawiki/core@master] [WIP][DNM] ruwiki tagline options

https://gerrit.wikimedia.org/r/1131448