提交 b34d69be 编写于 作者: C Chinmay Garde 提交者: GitHub

Disable chattly log in SimpleFontData and stop reading VDMX metrics for fonts on iOS/OSX. (#2824)

上级 7c872277
......@@ -130,7 +130,6 @@ void SimpleFontData::platformGlyphInit()
// are mapped to the ZERO WIDTH SPACE glyph.
if (m_zeroWidthSpaceGlyph == m_spaceGlyph) {
m_zeroWidthSpaceGlyph = 0;
WTF_LOG_ERROR("Font maps SPACE and ZERO WIDTH SPACE to the same glyph. Glyph width will not be overridden.");
}
m_missingGlyphData.fontData = this;
......
......@@ -43,8 +43,12 @@
namespace blink {
#if OS(LINUX) || OS(ANDROID)
// This is the largest VDMX table which we'll try to load and parse.
static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB
static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB
#endif // OS(LINUX) || OS(ANDROID)
void SimpleFontData::platformInit()
{
......@@ -66,7 +70,7 @@ void SimpleFontData::platformInit()
int vdmxAscent = 0, vdmxDescent = 0;
bool isVDMXValid = false;
#if OS(LINUX) || OS(ANDROID) || OS(IOS) || OS(MACOSX)
#if OS(LINUX) || OS(ANDROID)
// Manually digging up VDMX metrics is only applicable when bytecode hinting using FreeType.
// With GDI, the metrics will already have taken this into account (as needed).
// With DirectWrite or CoreText, no bytecode hinting is ever done.
......@@ -100,7 +104,7 @@ void SimpleFontData::platformInit()
} else {
ascent = SkScalarRoundToInt(-metrics.fAscent);
descent = SkScalarRoundToInt(metrics.fDescent);
#if OS(LINUX) || OS(ANDROID) || OS(IOS)
#if OS(LINUX) || OS(ANDROID)
// When subpixel positioning is enabled, if the descent is rounded down, the descent part
// of the glyph may be truncated when displayed in a 'overflow: hidden' container.
// To avoid that, borrow 1 unit from the ascent when possible.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册