hrev50997 adds 1 changeset to branch 'master'
old head: 64e5cee5347b764e15480b6a486364f73b0e9ffd
new head: 34fbc56b3fe09821f9571f472ef5a3ff527a80fc
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=34fbc56b3fe0+%5E64e5cee5347b
----------------------------------------------------------------------------
34fbc56b3fe0: 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.
[ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev50997
Commit: 34fbc56b3fe09821f9571f472ef5a3ff527a80fc
URL: http://cgit.haiku-os.org/haiku/commit/?id=34fbc56b3fe0
Author: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date: Sun Mar 5 11:54:58 2017 UTC
----------------------------------------------------------------------------
9 files changed, 59 insertions(+), 41 deletions(-)
build/jam/DefaultBuildProfiles | 2 +-
src/apps/aboutsystem/AboutSystem.cpp | 17 +++-----
src/data/package_infos/arm/haiku | 3 +-
src/data/package_infos/m68k/haiku | 3 +-
src/data/package_infos/ppc/haiku | 3 +-
src/data/package_infos/x86/haiku | 3 +-
src/data/package_infos/x86_64/haiku | 3 +-
src/data/package_infos/x86_gcc2/haiku | 3 +-
src/servers/app/font/GlyphLayoutEngine.h | 63 ++++++++++++++++++----------
----------------------------------------------------------------------------
diff --git a/build/jam/DefaultBuildProfiles b/build/jam/DefaultBuildProfiles
index 7263991..05180d9 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 ee80b19..b1f3c7c 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 23514de..9e69a7c 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 b930f51..6ab930a 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 8cb50c8..ddb490a 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 f039226..75df316 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 1776695..6aaf1c0 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 a7e3a8a..0dc0cad 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 963c0ca..501a6b2 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);