[Chromium] Out-of-process font loading garbles text
authorbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 03:15:33 +0000 (03:15 +0000)
committerbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 03:15:33 +0000 (03:15 +0000)
commitf924af815f03fa038f85cb9f2d30308c9b2e400b
tree8f339a93981b0b271dc3fb617d94f71c2476ba3f
parent066970c4ed5d8b45f529a22ae6ae0e12f49c44ae
[Chromium] Out-of-process font loading garbles text
https://bugs.webkit.org/show_bug.cgi?id=83002

Reviewed by Kent Tamura.

Initialize m_CTFont by using m_cgFont in FontPlatformData when we use
out-of-process font loading.

No new tests. This problem only occurs when the user uses a third party
font management software like Font Explorer so it is difficult to add
tests.

* platform/graphics/chromium/CrossProcessFontLoading.mm:
(WebCore):
(WebCore::FontPlatformData::loadFont): If font loading fails, set null to outNSFont so that the FontPlatformData won't be used.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFont): Modified to return the appropriate NSFont object when the font from the browser process.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::createFontPlatformData): Returns null when the generated FontPlatformData object doesn't have NSFont object.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm
Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
Source/WebCore/platform/graphics/mac/FontCacheMac.mm