mirror of https://github.com/vitalif/phantomjs
Mac OS X: Fix possible crash when using some TrueType fonts.
This is just a workaround. We simply avoid removing the custom font (intentionally leak it, a small price to pay) because otherwise it will invalidate Qt's font cache, which in turns trigger the crash at CoreText's CTFontCopyGraphicsFont. http://code.google.com/p/phantomjs/issues/detail?id=6901.9
parent
2a2b6e455c
commit
d0fe6864a9
|
@ -32,7 +32,11 @@ namespace WebCore {
|
||||||
|
|
||||||
FontCustomPlatformData::~FontCustomPlatformData()
|
FontCustomPlatformData::~FontCustomPlatformData()
|
||||||
{
|
{
|
||||||
|
#if !defined(Q_OS_MAC)
|
||||||
|
// On Mac OS X, do not remove the font because it may crash.
|
||||||
|
// For details, see issue 690 (http://code.google.com/p/phantomjs/issues/detail?id=690).
|
||||||
QFontDatabase::removeApplicationFont(m_handle);
|
QFontDatabase::removeApplicationFont(m_handle);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation, FontWidthVariant, FontRenderingMode)
|
FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, TextOrientation, FontWidthVariant, FontRenderingMode)
|
||||||
|
|
Loading…
Reference in New Issue