Page MenuHomePhabricator

Use proper font for characters marked as italic (<i>) on Chinese sites
Open, Needs TriagePublic

Description

As a generally agreed consensus among web designers and font professionals, Chinese font-family do not have italicized variations, and should have use Fangsong (semi-cursive) or Kaiti (cursive) instead when needed. The semantic web specification defined the i tag as in alternative voice, which should be reflected in how we process it. An alternative font must be used to be in compliance with respective web standard, and computer-generated italics must be replaced.

Event Timeline

Viztor created this task.Jun 17 2019, 6:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 17 2019, 6:22 PM
Viztor added a comment.EditedJun 17 2019, 6:28 PM

also see this W3C specification for potential improvements.
and this blog post.

Viztor updated the task description. (Show Details)Jun 18 2019, 2:57 AM

This seems to be the job of a web browser developer, not mediawiki?

I think this can currently be optimized by using js and css on the local wiki.

@Shizhao You're probably right, considering it is a change in the css. It would be preferred to have system-wide css-class to do the job. However, here seems to be a better place to get more technical people involved to determine the best solution.

I'm afraid I don't understand what exactly is expected in this task. Apply some different font style (?) via CSS for text that is in Chinese? How exactly to recognize that?

Aklapper renamed this task from Use proper font for <i> tag on Chinese sites. to Use proper font for characters marked as italic (<i>) on Chinese sites.Jun 18 2019, 3:45 AM
Viztor added a comment.EditedJun 18 2019, 4:38 AM

I'm afraid I don't understand what exactly is expected in this task. Apply some different font style (?) via CSS for text that is in Chinese? How exactly to recognize that?

For start, tag:lang('zh') could be a path to explore. Just to clarify, we need use a different font family for the <i> tag, not font-style as Chinese font families do not have their italicized/obliqued variations, similar thing could be said for Japanese and Korean I believe.

Viztor updated the task description. (Show Details)Jun 18 2019, 4:40 AM
在T225965#5264218中,@Viztor写道:

@Shizhao You're probably right, considering it is a change in the css. It would be preferred to have system-wide css-class to do the job. However, here seems to be a better place to get more technical people involved to determine the best solution.

There is another question to consider. What if the user's operating system does not have a specified Kaiti/Fangsong or other font?

在T225965#5264218中,@Viztor写道:

@Shizhao You're probably right, considering it is a change in the css. It would be preferred to have system-wide css-class to do the job. However, here seems to be a better place to get more technical people involved to determine the best solution.

There is another question to consider. What if the user's operating system does not have a specified Kaiti/Fangsong or other font?

This seems to be a rare case, if an OS support Chinese fonts, it is likely they will have the whole set (Hei, Song, Fangsong, Kai, sometimes Yuan). Windows and macOS and some major linux distributions like Ubuntu certainly do. Anyway, we can always fallback to the default 'cursive' font as specified by the system, fall back to a serif font might also be acceptable in extreme cases. There is also the web font solution, however, I believe that is outside of the scope of this issue.

在T225965#5266873中,@Viztor写道:

This seems to be a rare case, if an OS support Chinese fonts, it is likely they will have the whole set (Hei, Song, Fangsong, Kai, sometimes Yuan). Windows and macOS and some major linux distributions like Ubuntu certainly do. Anyway, we can always fallback to the default 'cursive' font as specified by the system, fall back to a serif font might also be acceptable in extreme cases. There is also the web font solution, however, I believe that is outside of the scope of this issue.

  1. I am not sure if the Chinese font is included in the non-Chinese operating system.
  2. How to ensure that after the fallback to the default font, does <i> tag fallback to the default italic? Or not?
  3. Chinese webfont are a lot of troubles, And currently mediawiki does not have Chinese webfont solution.
  4. This case is not rare, many people in the Chinese-speaking area must use an English operating system for various reasons at work.
在T225965#5266873中,@Viztor写道:

This seems to be a rare case, if an OS support Chinese fonts, it is likely they will have the whole set (Hei, Song, Fangsong, Kai, sometimes Yuan). Windows and macOS and some major linux distributions like Ubuntu certainly do. Anyway, we can always fallback to the default 'cursive' font as specified by the system, fall back to a serif font might also be acceptable in extreme cases. There is also the web font solution, however, I believe that is outside of the scope of this issue.

  1. I am not sure if the Chinese font is included in the non-Chinese operating system.
  2. How to ensure that after the fallback to the default font, does <i> tag fallback to the default italic? Or not?
  3. Chinese webfont are a lot of troubles, And currently mediawiki does not have Chinese webfont solution.
  4. This case is not rare, many people in the Chinese-speaking area must use an English operating system for various reasons at work.

Most of these sounds out-of-scope, and could/should be addressed in a different issue.