Closed Bug 1475921 Opened 4 years ago Closed 4 years ago

CSS transform uppercase causes issues on Georgian

Categories

(Firefox :: New Tab Page, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 63
Iteration:
63.3 - Aug 6
Tracking Status
firefox63 --- fixed

People

(Reporter: flod, Assigned: rrosario)

References

Details

Attachments

(3 files)

In general, it's not safe to use text-transform: uppercase, especially when we don't control the rendering engine (i.e. web pages).

Looks like bug 1428819 introduced support for uppercase characters in Georgian ("Mtavruli"), but even Gecko fails for lack of font support.
Attached image Screenshot of New Tab
63.0a1 (2018-07-15) (64 bit) on macOS
Ugh; it looks like no standard font shipped with macOS 10.13, at least, includes these characters.
Attached image windows.png
(In reply to Jonathan Kew (:jfkthame) from comment #2)
> Ugh; it looks like no standard font shipped with macOS 10.13, at least,
> includes these characters.

This was reported by our Georgian localizer on Windows 10.

> But the problem is that currently there is not any default font in the 
> system (I'm using windows 10), which supports these new characters. I 
> can see this text, because I have installed some modified Dejavu fonts, 
> but if I delete them, I get boxes instead of the characters.
That's interesting... the characters appear to be present in the Segoe UI font, at least. I wonder if that's not true for all versions? Or are we failing to find them for some other reason?

Can you ask the reported whether setting gfx.font_rendering.fallback.always_use_cmaps to true makes any difference?
(In reply to Jonathan Kew (:jfkthame) from comment #4)
> Can you ask the reported whether setting
> gfx.font_rendering.fallback.always_use_cmaps to true makes any difference?
Flags: needinfo?(georgianization)
(In reply to Jonathan Kew (:jfkthame) from comment #4)

> gfx.font_rendering.fallback.always_use_cmaps to true makes any difference?
No, there is not any difference.

> the characters appear to be present in the Segoe UI font, at least.
I don't think so. There is information about this in the Working Group Document ("Action plan for the complete representation of Mtavruli characters"):

> The initiative group acknowledges the fact that fonts are also to be updated by the companies producing operating systems. 
> Apple uses San Francisco for its main OS font, which currently does not feature Georgian characters; 
> in Apple systems Georgian texts are displayed using the Helvetica font, which  does  not  feature  Mtavruli

> In  operating  systems  produced  by  Microsoft, Georgian texts are mainly displayed using either 
> Sylfaen or Segoe UI, neither of which feature Mtavruli  letters.  
> The  initiative  group  will  be working in this direction and provide Microsoft any kind of consultation necessary.
Flags: needinfo?(georgianization)
Sorry, you're right - I was misreading the character map. So yes, font support is lacking.
Is your recommendation that using text-transform:uppercase is inadvisable for any localized designs in general or that we should limit it to certain locales only?
Flags: needinfo?(francesco.lodolo)
(In reply to Kate Hudson :k88hudson from comment #8)
> Is your recommendation that using text-transform:uppercase is inadvisable
> for any localized designs in general or that we should limit it to certain
> locales only?

CSS transformation is brittle. Excluding some locales is not that scalable.

The safest way is to expose the string for localization uppercase, and let locales decide how to translate it (in this case, the Georgian localizer could choose to avoid uppercase characters, given the issue).
Flags: needinfo?(francesco.lodolo)
Iteration: --- → 63.3 - Aug 6
Priority: -- → P2
Ok that makes sense. Thanks!
Blocks: 1476450
Iteration: 63.3 - Aug 6 → 63.4 - Aug 20
flod, do you suggest we create new strings that are all uppercase and with new IDs so that they get relocalized in all locales to be uppercase too?
Flags: needinfo?(francesco.lodolo)
(In reply to Ricky Rosario [:rrosario, :r1cky] from comment #11)
> flod, do you suggest we create new strings that are all uppercase and with
> new IDs so that they get relocalized in all locales to be uppercase too?

Yes, that's the only safe way to do it.
Flags: needinfo?(francesco.lodolo)
Assignee: nobody → rrosario
Commits pushed to master at https://github.com/mozilla/activity-stream

https://github.com/mozilla/activity-stream/commit/d9494900a200982e53754e861f54b808ade415c2
Fix Bug 1475921 - remove text-transform usage on localized strings (section headers)

https://github.com/mozilla/activity-stream/commit/868db6f54c2ac36a35fee0ad5880d0a5bbdd6d2f
Merge pull request #4263 from rlr/bug1475921/no-text-transform

Fix Bug 1475921 - remove text-transform usage on localized strings (section headers)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Iteration: 63.4 - Aug 20 → 63.3 - Aug 6
Blocks: 1479836
Marking this as [good first verify] and also resuming the STR, just to make sure the verification will be smooth: 
** Use the Georgian specific Firefox build (the "ka" locale)
  - Launch Firefox with a clean profile
  - Open a new tab 
  - Inspect the Activity Stream section titles, making sure there are no glitches or font issues triggered (see the screenshots provided in comment 1 and comment 3)
QA Whiteboard: [good first verify]
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.