Closed Bug 19486 Opened 25 years ago Closed 25 years ago

[BETA] font-family stylesheet is no effect on Japanese charactors

Categories

(Core :: CSS Parsing and Computation, defect, P2)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 8801

People

(Reporter: m_kato, Assigned: erik)

References

()

Details

(Whiteboard: fix in hand; permitted to check in)

Japanese charactors (and DBCS) is always no effect using font-family.

see the following URL.

  http://hp.vector.co.jp/authors/VA008030/mozilla/fontfamily.html

Japanese charactors is always selected "MS Mincho" font if it uses "font-family"
stylesheet. ALso, if font-family is using on Japanese encoding, it should be
selected the
follwing fonts.

font-family font name -------------------------------------------
times "MS P Mincho" or "Mincho" font arial "MS P Gothic" or "Gothic" font
helvetica "MS P Gothic" or "Gothic" font courier "MS Gothic" or "Gothic" font
serif "MS P Mincho" or "Mincho" font
Assignee: troy → pierre
Component: Layout → Style System
Sounds like style system. Maybe gfx?
Assignee: pierre → ftang
On the Mac, the japanese characters are displayed in the specified 'font-family'
font, which proves that the style info is correctly propagated (of course, the
characters appear all garbled because I don't have a japanese system). On WinNT,
I can't really tell because the japanese characters don't appear at all. My guess
is that the characters are just ignored by the system because I don't have a
japanese system.

Anyhow the style info seems correct, so I'm reassigning to ftang to look into gfx
on WinNT why the japanese characters ar always displayed in "MS Mincho" instead
of using the correspondence table below:

  font-family      font name
  --------------------------------------
  times        "MS P Mincho" or "Mincho"
  arial        "MS P Gothic" or "Gothic"
  helvetica    "MS P Gothic" or "Gothic"
  courier      "MS Gothic"   or "Gothic"
  serif        "MS P Mincho" or "Mincho"
Assignee: ftang → erik
GFX issue- reassign to erik.
Status: NEW → ASSIGNED
Target Milestone: M15
times, arial, helvetica and courier do not contain Japanese glyphs, so it is
strange that the Web page attempts to use these fonts to display Japanese.
Normally, font-family is a *list* of fonts, and if the author wants to specify
a generic font like "serif", the way to do that is to put the generic font at
the end of the font-family list. For example:

  font-family: times, serif;
  font-family: arial, sans-serif;
  font-family: courier, monospace;
  font-family: "MS Gothic", courier, monospace;

There may still be some problems with font names that are non-ASCII. I will
investigate this.
This is marked M15, but do we need this for Beta?
Don't most Japanese fonts on Ja Windows/Mac have non-ASCII names?
Target Milestone: M15 → M12
I want to say that built-in font-family is no effect aginst no-ascii charactor.
This problem is in mozilla/gfx/src/windows/nsFontMetricsWin.cpp.
On current code, if "arial" font of buildin font-family is selected, "Arial"
font is selected.
But, on Japanese charactor, "MS P Gothic" font should be selected.

Also, GTK code is same, too.
I'm not sure if there are any "built-in" default fonts that say "arial". I know
that there used to be defaults of "Times" and "Courier" in the presentation
context, but I changed those yesterday to "serif" and "monospace". The Windows
version now maps these CSS generic font names to real font names via font prefs
(e.g. user_pref("font.name.sans-serif.ja", "MS Gothic");). Matt Fisher is
working on the font prefs UI (XUL/JS). Frank and I will also eventually get the
Unix and Mac versions to listen to prefs.

We will not map "arial" to "MS Gothic". If the document author wants to have the
browser map names to real font names, they must use the CSS generic font names
(serif, sans-serif, monospace, cursive and fantasy).
Severity: normal → major
Priority: P3 → P2
Whiteboard: fix in hand
Summary: font-family stylesheet is no effect on Japanese charactors → [BETA] font-family stylesheet is no effect on Japanese charactors
Whiteboard: fix in hand → fix in hand; permitted to check in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
I just checked in a fix to convert UTF-8 font names in the prefs file to Unicode
font names for Windows. The rest of this bug will be fixed by the fixes for bug
8801, so I'm marking this bug a duplicate of 8801.

*** This bug has been marked as a duplicate of 8801 ***
Status: RESOLVED → VERIFIED
Agreed. Marking verified dup of 8801.
You need to log in before you can comment on or make changes to this bug.