Closed Bug 423303 Opened 12 years ago Closed 12 years ago

default Mac Bengali serif font contains a typo of some sort

Categories

(Core :: Graphics, defect)

PowerPC
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: alqahira, Assigned: alqahira)

Details

Attachments

(1 file)

Attached patch FixSplinter Review
STR:

1) Open your app's font preferences
2) Switch to the fonts for the Bengali langGroup
3) Observe the default serif font is Geneva, not সোলাইমান লিপি

The difference in the name is absolutely imperceptible to me (maybe there's a null byte in there, or something), but I selected the right font in the UI, quit, copied the value of of my prefs.js, patched all.js, rebuilt, checked again with a fresh profile, and there was সোলাইমান লিপি this time.
Attachment #309809 - Flags: review?(jdaggett)
Whoa, that's odd.  Bugzilla seems to be line-breaking that.

Maybe the font name actually contains a line-break? Ew.  Nothing else seems to be breaking it on two lines on my Mac....

One last try:

সোলাইমান লিপি
Funky...

grep beng modules/libpref/src/init/all.js | grep font.name.serif | grep -v Akaa | hexdump -C

existing font name (font.name.serif)

00000020  e0 a6 b8 e0 a7 8b e0 a6  b2 e0 a6 be e0 a6 87 e0  |................|
00000030  a6 ae e0 a6 be e0 a6 a8  20 e0 a6 b2 e0 a6 bf e0  |........ .......|
00000040  a6 aa e0 a6 bf 22 29 3b  0a                       |.....");.|

patch font name

00000020  e0 a6 b8 e0 a7 87 e0 a6  be e0 a6 b2 e0 a6 be e0  |................|
00000030  a6 87 e0 a6 ae e0 a6 be  e0 a6 a8 20 e0 a6 b2 e0  |........... ....|
00000040  a6 bf e0 a6 aa e0 a6 bf  22 29 3b 0a              |........");.|

from fontinfo log

          e0 a6 b8 e0 a7 87 e0 a6  be e0 a6 b2 e0 a6 be e0 
          a6 87 e0 a6 ae e0 a6 be  e0 a6 a8 20 e0 a6 b2 e0 
          a6 bf e0 a6 aa e0 a6 bf 

With the patch, the prefs value now matches the family name specified the font.
Comment on attachment 309809 [details] [diff] [review]
Fix

Looks good.  Did you confirm that 10.5 provides no font that covers the Bengali range?
Attachment #309809 - Flags: review?(jdaggett) → review+
(In reply to comment #3)
> (From update of attachment 309809 [details] [diff] [review])
> Looks good.  Did you confirm that 10.5 provides no font that covers the Bengali
> range?
> 
Nopes, using an account with only the default fonts on a 10.5.2 Mac, all I see in comment 0 are little hex boxes, whereas I see the correct (I think :-)) characters with my default account.

How about to use the western name? (bug 390901 was fixed)
# the western names are useful for all people, so, CJK font names should be changed to western names too. (Of course, it's another bug.)
(In reply to comment #5)
> How about to use the western name? (bug 390901 was fixed)

I would have, had the UI chosen that name for me (which leads me to believe that the canonical name is, in fact, সোলাইমান লিপি; my reading of the information in Font Book also leads me to that conclusion).

Doing the fontInfo logging shows:

-1607471200[100c630]: (fontinit) family: রূপালী, psname: Rupali, face: Regular, apple-weight: 5, css-weight: 4, traits: 01000004
-1607471200[100c630]: (fontinit) family: রূপালী, psname: Rupali-Italic, face: Italic, apple-weight: 5, css-weight: 4, traits: 00000005
-1607471200[100c630]: (fontinit) family: রূপালী, psname: Rupali-Bold, face: Bold, apple-weight: 9, css-weight: 7, traits: 01000002
-1607471200[100c630]: (fontinit) family: রূপালী, psname: Rupali-Bold-Italic, face: Bold Italic, apple-weight: 9, css-weight: 7, traits: 00000003
-1607471200[100c630]: (fontinit) family: সোলাইমান লিপি, psname: SolaimanLipi-Regular, face: Regular, apple-weight: 5, css-weight: 4, traits: 01000004
-1607471200[100c630]: (fontinit) family: সোলাইমান লিপি, psname: SolaimanLipi-Italic, face: Italic, apple-weight: 5, css-weight: 4, traits: 00000005
-1607471200[100c630]: (fontinit) family: সোলাইমান লিপি, psname: SolaimanLipi-Bold, face: Bold, apple-weight: 9, css-weight: 7, traits: 01000002
-1607471200[100c630]: (fontinit) family: সোলাইমান লিপি, psname: SolaimanLipi-Bold-Italic, face: Bold Italic, apple-weight: 9, css-weight: 7, traits: 00000003

John, the name immediately following "(fontinit) family:" is the canonical name in absence of a "(fontinit-otherfamily) canonical family:" line for the same (psname) font somewhere else in the log, right?

> # the western names are useful for all people, so, CJK font names should be
> changed to western names too. (Of course, it's another bug.)

Agreed on both cases, and filed bug 423582.
(In reply to comment #6)
> John, the name immediately following "(fontinit) family:" is the canonical name
> in absence of a "(fontinit-otherfamily) canonical family:" line for the same
> (psname) font somewhere else in the log, right?

Yes, the name immediately following (fontinit) family: is the canonical name (the name the Cocoa api's return by default).  The other family names are effectively aliases for the canonical names.  These are read in lazily on a name lookup miss so it's best to never use those.

http://mxr.mozilla.org/mozilla/source/gfx/thebes/src/gfxQuartzFontCache.mm#1125
(In reply to comment #5)
> How about to use the western name? (bug 390901 was fixed)
> # the western names are useful for all people, so, CJK font names should be
> changed to western names too. (Of course, it's another bug.)

Smokey is correct, there's no name for this font other than the Bengali one.

Comment on attachment 309809 [details] [diff] [review]
Fix

roc, you sr'd my last patch for Mac font prefs in bug 299222; are you an appropriate sr for this one, too?  It fixes some sort of  invisible-to-the-eye typo from that patch that prevents the default serif Bengali font from being used.
Attachment #309809 - Flags: superreview?(roc)
Attachment #309809 - Flags: superreview?(roc) → superreview+
Comment on attachment 309809 [details] [diff] [review]
Fix

Requesting approval for this patch to fix the default Mac Bengali serif font pref so that the font is actually set as the default.  It's extremely low risk, and the reward is that we actually set a valid font as the default now.
Attachment #309809 - Flags: approval1.9?
Comment on attachment 309809 [details] [diff] [review]
Fix

a=beltzner
Attachment #309809 - Flags: approval1.9? → approval1.9+
Checking in modules/libpref/src/init/all.js;
/cvsroot/mozilla/modules/libpref/src/init/all.js,v  <--  all.js
new revision: 3.747; previous revision: 3.746
done
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.