Title: [98626] trunk/Source/WebCore
Revision
98626
Author
[email protected]
Date
2011-10-27 13:20:27 -0700 (Thu, 27 Oct 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=70390
Ensure font load for Skia backend during printing.

Patch by Arthur Hsu <[email protected]> on 2011-10-27
Reviewed by James Robinson.

* platform/graphics/chromium/FontChromiumWin.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::paintSkiaText):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (98625 => 98626)


--- trunk/Source/WebCore/ChangeLog	2011-10-27 20:19:55 UTC (rev 98625)
+++ trunk/Source/WebCore/ChangeLog	2011-10-27 20:20:27 UTC (rev 98626)
@@ -1,3 +1,15 @@
+2011-10-27  Arthur Hsu  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=70390
+        Ensure font load for Skia backend during printing.
+
+        Reviewed by James Robinson.
+
+        * platform/graphics/chromium/FontChromiumWin.cpp:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/skia/SkiaFontWin.cpp:
+        (WebCore::paintSkiaText):
+
 2011-10-27  Michael Saboff  <[email protected]>
 
         Investigate storing strings in 8-bit buffers when possible

Modified: trunk/Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp (98625 => 98626)


--- trunk/Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp	2011-10-27 20:19:55 UTC (rev 98625)
+++ trunk/Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp	2011-10-27 20:20:27 UTC (rev 98626)
@@ -395,7 +395,6 @@
         return;
 
     HFONT hfont = font->platformData().hfont();
-    PlatformSupport::ensureFontLoaded(hfont);
 
     // We draw the glyphs in chunks to avoid having to do a heap allocation for
     // the arrays of characters and advances.

Modified: trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp (98625 => 98626)


--- trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp	2011-10-27 20:19:55 UTC (rev 98625)
+++ trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp	2011-10-27 20:20:27 UTC (rev 98626)
@@ -35,6 +35,7 @@
 #include "PlatformContextSkia.h"
 #include "Gradient.h"
 #include "Pattern.h"
+#include "PlatformSupport.h"
 #include "SkCanvas.h"
 #include "SkPaint.h"
 #include "SkShader.h"
@@ -236,6 +237,9 @@
     PlatformContextSkia* platformContext = context->platformContext();
     SkCanvas* canvas = platformContext->canvas();
     TextDrawingModeFlags textMode = platformContext->getTextDrawingMode();
+    // Ensure font load for printing, because PDF device needs it.
+    if (canvas->getTopDevice()->getDeviceCapabilities() & SkDevice::kVector_Capability)
+        PlatformSupport::ensureFontLoaded(hfont);
 
     // Filling (if necessary). This is the common case.
     SkPaint paint;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to