summaryrefslogtreecommitdiffstats
path: root/ui/gfx/platform_font.h
diff options
context:
space:
mode:
authorasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 14:35:15 +0000
committerasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 14:35:15 +0000
commitc8703bbf78eb4a8b9bcd3ae9371298cdbb678653 (patch)
tree807b51c17e3f5c5f548d4a27e15cef97d47add50 /ui/gfx/platform_font.h
parentb4031640e8f24285115bf9244fd4c65b2157fa46 (diff)
downloadchromium_src-c8703bbf78eb4a8b9bcd3ae9371298cdbb678653.zip
chromium_src-c8703bbf78eb4a8b9bcd3ae9371298cdbb678653.tar.gz
chromium_src-c8703bbf78eb4a8b9bcd3ae9371298cdbb678653.tar.bz2
Use pixel sizes in PlatformFontWin instead of point sizes.
This matches the PlatformFontPango implementation and the comments for |GetFontSize()|. Update users of this API appropriately and update header comments to clarify that sizes are in pixels. Also, a few misc cleanup changes. BUG=none TEST=Existing unit tests pass. Font sizes in Chromium UI do not change. Review URL: http://codereview.chromium.org/8267009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/platform_font.h')
-rw-r--r--ui/gfx/platform_font.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/gfx/platform_font.h b/ui/gfx/platform_font.h
index 38fc779..7e316fe 100644
--- a/ui/gfx/platform_font.h
+++ b/ui/gfx/platform_font.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_GFX_PLATFORM_FONT_
-#define UI_GFX_PLATFORM_FONT_
+#ifndef UI_GFX_PLATFORM_FONT_H_
+#define UI_GFX_PLATFORM_FONT_H_
#pragma once
#include <string>
@@ -19,16 +19,17 @@ class Font;
class UI_EXPORT PlatformFont : public base::RefCounted<PlatformFont> {
public:
- // Create an appropriate PlatformFont implementation.
+ // Creates an appropriate PlatformFont implementation.
static PlatformFont* CreateDefault();
static PlatformFont* CreateFromFont(const Font& other);
static PlatformFont* CreateFromNativeFont(NativeFont native_font);
+ // Creates a PlatformFont implementation with the specified |font_name| and
+ // |font_size| in pixels.
static PlatformFont* CreateFromNameAndSize(const string16& font_name,
int font_size);
// Returns a new Font derived from the existing font.
- // size_delta is the size to add to the current font. See the single
- // argument version of this method for an example.
+ // |size_delta| is the size in pixels to add to the current font.
// The style parameter specifies the new style for the font, and is a
// bitmask of the values: BOLD, ITALIC and UNDERLINED.
virtual Font DeriveFont(int size_delta, int style) const = 0;
@@ -76,5 +77,5 @@ class UI_EXPORT PlatformFont : public base::RefCounted<PlatformFont> {
} // namespace gfx
-#endif // UI_GFX_PLATFORM_FONT_
+#endif // UI_GFX_PLATFORM_FONT_H_