mirror of
https://github.com/roytam1/mozilla45esr.git
synced 2026-05-26 06:25:03 +00:00
import changes from palemoon27:
- Issue #1610 part 1: Add valgrind suppression for uninitialized memory access and leak in old fontconfig. (1673cb36c) - Issue #1610 Part2: Supply a bundled emoji font on Windows. (8129a17b6) - Issue #1610 Part 3: Bypass GDI table loading for embedded fonts. (96465b766) - Switch to the Open Twemoji font resources. (682ec5e9e) - update Twemoji font to KwanEsq/twemoji-colr v12 branch with twemoji-12.1.2. (8a07ee587)
This commit is contained in:
@@ -27,6 +27,10 @@ fi
|
||||
# Enable building ./signmar and running libmar signature tests
|
||||
MOZ_ENABLE_SIGNMAR=1
|
||||
|
||||
if test "$OS_TARGET" = "WINNT"; then
|
||||
MOZ_BUNDLED_FONTS=1
|
||||
fi
|
||||
|
||||
MOZ_CHROME_FILE_FORMAT=omni
|
||||
MOZ_DISABLE_EXPORT_JS=1
|
||||
MOZ_SAFE_BROWSING=1
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
Twemoji Mozilla
|
||||
================
|
||||
|
||||
The upstream repository of Twemoji Mozilla can be found at
|
||||
|
||||
https://github.com/mozilla/twemoji-colr
|
||||
|
||||
Please refer commit history for the current version of the font.
|
||||
This file purposely omits the version, so there is no need to update it here.
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG['OS_ARCH'] in ('WINNT'):
|
||||
DIST_SUBDIR = ''
|
||||
FINAL_TARGET_FILES.fonts += [
|
||||
'TwemojiMozilla.ttf'
|
||||
]
|
||||
@@ -51,6 +51,9 @@
|
||||
@RESPATH@/browser/defaults/profile/localstore.rdf
|
||||
@RESPATH@/browser/defaults/profile/mimeTypes.rdf
|
||||
@RESPATH@/dictionaries/*
|
||||
#if defined(XP_WIN)
|
||||
@RESPATH@/fonts/*
|
||||
#endif
|
||||
@RESPATH@/hyphenation/*
|
||||
@RESPATH@/browser/@PREF_DIR@/firefox-l10n.js
|
||||
#ifdef HAVE_MAKENSISU
|
||||
|
||||
@@ -12,6 +12,7 @@ DIRS += [
|
||||
'base',
|
||||
'components',
|
||||
'experiments',
|
||||
'fonts',
|
||||
'fuel',
|
||||
'locales',
|
||||
'modules',
|
||||
|
||||
@@ -179,6 +179,30 @@
|
||||
fun:gdk_display_open
|
||||
...
|
||||
}
|
||||
# With older versions of fontconfig (e.g. 2.8.0 on taskcluster systems),
|
||||
# there's an uninitialized memory usage and leak when loading app fonts.
|
||||
{
|
||||
Bug 1231701
|
||||
Memcheck:Param
|
||||
write(buf)
|
||||
...
|
||||
fun:FcDirCacheWrite
|
||||
fun:FcDirCacheScan
|
||||
fun:FcConfigAddDirList
|
||||
fun:FcConfigAppFontAddDir
|
||||
...
|
||||
}
|
||||
{
|
||||
Bug 1231701
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
fun:FcDirScanConfig
|
||||
fun:FcDirCacheScan
|
||||
fun:FcConfigAddDirList
|
||||
fun:FcConfigAppFontAddDir
|
||||
...
|
||||
}
|
||||
|
||||
###################################
|
||||
# Leaks in short lived precesses #
|
||||
|
||||
@@ -383,6 +383,7 @@ gfxDWriteFontEntry::CopyFontTable(uint32_t aTableTag,
|
||||
FallibleTArray<uint8_t> &aBuffer)
|
||||
{
|
||||
gfxDWriteFontList *pFontList = gfxDWriteFontList::PlatformFontList();
|
||||
const uint32_t tagBE = NativeEndian::swapToBigEndian(aTableTag);
|
||||
|
||||
// Don't use GDI table loading for symbol fonts or for
|
||||
// italic fonts in Arabic-script system locales because of
|
||||
@@ -393,24 +394,19 @@ gfxDWriteFontEntry::CopyFontTable(uint32_t aTableTag,
|
||||
!mFont->IsSymbolFont())
|
||||
{
|
||||
LOGFONTW logfont = { 0 };
|
||||
if (!InitLogFont(mFont, &logfont))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
AutoDC dc;
|
||||
AutoSelectFont font(dc.GetDC(), &logfont);
|
||||
if (font.IsValid()) {
|
||||
uint32_t tableSize =
|
||||
::GetFontData(dc.GetDC(),
|
||||
NativeEndian::swapToBigEndian(aTableTag), 0,
|
||||
nullptr, 0);
|
||||
if (tableSize != GDI_ERROR) {
|
||||
if (aBuffer.SetLength(tableSize, fallible)) {
|
||||
::GetFontData(dc.GetDC(),
|
||||
NativeEndian::swapToBigEndian(aTableTag), 0,
|
||||
aBuffer.Elements(), aBuffer.Length());
|
||||
return NS_OK;
|
||||
if (InitLogFont(mFont, &logfont)) {
|
||||
AutoDC dc;
|
||||
AutoSelectFont font(dc.GetDC(), &logfont);
|
||||
if (font.IsValid()) {
|
||||
uint32_t tableSize =
|
||||
::GetFontData(dc.GetDC(), tagBE, 0, nullptr, 0);
|
||||
if (tableSize != GDI_ERROR) {
|
||||
if (aBuffer.SetLength(tableSize, fallible)) {
|
||||
::GetFontData(dc.GetDC(), tagBE, 0,
|
||||
aBuffer.Elements(), aBuffer.Length());
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -427,8 +423,7 @@ gfxDWriteFontEntry::CopyFontTable(uint32_t aTableTag,
|
||||
void *tableContext = nullptr;
|
||||
BOOL exists;
|
||||
HRESULT hr =
|
||||
fontFace->TryGetFontTable(NativeEndian::swapToBigEndian(aTableTag),
|
||||
(const void**)&tableData, &len,
|
||||
fontFace->TryGetFontTable(tagBE, (const void**)&tableData, &len,
|
||||
&tableContext, &exists);
|
||||
if (FAILED(hr) || !exists) {
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -648,7 +643,10 @@ gfxDWriteFontEntry::InitLogFont(IDWriteFont *aFont, LOGFONTW *aLogFont)
|
||||
IDWriteGdiInterop *gdi =
|
||||
gfxDWriteFontList::PlatformFontList()->GetGDIInterop();
|
||||
hr = gdi->ConvertFontToLOGFONT(aFont, aLogFont, &isInSystemCollection);
|
||||
return (FAILED(hr) ? false : true);
|
||||
// If the font is not in the system collection, GDI will be unable to
|
||||
// select it and load its tables, so we return false here to indicate
|
||||
// failure, and let CopyFontTable fall back to DWrite native methods.
|
||||
return (SUCCEEDED(hr) && isInSystemCollection);
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -850,6 +850,7 @@ static const char kFontSegoeUIEmoji[] = "Segoe UI Emoji";
|
||||
static const char kFontSegoeUISymbol[] = "Segoe UI Symbol";
|
||||
static const char kFontSylfaen[] = "Sylfaen";
|
||||
static const char kFontTraditionalArabic[] = "Traditional Arabic";
|
||||
static const char kFontTwemojiMozilla[] = "Twemoji Mozilla";
|
||||
static const char kFontUtsaah[] = "Utsaah";
|
||||
static const char kFontYuGothic[] = "Yu Gothic";
|
||||
|
||||
@@ -860,6 +861,7 @@ gfxWindowsPlatform::GetCommonFallbackFonts(uint32_t aCh, uint32_t aNextCh,
|
||||
{
|
||||
if (aNextCh == 0xfe0fu) {
|
||||
aFontList.AppendElement(kFontSegoeUIEmoji);
|
||||
aFontList.AppendElement(kFontTwemojiMozilla);
|
||||
}
|
||||
|
||||
// Arial is used as the default fallback for system fallback
|
||||
@@ -871,9 +873,11 @@ gfxWindowsPlatform::GetCommonFallbackFonts(uint32_t aCh, uint32_t aNextCh,
|
||||
if (aNextCh == 0xfe0eu) {
|
||||
aFontList.AppendElement(kFontSegoeUISymbol);
|
||||
aFontList.AppendElement(kFontSegoeUIEmoji);
|
||||
aFontList.AppendElement(kFontTwemojiMozilla);
|
||||
} else {
|
||||
if (aNextCh != 0xfe0fu) {
|
||||
aFontList.AppendElement(kFontSegoeUIEmoji);
|
||||
aFontList.AppendElement(kFontTwemojiMozilla);
|
||||
}
|
||||
aFontList.AppendElement(kFontSegoeUISymbol);
|
||||
}
|
||||
|
||||
@@ -183,10 +183,11 @@ HTTP(..) != 1170688.html 1170688-ref.html
|
||||
|
||||
# Bug 727276: tests with variation selectors 15 and 16 to control emoji rendering style
|
||||
== emoji-03.html emoji-03-ref.html
|
||||
# the next two will fail on OS X 10.6 and on Windows prior to 8.1 because no color emoji font is present,
|
||||
# and also on Linux/Android/B2G platforms until we have color emoji fonts there
|
||||
fails-if(OSX==1006||/^Windows\x20NT\x20(5|6\.[0-2])/.test(http.oscpu)||gtkWidget||Android) != emoji-03.html emoji-03-notref.html
|
||||
fails-if(OSX==1006||/^Windows\x20NT\x20(5|6\.[0-2])/.test(http.oscpu)||gtkWidget||Android) == emoji-04.html emoji-04-ref.html
|
||||
# the next two will fail on OS X 10.6 because no color emoji font is present,
|
||||
# and also on Android/B2G platforms until we have color emoji fonts there.
|
||||
# Tests rely on bundled EmojiOne Mozilla to pass on Windows <8.1 and Linux.
|
||||
fails-if(OSX==1006||B2G||Android) != emoji-03.html emoji-03-notref.html
|
||||
fails-if(OSX==1006||B2G||Android) == emoji-04.html emoji-04-ref.html
|
||||
!= emoji-05.html emoji-05-notref.html
|
||||
|
||||
# check that Graphite shaping (bug 631479) is working
|
||||
|
||||
@@ -140,6 +140,9 @@
|
||||
#endif
|
||||
<li><a href="about:license#sunsoft">SunSoft License</a></li>
|
||||
<li><a href="about:license#superfasthash">SuperFastHash License</a></li>
|
||||
#if defined(XP_WIN)
|
||||
<li><a href="about:license#twemoji">Twemoji License</a></li>
|
||||
#endif
|
||||
<li><a href="about:license#unicode">Unicode License</a></li>
|
||||
<li><a href="about:license#ucal">University of California License</a></li>
|
||||
<li><a href="about:license#url-validation">URL Validation Regexp License</a></li>
|
||||
@@ -4928,6 +4931,50 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
<hr>
|
||||
|
||||
#if defined(XP_WIN)
|
||||
<h1><a id="twemoji"></a>Twemoji License</h1>
|
||||
|
||||
<p>This license applies to the emoji art contained within the bundled
|
||||
emoji font file.</p>
|
||||
|
||||
<pre>
|
||||
Copyright (c) 2018 Twitter, Inc and other contributors.
|
||||
|
||||
Creative Commons Attribution 4.0 International (CC BY 4.0)
|
||||
|
||||
See https://creativecommons.org/licenses/by/4.0/legalcode or
|
||||
for the human readable summary: https://creativecommons.org/licenses/by/4.0/
|
||||
|
||||
You are free to:
|
||||
|
||||
Share copy and redistribute the material in any medium or format
|
||||
|
||||
Adapt remix, transform, and build upon the material for any purpose, even commercially.
|
||||
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution You must give appropriate credit, provide a link to the license,
|
||||
and indicate if changes were made. You may do so in any reasonable manner,
|
||||
but not in any way that suggests the licensor endorses you or your use.
|
||||
|
||||
No additional restrictions You may not apply legal terms or technological
|
||||
measures that legally restrict others from doing anything the license permits.
|
||||
|
||||
Notices:
|
||||
|
||||
You do not have to comply with the license for elements of the material in
|
||||
the public domain or where your use is permitted by an applicable exception or
|
||||
limitation. No warranties are given. The license may not give you all of the
|
||||
permissions necessary for your intended use. For example, other rights such as
|
||||
publicity, privacy, or moral rights may limit how you use the material.
|
||||
</pre>
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
#endif
|
||||
<h1><a id="unicode"></a>Unicode License</h1>
|
||||
|
||||
<p>This license applies to certain files in the directories
|
||||
|
||||
Reference in New Issue
Block a user