Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1136)

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 11363008: Fix for 128506: Random Chinese/Japanese characters are missing in documents printed via the syst... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | skia/ext/vector_platform_device_emf_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main_platform_delegate_win.cc
===================================================================
--- content/renderer/renderer_main_platform_delegate_win.cc (revision 168878)
+++ content/renderer/renderer_main_platform_delegate_win.cc (working copy)
@@ -9,12 +9,15 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/string16.h"
#include "base/win/win_util.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/injection_test_win.h"
#include "content/public/renderer/render_thread.h"
+#include "content/renderer/render_thread_impl.h"
#include "sandbox/win/src/sandbox.h"
#include "skia/ext/skia_sandbox_support_win.h"
+#include "skia/ext/vector_platform_device_emf_win.h"
#include "unicode/timezone.h"
namespace content {
@@ -28,6 +31,17 @@
}
}
+void SkiaPreCacheFontCharacters(const LOGFONT& logfont,
+ const wchar_t* text,
+ unsigned int text_length) {
+ content::RenderThreadImpl* render_thread_impl =
+ content::RenderThreadImpl::current();
+ if (render_thread_impl) {
+ render_thread_impl->PreCacheFontCharacters(logfont,
+ string16(text, text_length));
+ }
+}
+
void __cdecl ForceCrashOnSigAbort(int) {
*((int*)0) = 0x1337;
}
@@ -78,6 +92,8 @@
// is disabled, we don't have to make this dummy call.
scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
SetSkiaEnsureTypefaceAccessible(SkiaPreCacheFont);
+ skia::SetSkiaEnsureTypefaceCharactersAccessible(
+ SkiaPreCacheFontCharacters);
}
}
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | skia/ext/vector_platform_device_emf_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698