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

In many languages, Thai and Vietnamese being examples, multiple marks may be added above letters. Normally extra line-spacing is incorporated to allow for this. The main heading in the title bar has line-spacing of 1.1em, which is not enough, so such marks get clipped. I’ve even seen plain ol’ apostrophes get clipped.

This will vary depending on font, so may not show up for everyone. But it’s good practice to leave plenty of headroom, especially in the title.

Clipped where? The title isn’t clipped for me at all in Windows / Chrome.

Maybe indicate platform and browser, with cropped screenshot.

Sure, it’s Chromium 59, Ubuntu 17.04. I just checked and the same problem appears in Firefox, too. I have also tried a couple of different fonts, same deal. Here’s a screenshot using Source Sans Pro, with Loma (system default) for Thai.

I was originally referring to the top bar when contracted. But the same issue is showing up in the regular view, which is what you see above. Here’s the same problem in the title bar when contracted:

It is tricky to get this stuff right, but a line-height of 1.1 is asking for trouble.

Just to be complete, here are the characters unclipped: Ñ, Ằ, ขึ้น

This is how it renders for me (Safari, Mac)
29

Compared to the screenshot, they indeed have more ‘stuff’ above the characters.

Thanks. This is even worse than mine: the second diacritcals in mine are at least visible, even if badly clipped, but here they are gone entirely.

This is the kind of thing you can adjust with CSS @sujato so this is not a bug.

Okay, well, can’t say i’m happy, but anyway, thanks for looking at the problem. If I get the chance I’ll see if I can make a CSS fix and post it here.

.extra-info-wrapper has overflow: hidden. Changing it to:

.extra-info-wrapper {
   overflow: visible; 
}

Fixes this but may result in other edge cases, @awesomerobot should we change this so we allow bleed out of bounding box by default?

1 Like

Historically that kind of change has caused problems later down the line… I think it is better for sites that need this, to adjust their CSS.

Thanks for trying, Sam, but this is only a partial fix for me. I am applying the CSS here on meta. It works inconsistently, and only for the regular title, not when it’s contracted into the title bar

After considerable playing around, what works for me is:

.extra-info-wrapper,
.extra-info-wrapper .topic-link,
#topic-title h1 {
     overflow: visible;
}

Why repeat .extra-info-wrapper and .extra-info-wrapper .topic-link? I wish I knew: but that’s the only way I could get it to work.

This will potentially affect users in most Indic languages, Thai, Vietnamese, and languages using Arabic script: that’s a couple of billion people right there. The Ñ is of course in Spanish, too, so you can do the math.

It seems to me that failure to properly display characters in titles for scripts used by billions of people is, in fact, a bug, and one deserving of a little love.

4 Likes

They display properly in my browser in Windows. How many people run Linux on the desktop? Billions? Maybe dial down the hysteria a notch.

1 Like

That’s strange. I see a difference on Windows 10 and Chrome 60.

Without overflow: visible:
image

With overflow: visible:
image

But, yeah, there’s no reason for hysteria :wink:

2 Likes

Can you share a screenshot in Windows? We’ve seen issues in Linux and Mac, and at least some Windows, as per Gerhard. And we haven’t so far as I know, even looked at mobile.

Oh, I see, it looks fine in Chrome on Windows as long as you don’t scroll down in the topic. If you scroll and the title gets moved into the header it looks like my screenshots. Same behavior on iPad (iOS 10).

There’s no problem on my mobile (Android 7), since the title is hidden when you scroll down.

1 Like

I just changed the title to make it easier to test in mobile, so the tall characters don’t get hidden when the title is shortened.

And just to confirm, in the regular view, the diacriticals in the title aren’t clipped?

I’ve checked in the Chrome browser emulator, and it shows the clipping in all different devices; but I don’t know how accurate they are when it comes to these kinds of deatils.

There’s definitely no problem on Android 7 and Chrome on my mobile, because the title bar is hidden when you scroll down.

I have no Android tablet, so I can’t say for sure, but I think it will be the same problem as on Windows and iOS. At least my test on mobile with Desktop mode enabled shows the same behavior…

Thanks for that.

Please forgive me if I’m being obtuse, I am not used to developing Discourse, and am just an ordinary user. But I’m still not completely clear when you say:

For me, the diacriticals are clipped both when you’re right at the top, so that the title appears in the post body, and when you’ve scrolled down, and the title goes into the header or title bar. I understand that the latter is not an issue for you on mobile, but I am still unclear about the former.

1 Like

Cool, thanks so much. So it looks like the CSS adjustment applied to desktop will solve the issue. It doesn’t seem to create any problems.

I wouldn’t go so far. The fix needs to be tested on multiple platforms. And there probably was a good reason for using overflow: hidden in the first place. So, let’s wait for a response from @awesomerobot.

But, if the CSS works for you, go ahead and use it!