In title bar, Ñ, Ằ, ขึ้น and similar diacriticals are clipped in Linux

Hence the word “seem”. :wink:

I just changed the title again to test another case, when the title is wrapped. This only happens in the regular view, not when it’s in the title bar. For me, the clipping does not occur on the wrapped lines, only on the first line. So that’s good.

For more general usage, though, extra line height is required for tall scripts, as the diacriticals can not only disappear, but also clash. As a more long term idea, perhaps a theme or option for tall scripts would be useful, and show an interest in reaching out to people who don’t use Roman scripts. It would take careful testing through the whole interface, though.

1 Like

So, about that “seem”.

Now we know what overflow:hidden was for, so that’s a plus!

Anyway, the problem remains: using line-height: 1.1em and overflow:hidden you’re essentially instructing the browser to clip tall diacriticals. Using overflow:visible to overcome this is a hack; the correct way is to set a suitable line-height.

I realized that my own understanding of this issue was lacking, so for my own edification i put together a little file to test this issue. Hopefully it might be of use to others.

I just used a few texts that I happened to have to hand, so this is by no means authoritative. This sample includes Thai, Myanmar, Sinhala, Devanagari, Tibetan, Tamil, Arabic, and Vietnamese.

While there will be some difference across browser and OS, I think the biggest source of variation is in the fonts. They handle these issues very differently, so to be confident, you’d have to use @font-face.

In the cases I have tested, all of these scripts display clipping problems at a line height of 1.1. Setting line-height to a minimum of 1.6 solves this.

Note that using Noto Sans, there is clipping even of the standard Roman descenders at line-height of 1.1.

Here is the HTML file for testing.

2 Likes

In addition to trying overflow have you tried overflow-y: visible ?

There would still be the potential for “escaping the container” problems but it might work OK

1 Like

Thanks for the tip. This works, except it adds a nice little scrollbar to the right of the title (at least in Chrome). :sadpanda:

Are you still seeing this today @sujato?

Yep, still the same. But thanks for asking!

Sorry, it’s been hard to prioritize this since it is no-repro outside of Linux on the desktop. If you could repro on Windows or Mac that’d help.

1 Like

No worries, I’m happy to see it getting some attention again.

The problem was already reproduced in the thread above, in Mac:

And Windows:

I also had a friend send me some screenshots of different browsers on Windows 10, in Chrome:

Firefox:

and Edge:

As you can see, they pretty much all suffer the clipping problem, both in the title bar and in the uncontracted thread heading. The only exception is the thread heading on Edge.

And just to let you know, despite the suggestions by several kind people in the thread, I was never able to find a satisfactory CSS solution.

2 Likes

Hmm, I wonder if @lll could assist? There should be a CSS solution possible.

4 Likes

You can either

  1. make the container bigger (padding, line-height, other things of that nature)
  2. allow the letters to ignore the container dimensions with overflow

or

  1. make the letters smaller.

Out of those three, making the letters smaller is the easiest to implement, so let’s start there.

Try this first and if does not work for you I can try something else,

#topic-title h1 a,
.extra-info-wrapper .topic-link span {
    font-size: 90%;
}

And what that will do is make this (header title) go from ~21px to ~19px the font is still very legible and the diacritics are fixed - at least the ones I tested - like so:

before

after

And the same CSS from above will also fix the topic tittle diacritics in the same manner.

So you go from clipped diacritics and a font size of ~24.5px to fixed diacritics and a font size of ~22px or this:

before

after

As far as I checked, this is not needed on mobile, but that might be to the limited varieties I’ve tested vs all the possibilities out there. Also, 90% is adjustable, if you happen to use a language that has extra, extra long letterboxes it can go down to 88% or even 86% and the font is still legible.

Try it and let me know if the problem still persists. Like I said, this is the easiest of the available options, so if it doesn’t work, we can try something else.

7 Likes

Cheers, thanks, that works! The simplest solution wins again.

6 Likes