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

Unified Diff: app/gfx/font_win.cc

Issue 341045: Fix up extension badge text drawing.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « app/gfx/font_skia.cc ('k') | app/resource_bundle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/font_win.cc
===================================================================
--- app/gfx/font_win.cc (revision 30614)
+++ app/gfx/font_win.cc (working copy)
@@ -111,10 +111,8 @@
return base_font_ref_;
}
-std::wstring Font::FontName() {
- LOGFONT font_info;
- GetObject(hfont(), sizeof(LOGFONT), &font_info);
- return (std::wstring(font_info.lfFaceName));
+const std::wstring& Font::FontName() const {
+ return font_name();
}
int Font::FontSize() {
@@ -145,6 +143,10 @@
style_(style),
dlu_base_x_(dlu_base_x) {
DLOG_ASSERT(hfont);
+
+ LOGFONT font_info;
+ GetObject(hfont(), sizeof(LOGFONT), &font_info);
+ font_name_ = std::wstring(font_info.lfFaceName);
}
Font::HFontRef::~HFontRef() {
« no previous file with comments | « app/gfx/font_skia.cc ('k') | app/resource_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698