The additional patch for bug 364786 r=vlad

This commit is contained in:
masayuki@d-toybox.com 2007-08-03 11:37:50 -07:00
Родитель 38baff440e
Коммит e5886b0e9f
2 изменённых файлов: 83 добавлений и 4 удалений

Просмотреть файл

@ -740,8 +740,12 @@ gfxQuartzFontCache::ResolveFontName(const nsAString& aFontName,
}
// try to find from apple family names.
if (mAppleFamilyNames.Get(key, &name)) {
NSString *familyName = GetNSStringForString(name);
NSFont *font = [NSFont fontWithName:familyName size:10.0];
NSString *familyName = GetNSStringForString(name);
NSFontManager *fontManager = [NSFontManager sharedFontManager];
NSFont *font = [fontManager fontWithFamily:familyName
traits:(NSUnboldFontMask | NSUnitalicFontMask)
weight:5
size:10.0];
// XXX Don't use fontName of NSFont. It is buggy in some cases.
if (mFontIDTable.Get(PRUint32([font _atsFontID]), &fe)) {
mAllFamilyNames.Put(key, fe->Name());

Просмотреть файл

@ -1428,90 +1428,165 @@ pref("font.name.sans-serif.ar", "Lucida Grande");
pref("font.name.monospace.ar", "Monaco");
pref("font.name.cursive.ar", "XXX.cursive");
pref("font.name.fantasy.ar", "XXX.fantasy");
pref("font.name-list.serif.ar", "Lucida Grande");
pref("font.name-list.sans-serif.ar", "Lucida Grande");
pref("font.name-list.monospace.ar", "Monaco");
pref("font.name-list.cursive.ar", "XXX.cursive");
pref("font.name-list.fantasy.ar", "XXX.fantasy");
pref("font.name.serif.el", "Lucida Grande");
pref("font.name.sans-serif.el", "Lucida Grande");
pref("font.name.monospace.el", "Monaco");
pref("font.name.cursive.el", "XXX.cursive");
pref("font.name.fantasy.el", "XXX.fantasy");
pref("font.name-list.serif.el", "Lucida Grande");
pref("font.name-list.sans-serif.el", "Lucida Grande");
pref("font.name-list.monospace.el", "Monaco");
pref("font.name-list.cursive.el", "XXX.cursive");
pref("font.name-list.fantasy.el", "XXX.fantasy");
pref("font.name.serif.he", "Lucida Grande");
pref("font.name.sans-serif.he", "Lucida Grande");
pref("font.name.monospace.he", "Monaco");
pref("font.name.cursive.he", "XXX.cursive");
pref("font.name.fantasy.he", "XXX.fantasy");
pref("font.name-list.serif.he", "Lucida Grande");
pref("font.name-list.sans-serif.he", "Lucida Grande");
pref("font.name-list.monospace.he", "Monaco");
pref("font.name-list.cursive.he", "XXX.cursive");
pref("font.name-list.fantasy.he", "XXX.fantasy");
pref("font.name.serif.ja", "ヒラギノ明朝 Pro W3");
pref("font.name.sans-serif.ja", "ヒラギノ角ゴ Pro W3");
pref("font.name.serif.ja", "ヒラギノ明朝 Pro");
pref("font.name.sans-serif.ja", "ヒラギノ角ゴ Pro");
pref("font.name.monospace.ja", "Osaka等幅");
pref("font.name.cursive.ja", "XXX.cursive");
pref("font.name.fantasy.ja", "XXX.fantasy");
pref("font.name-list.serif.ja", "ヒラギノ明朝 Pro");
pref("font.name-list.sans-serif.ja", "ヒラギノ角ゴ Pro");
pref("font.name-list.monospace.ja", "Osaka等幅");
pref("font.name-list.cursive.ja", "XXX.cursive");
pref("font.name-list.fantasy.ja", "XXX.fantasy");
pref("font.name.serif.ko", "AppleMyungjo");
pref("font.name.sans-serif.ko", "AppleGothic");
pref("font.name.monospace.ko", "AppleGothic");
pref("font.name.cursive.ko", "XXX.cursive");
pref("font.name.fantasy.ko", "XXX.fantasy");
pref("font.name-list.serif.ko", "AppleMyungjo");
pref("font.name-list.sans-serif.ko", "AppleGothic");
pref("font.name-list.monospace.ko", "AppleGothic");
pref("font.name-list.cursive.ko", "XXX.cursive");
pref("font.name-list.fantasy.ko", "XXX.fantasy");
pref("font.name.serif.th", "Lucida Grande");
pref("font.name.sans-serif.th", "Lucida Grande");
pref("font.name.monospace.th", "Monaco");
pref("font.name.cursive.th", "XXX.cursive");
pref("font.name.fantasy.th", "XXX.fantasy");
pref("font.name-list.serif.th", "Lucida Grande");
pref("font.name-list.sans-serif.th", "Lucida Grande");
pref("font.name-list.monospace.th", "Monaco");
pref("font.name-list.cursive.th", "XXX.cursive");
pref("font.name-list.fantasy.th", "XXX.fantasy");
pref("font.name.serif.tr", "Times");
pref("font.name.sans-serif.tr", "Helvetica");
pref("font.name.monospace.tr", "Courier");
pref("font.name.cursive.tr", "Apple Chancery");
pref("font.name.fantasy.tr", "Papyrus");
pref("font.name-list.serif.tr", "Times");
pref("font.name-list.sans-serif.tr", "Helvetica");
pref("font.name-list.monospace.tr", "Courier");
pref("font.name-list.cursive.tr", "Apple Chancery");
pref("font.name-list.fantasy.tr", "Papyrus");
pref("font.name.serif.x-baltic", "Times");
pref("font.name.sans-serif.x-baltic", "Helvetica");
pref("font.name.monospace.x-baltic", "Courier");
pref("font.name.cursive.x-baltic", "Apple Chancery");
pref("font.name.fantasy.x-baltic", "Papyrus");
pref("font.name-list.serif.x-baltic", "Times");
pref("font.name-list.sans-serif.x-baltic", "Helvetica");
pref("font.name-list.monospace.x-baltic", "Courier");
pref("font.name-list.cursive.x-baltic", "Apple Chancery");
pref("font.name-list.fantasy.x-baltic", "Papyrus");
pref("font.name.serif.x-central-euro", "Times");
pref("font.name.sans-serif.x-central-euro", "Helvetica");
pref("font.name.monospace.x-central-euro", "Courier");
pref("font.name.cursive.x-central-euro", "Apple Chancery");
pref("font.name.fantasy.x-central-euro", "Papyrus");
pref("font.name-list.serif.x-central-euro", "Times");
pref("font.name-list.sans-serif.x-central-euro", "Helvetica");
pref("font.name-list.monospace.x-central-euro", "Courier");
pref("font.name-list.cursive.x-central-euro", "Apple Chancery");
pref("font.name-list.fantasy.x-central-euro", "Papyrus");
pref("font.name.serif.x-cyrillic", "Times CY");
pref("font.name.sans-serif.x-cyrillic", "Helvetica CY");
pref("font.name.monospace.x-cyrillic", "Monaco CY");
pref("font.name.cursive.x-cyrillic", "Geneva CY");
pref("font.name.fantasy.x-cyrillic", "Charcoal CY");
pref("font.name-list.serif.x-cyrillic", "Times CY");
pref("font.name-list.sans-serif.x-cyrillic", "Helvetica CY");
pref("font.name-list.monospace.x-cyrillic", "Monaco CY");
pref("font.name-list.cursive.x-cyrillic", "Geneva CY");
pref("font.name-list.fantasy.x-cyrillic", "Charcoal CY");
pref("font.name.serif.x-unicode", "Times");
pref("font.name.sans-serif.x-unicode", "Helvetica");
pref("font.name.monospace.x-unicode", "Courier");
pref("font.name.cursive.x-unicode", "Apple Chancery");
pref("font.name.fantasy.x-unicode", "Papyrus");
pref("font.name-list.serif.x-unicode", "Times");
pref("font.name-list.sans-serif.x-unicode", "Helvetica");
pref("font.name-list.monospace.x-unicode", "Courier");
pref("font.name-list.cursive.x-unicode", "Apple Chancery");
pref("font.name-list.fantasy.x-unicode", "Papyrus");
pref("font.name.serif.x-western", "Times");
pref("font.name.sans-serif.x-western", "Helvetica");
pref("font.name.monospace.x-western", "Courier");
pref("font.name.cursive.x-western", "Apple Chancery");
pref("font.name.fantasy.x-western", "Papyrus");
pref("font.name-list.serif.x-western", "Times");
pref("font.name-list.sans-serif.x-western", "Helvetica");
pref("font.name-list.monospace.x-western", "Courier");
pref("font.name-list.cursive.x-western", "Apple Chancery");
pref("font.name-list.fantasy.x-western", "Papyrus");
pref("font.name.serif.zh-CN", "Song");
pref("font.name.sans-serif.zh-CN", "Hei");
pref("font.name.monospace.zh-CN", "Hei");
pref("font.name.cursive.zh-CN", "XXX.cursive");
pref("font.name.fantasy.zh-CN", "XXX.fantasy");
pref("font.name-list.serif.zh-CN", "Song");
pref("font.name-list.sans-serif.zh-CN", "Hei");
pref("font.name-list.monospace.zh-CN", "Hei");
pref("font.name-list.cursive.zh-CN", "XXX.cursive");
pref("font.name-list.fantasy.zh-CN", "XXX.fantasy");
pref("font.name.serif.zh-TW", "Apple LiSung Light");
pref("font.name.sans-serif.zh-TW", "Apple LiGothic Medium");
pref("font.name.monospace.zh-TW", "Apple LiGothic Medium");
pref("font.name.cursive.zh-TW", "XXX.cursive");
pref("font.name.fantasy.zh-TW", "XXX.fantasy");
pref("font.name-list.serif.zh-TW", "Apple LiSung Light");
pref("font.name-list.sans-serif.zh-TW", "Apple LiGothic Medium");
pref("font.name-list.monospace.zh-TW", "Apple LiGothic Medium");
pref("font.name-list.cursive.zh-TW", "XXX.cursive");
pref("font.name-list.fantasy.zh-TW", "XXX.fantasy");
pref("font.name.serif.zh-HK", "儷宋 Pro");
pref("font.name.sans-serif.zh-HK", "儷黑 Pro");
pref("font.name.monospace.zh-HK", "儷黑 Pro");
pref("font.name.cursive.zh-HK", "XXX.cursive");
pref("font.name.fantasy.zh-HK", "XXX.fantasy");
pref("font.name-list.serif.zh-HK", "儷宋 Pro");
pref("font.name-list.sans-serif.zh-HK", "儷黑 Pro");
pref("font.name-list.monospace.zh-HK", "儷黑 Pro");
pref("font.name-list.cursive.zh-HK", "XXX.cursive");
pref("font.name-list.fantasy.zh-HK", "XXX.fantasy");
pref("font.default.ar", "sans-serif");
pref("font.size.variable.ar", 15);