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

Unified Diff: ui/gfx/render_text_win.cc

Issue 10189001: Fix RenderTextWin font linking with custom fonts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_win.cc
===================================================================
--- ui/gfx/render_text_win.cc (revision 133228)
+++ ui/gfx/render_text_win.cc (working copy)
@@ -601,10 +601,9 @@
// Select the font desired for glyph generation.
SelectObject(cached_hdc_, run->font.GetNativeFont());
- SCRIPT_FONTPROPERTIES font_properties;
- memset(&font_properties, 0, sizeof(font_properties));
- font_properties.cBytes = sizeof(SCRIPT_FONTPROPERTIES);
- ScriptGetFontProperties(cached_hdc_, &run->script_cache, &font_properties);
+ SCRIPT_FONTPROPERTIES properties;
+ memset(&properties, 0, sizeof(properties));
+ properties.cBytes = sizeof(properties);
run->logical_clusters.reset(new WORD[run_length]);
run->glyph_count = 0;
@@ -632,8 +631,9 @@
} else if (hr == S_OK) {
// If |hr| is S_OK, there could still be missing glyphs in the output,
// see: http://msdn.microsoft.com/en-us/library/windows/desktop/dd368564.aspx
+ ScriptGetFontProperties(cached_hdc_, &run->script_cache, &properties);
for (int i = 0; i < run->glyph_count; ++i) {
- if (run->glyphs[i] == font_properties.wgDefault) {
+ if (run->glyphs[i] == properties.wgDefault) {
glyphs_missing = true;
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698