Closed Bug 200589 Opened 22 years ago Closed 19 years ago

[BeOS] Mozilla cannot recognize some Japanese fonts

Categories

(Core Graveyard :: GFX: BeOS, defect)

x86
BeOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: beos, Assigned: sergei_d)

References

Details

(Keywords: fixed1.8)

Attachments

(1 file, 3 obsolete files)

This was brought to my attention: "Monospaced fonts are not displayed properly in Japanese due to certain quircks in the way Mozilla and BeOS interact (don't know nor understand the details). As a result, certain form elements do not display Japanese as they should." patch to follow
Attached patch patch to nsFontMetricsBeOS.cpp (obsolete) (deleted) — Splinter Review
proposed patch
Wish to see more details/explanations of this bug. Including screenshots.
Sergei, this was submitted to me by a friend in the Japanese community. They gave me a screenshot, but I don't have it with me at work. I will submit it this weekend.
I need a bit more than screenshot. URL, version of Mozilla, info about mozilla settings when surfing those sites and info about fonts installed on system. Problem with fonts and font metrics in current BeOS port is quite complex. I'm working on this part of gfx too, and a'm afraid that this bug may be dup of some existing bugs, misconfiguration, or bug related to already rewritten here part of code. Better, if they speak english - let them contact me directly. As you understand, in current form this bug is hardly worth even "New" status.
Sergei, Under Preferences > Fonts, when you choose "Japanese" as the language, the "monospaced font' setting shows Courier (a non-Japanese font), and it is greyed out so it cannot be change. As a result, text boxes in forms do not display Japanese text properly. Specifically, when you enter Japanese text in a form text field, all you see is rectangles. Here is some more info: Mozilla version: confirmed on Mozilla 1.3 and 1.4a for netserver URL: not specific to certain URLs. Problem happens whenever you enter Japanese into a form text field. Installed fonts: default BeOS R5 JP fonts, including Haru Tohaba, which is monospaced. To solve this problem, one of our guys produced a patch to allow selection of the desired monospaced font for the Japanese language, which seems to work fine. This is what we passed along to Paul. The screenshot that Paul mentioned shows how it is possible to select the desired monospaced font for Japanese after the patch is applied. Let me know if you need more info. Thanks! Koki koki@jpbe.net
1)Somehow it is problem with communication. I asked several times on BeUserTalk, BeDevTalk and on BeShare help abput providing info about non-western fonts and issues, as BeZilla now uses name sniffing. But nobody answered - it seems that "Western" and "Asian" BeOS comunities have deep gap inbetween. So i wish to add Nost frequent CJK fonts to cathegory list, inspite for hieroglyphic alphabet those categories are rather abstract - Serif, Sans-Serif, Monospaced-fixed, Cursive. 2)Second part of problem is that lot of CJK fonts don't report itself as fixed in BeOS API (and not only in BeOS). This is why is started using name sniffing instead call for IsFixed(). But seems that new half-implemented API method IsFullAndHalfFixed() works better - at least using in my code this method i can see "Haru Tohaba" as fixed. 3)In order to understand and approve patch, i need to have those fonts by your japanese friend which they supposed to be fixed, but are currently "invisible". You can send me those fonts by e-mail or provide via BeShare. 4)We already had similar problem with text-fields and lists in japanese, but it was fixed(rather hacked) to set those elements use be_plain_font. Because users coouldn't find (good) CJK fonts which show itself as available for be_fixed_font in BeOS system font preferences. 5)But maybe for CJK case we should drop font-type detection at all and show all fonts in all categories as possible choice - as other platforms tend to do.
This patch was made by me. It is enable to show a font name which contains Japanese characters. Example screenshots are here. bad : http://www6.plala.or.jp/r/be/mozilla/1.png good : http://www6.plala.or.jp/r/be/mozilla/2.png You can download 'Mikachan-Font' from http://mikachan.sourceforge.net/dl.html
Hai, Ryo, I understand what this patch is for. Unfortunately i still didn't get information i requested from Japanese BeZilla fans via koki. I tested this patch, and it is safe for BeOS, inspite such kind of font names seem illegal for Linux port. I asked lot of questions in my mail, in hope that Jorge G. Mare will redirect it to you, as his claims based on his own experience and pointed rather on inproper settings than at this problem you trying to solve with this patch. My question in that mail relate just to some CJK problems and are targeted to more wide changes in nsFontMetricsBeOS. I already have different (from CVS) version of that file in which i didn't met any problems on sites pointed by Koki. So i'm still waiting for reply and fonts with japanese names
Ryo P.S. I'm asking for whole bunch of fonts with Japanes names, because your download link don't work
Sorry, the correct URL is SourceForge.jp. http://mikachan.sourceforge.jp/dl.html Another fonts with japanese names is available from http://maktak.hp.infoseek.co.jp/ , mt_tare.lzh and mt_tare_p.lzh
There is another problem with font preference. FontMatchesGenericType is called with aLangGroup == "x-unicode". I can't select Japanese fonts, except Haru and Haru Tohaba.
Sergei, are you and Ryo still looking into this? As I understand it, this is a fairly BIG problem for Japanese users, and I would like to see it resolved ASAP. Please let me know, so we can resolve this issue.
Depends on: 218134
Patch https://bugzilla.mozilla.org/attachment.cgi?id=121680&action=view sets font classificator into promiscuous mode for unicode - so any font matches and font type. This approach was almost ok when Unicode was mostly used by CKJ sites, but now lot of western pages also use UTF-8 as main encoding. And due internal mozilla changes this isn't important anymore. At times when this patch was submitted, Mozilla was very strict in taking in account return value of the method, so only matched fonts were listed in Preferences. Now it is much more flexible - lists matched fonts above horizontal rule/divider (as preffered fonts), but also list ALL remaining below divider. Also i must admit again that method where this patch proposes changes is real hack in BeOS, as BeOS API and system settings don't provide font type information besides difference between fixed and proportional. Second patch needs discussion with Mozilla CKJ/i18n gurus about legality of non-ascii font names.
Comment on attachment 119393 [details] [diff] [review] patch to nsFontMetricsBeOS.cpp No need in this anymore: http://beos.spb.ru/mozilla/Bezilla_Unicode_Fonts.png As you see, there are ALL installed fonts in list for Unicode->Monospace
Attachment #119393 - Attachment is obsolete: true
Comment on attachment 121680 [details] [diff] [review] Fonts can't match correctly when aLangGroup is Unicode. Sorry, previous comment was for this patch. Anyway, previous patch probably don't apply cleanly now, so need refreshing
Attachment #121680 - Attachment is obsolete: true
I will submit patch on fist topic, fixing UTF-8 hamdling, also UTF-8 bug in nsRenderingContext soon.
Attached patch Patch - fixes two UTF-8 issues and rounding (obsolete) (deleted) — Splinter Review
Allows UTF-8 font names, removes assertion for GetTextDimensions (also UTF-8 issue), removes rounding for system font sizes (fix for menu font size).
Actually assertion fix might be in nsRenderingContextBeOS cleanup fix, but anyway. Tigerdog, you can test this patch for fixing asserion about pageBreaks.
Assignee: beos → sergei_d
Comment on attachment 197525 [details] [diff] [review] Patch - fixes two UTF-8 issues and rounding review request.
Attachment #197525 - Flags: review?(thesuckiestemail)
Comment on attachment 197525 [details] [diff] [review] Patch - fixes two UTF-8 issues and rounding I'm not sure about the set up of utfpos. If it's less than 1025 it's an array of 1025 otherwise it's an array of aLength+1. Why not always use aLength+1? Also I think NS_ConvertUCS2toUTF8 might look better if we use NS_ConvertUTF16toUTF8
Comment on attachment 197525 [details] [diff] [review] Patch - fixes two UTF-8 issues and rounding + NS_ConvertUCS2toUTF8 family(aName); could you use UTF16 rather than UCS2 here? The UCS2 names are kinda deprecated.
Attachment #197525 - Attachment is obsolete: true
Attached patch patch (deleted) — Splinter Review
same as previous but UTF16ToUTF8 used
Attachment #197600 - Flags: review?(thesuckiestemail)
Attachment #197600 - Flags: review?(thesuckiestemail) → review+
Commited. mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp 1.41 <- 1.40 mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp 1.54 <- 1.53
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment on attachment 197600 [details] [diff] [review] patch BeOS-only change. Won't affect the other platforms. Change is reviewed and tested, so we would like to have approval to land it in the MOZILLA_1_8_BRANCH as well.
Attachment #197600 - Flags: approval1.8b5?
editing description
Summary: BeOS does not display monospaced fonts properly in Japanese → [BeOS] Mozilla cannot recognize some Japanese fonts
Attachment #197600 - Flags: approval1.8b5? → approval1.8b5+
confirmed - fixes assertions about page breaks
Keywords: fixed1.8
Comment on attachment 197525 [details] [diff] [review] Patch - fixes two UTF-8 issues and rounding removing old review req.
Attachment #197525 - Flags: review?(thesuckiestemail)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: