Complete the transition to Noto as the default font.
- Both Noto and Noto Sans CJK JP are now used as font fallbacks, allowing to cover a rather large range of characters. This also makes it possible to mix the two fonts easily. - Remove VL-Gothic from packages and from AboutSystem - Add Noto fonts to the dependencies of the Haiku package. This provides a similar look for all languages as discussed on the mailing list.
This commit is contained in:
parent
64e5cee534
commit
34fbc56b3f
@ -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
|
||||
|
@ -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")
|
||||
|
@ -81,5 +81,6 @@ requires {
|
||||
lib:libstdc++
|
||||
lib:libsupc++
|
||||
lib:libz
|
||||
vl_gothic
|
||||
noto
|
||||
noto_sans_cjk_jp
|
||||
}
|
||||
|
@ -72,5 +72,6 @@ requires {
|
||||
lib:libstdc++
|
||||
lib:libsupc++
|
||||
lib:libz
|
||||
vl_gothic
|
||||
noto
|
||||
noto_sans_cjk_jp
|
||||
}
|
||||
|
@ -81,5 +81,6 @@ requires {
|
||||
lib:libstdc++
|
||||
lib:libsupc++
|
||||
lib:libz
|
||||
vl_gothic
|
||||
noto
|
||||
noto_sans_cjk_jp
|
||||
}
|
||||
|
@ -119,5 +119,6 @@ requires {
|
||||
lib:libstdc++
|
||||
lib:libsupc++
|
||||
lib:libz
|
||||
vl_gothic
|
||||
noto
|
||||
noto_sans_cjk_jp
|
||||
}
|
||||
|
@ -118,5 +118,6 @@ requires {
|
||||
lib:libstdc++
|
||||
lib:libsupc++
|
||||
lib:libz
|
||||
vl_gothic
|
||||
noto
|
||||
noto_sans_cjk_jp
|
||||
}
|
||||
|
@ -107,5 +107,6 @@ requires {
|
||||
lib:libsolv
|
||||
lib:libsolvext
|
||||
lib:libz
|
||||
vl_gothic
|
||||
noto
|
||||
noto_sans_cjk_jp
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user