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

Side by Side Diff: ui/gfx/platform_font_mac.mm

Issue 789583002: Updates subpixel positioning and hinting when DSF is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: linux fix Created 6 years 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/platform_font_mac.h ('k') | ui/gfx/platform_font_pango.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/platform_font_mac.h" 5 #include "ui/gfx/platform_font_mac.h"
6 6
7 #include <Cocoa/Cocoa.h> 7 #include <Cocoa/Cocoa.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 std::string PlatformFontMac::GetActualFontNameForTesting() const { 121 std::string PlatformFontMac::GetActualFontNameForTesting() const {
122 return base::SysNSStringToUTF8([native_font_ familyName]); 122 return base::SysNSStringToUTF8([native_font_ familyName]);
123 } 123 }
124 124
125 int PlatformFontMac::GetFontSize() const { 125 int PlatformFontMac::GetFontSize() const {
126 return font_size_; 126 return font_size_;
127 } 127 }
128 128
129 const FontRenderParams& PlatformFontMac::GetFontRenderParams() const { 129 const FontRenderParams& PlatformFontMac::GetFontRenderParams() {
130 return render_params_; 130 return render_params_;
131 } 131 }
132 132
133 NativeFont PlatformFontMac::GetNativeFont() const { 133 NativeFont PlatformFontMac::GetNativeFont() const {
134 return [[native_font_.get() retain] autorelease]; 134 return [[native_font_.get() retain] autorelease];
135 } 135 }
136 136
137 //////////////////////////////////////////////////////////////////////////////// 137 ////////////////////////////////////////////////////////////////////////////////
138 // PlatformFontMac, private: 138 // PlatformFontMac, private:
139 139
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return new PlatformFontMac(native_font); 190 return new PlatformFontMac(native_font);
191 } 191 }
192 192
193 // static 193 // static
194 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name, 194 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name,
195 int font_size) { 195 int font_size) {
196 return new PlatformFontMac(font_name, font_size); 196 return new PlatformFontMac(font_name, font_size);
197 } 197 }
198 198
199 } // namespace gfx 199 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/platform_font_mac.h ('k') | ui/gfx/platform_font_pango.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698