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() { |