diff --git a/build/jam/DefaultBuildProfiles b/build/jam/DefaultBuildProfiles index 726399152c..05180d99f9 100644 --- a/build/jam/DefaultBuildProfiles +++ b/build/jam/DefaultBuildProfiles @@ -81,6 +81,7 @@ rule DefineDefaultBuildProfiles mercurial nano noto + noto_cjk_jp openssh p7zip pe @@ -88,7 +89,6 @@ rule DefineDefaultBuildProfiles subversion timgmsoundfont vision - vl_gothic wpa_supplicant wqy_microhei # xz_utils can't be built with gcc2, so we install it for diff --git a/src/apps/aboutsystem/AboutSystem.cpp b/src/apps/aboutsystem/AboutSystem.cpp index ee80b1973c..b1f3c7c1cc 100644 --- a/src/apps/aboutsystem/AboutSystem.cpp +++ b/src/apps/aboutsystem/AboutSystem.cpp @@ -1191,18 +1191,13 @@ AboutView::_CreateCreditsView() .SetLicenses("OpenGroup", "DEC", NULL)); // TODO: URL - // VL-Gothic font - _AddPackageCredit(PackageCredit("VL-Gothic font") - .SetCopyrights(B_TRANSLATE(COPYRIGHT_STRING "1990-2003 Wada Laboratory," - " the University of Tokyo."), COPYRIGHT_STRING - "2003-2004 Electronic Font Open Laboratory (/efont/).", - COPYRIGHT_STRING "2003-2012 M+ FONTS PROJECT.", - COPYRIGHT_STRING "2006-2012 Daisuke SUZUKI.", - COPYRIGHT_STRING "2006-2012 Project Vine.", - B_TRANSLATE("MIT license. All rights reserved."), + // Noto fonts copyright + _AddPackageCredit(PackageCredit("Noto fonts") + .SetCopyrights(B_TRANSLATE(COPYRIGHT_STRING + "2012-2016 Google Internationalization team."), NULL) - .SetLicense(kBSDThreeClause) - .SetURL("http://vlgothic.dicey.org/")); + .SetLicense("SIL Open Font Licence v1.1") + .SetURL("http://www.google.com/get/noto/")); // expat copyrights _AddPackageCredit(PackageCredit("expat") diff --git a/src/data/package_infos/arm/haiku b/src/data/package_infos/arm/haiku index 23514deef5..9e69a7cb44 100644 --- a/src/data/package_infos/arm/haiku +++ b/src/data/package_infos/arm/haiku @@ -81,5 +81,6 @@ requires { lib:libstdc++ lib:libsupc++ lib:libz - vl_gothic + noto + noto_sans_cjk_jp } diff --git a/src/data/package_infos/m68k/haiku b/src/data/package_infos/m68k/haiku index b930f51d0a..6ab930a9c0 100644 --- a/src/data/package_infos/m68k/haiku +++ b/src/data/package_infos/m68k/haiku @@ -72,5 +72,6 @@ requires { lib:libstdc++ lib:libsupc++ lib:libz - vl_gothic + noto + noto_sans_cjk_jp } diff --git a/src/data/package_infos/ppc/haiku b/src/data/package_infos/ppc/haiku index 8cb50c842f..ddb490ac1d 100644 --- a/src/data/package_infos/ppc/haiku +++ b/src/data/package_infos/ppc/haiku @@ -81,5 +81,6 @@ requires { lib:libstdc++ lib:libsupc++ lib:libz - vl_gothic + noto + noto_sans_cjk_jp } diff --git a/src/data/package_infos/x86/haiku b/src/data/package_infos/x86/haiku index f039226a80..75df316f91 100644 --- a/src/data/package_infos/x86/haiku +++ b/src/data/package_infos/x86/haiku @@ -119,5 +119,6 @@ requires { lib:libstdc++ lib:libsupc++ lib:libz - vl_gothic + noto + noto_sans_cjk_jp } diff --git a/src/data/package_infos/x86_64/haiku b/src/data/package_infos/x86_64/haiku index 1776695d2c..6aaf1c0d7f 100644 --- a/src/data/package_infos/x86_64/haiku +++ b/src/data/package_infos/x86_64/haiku @@ -118,5 +118,6 @@ requires { lib:libstdc++ lib:libsupc++ lib:libz - vl_gothic + noto + noto_sans_cjk_jp } diff --git a/src/data/package_infos/x86_gcc2/haiku b/src/data/package_infos/x86_gcc2/haiku index a7e3a8a76a..0dc0cadbec 100644 --- a/src/data/package_infos/x86_gcc2/haiku +++ b/src/data/package_infos/x86_gcc2/haiku @@ -107,5 +107,6 @@ requires { lib:libsolv lib:libsolvext lib:libz - vl_gothic + noto + noto_sans_cjk_jp } diff --git a/src/servers/app/font/GlyphLayoutEngine.h b/src/servers/app/font/GlyphLayoutEngine.h index 963c0ca6e4..501a6b25fd 100644 --- a/src/servers/app/font/GlyphLayoutEngine.h +++ b/src/servers/app/font/GlyphLayoutEngine.h @@ -305,7 +305,7 @@ GlyphLayoutEngine::_WriteLockAndAcquireFallbackEntry( int32 length, FontCacheReference& fallbackCacheReference, FontCacheEntry*& fallbackEntry) { - // We need the fallback font, since potentially, we have to obtain missing + // We need a fallback font, since potentially, we have to obtain missing // glyphs from it. We need to obtain the fallback font while we have not // locked anything, since locking the FontManager with the write-lock held // can obvisouly lead to a deadlock. @@ -319,29 +319,46 @@ GlyphLayoutEngine::_WriteLockAndAcquireFallbackEntry( entry->ReadUnlock(); } - if (gFontManager->Lock()) { - // TODO: We always get the fallback glyphs from VL Gothic at the - // moment, but of course the fallback font should a) contain the - // missing glyphs at all and b) be similar to the original font. - // So there should be a mapping of some kind to know the most - // suitable fallback font. - FontStyle* fallbackStyle = gFontManager->GetStyleByIndex( - "VL Gothic", 0); - if (fallbackStyle != NULL) { - ServerFont fallbackFont(*fallbackStyle, font.Size()); - gFontManager->Unlock(); - // Force the write-lock on the fallback entry, since we - // don't transfer or copy GlyphCache objects from one cache - // to the other, but create new glyphs which are stored in - // "entry" in any case, which requires the write cache for - // sure (used FontEngine of fallbackEntry). - fallbackEntry = FontCacheEntryFor(fallbackFont, forceVector, entry, - utf8String, length, fallbackCacheReference, true); - // NOTE: We don't care if fallbackEntry is NULL, fetching - // alternate glyphs will simply not work. - } else - gFontManager->Unlock(); + // TODO: We always get the fallback glyphs from the Noto family, but of + // course the fallback font should a) contain the missing glyphs at all + // and b) be similar to the original font. So there should be a mapping + // of some kind to know the most suitable fallback font. + static const char* fallbacks[] = { + "Noto Sans", + "Noto Sans CJK JP", + NULL + }; + + int i = 0; + + // Try to get the glyph from the fallback fonts + while(fallbacks[i] != NULL) + { + if (gFontManager->Lock()) { + FontStyle* fallbackStyle = gFontManager->GetStyleByIndex( + fallbacks[i], 0); + if (fallbackStyle != NULL) { + ServerFont fallbackFont(*fallbackStyle, font.Size()); + gFontManager->Unlock(); + + // Force the write-lock on the fallback entry, since we + // don't transfer or copy GlyphCache objects from one cache + // to the other, but create new glyphs which are stored in + // "entry" in any case, which requires the write cache for + // sure (used FontEngine of fallbackEntry). + fallbackEntry = FontCacheEntryFor(fallbackFont, forceVector, + entry, utf8String, length, fallbackCacheReference, true); + + if (fallbackEntry != NULL) + break; + } else + gFontManager->Unlock(); + } + + i++; } + // NOTE: We don't care if fallbackEntry is still NULL, fetching + // alternate glyphs will simply not work. if (!entry->WriteLock()) { FontCache::Default()->Recycle(entry);