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

Side by Side Diff: ui/gfx/platform_font_linux.h

Issue 1870873003: Remove screen dependency from font_render_params_linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
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 #ifndef UI_GFX_PLATFORM_FONT_LINUX_H_ 5 #ifndef UI_GFX_PLATFORM_FONT_LINUX_H_
6 #define UI_GFX_PLATFORM_FONT_LINUX_H_ 6 #define UI_GFX_PLATFORM_FONT_LINUX_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Computes the metrics if they have not yet been computed. 77 // Computes the metrics if they have not yet been computed.
78 void ComputeMetricsIfNecessary(); 78 void ComputeMetricsIfNecessary();
79 79
80 skia::RefPtr<SkTypeface> typeface_; 80 skia::RefPtr<SkTypeface> typeface_;
81 81
82 // Additional information about the face. 82 // Additional information about the face.
83 // Skia actually expects a family name and not a font name. 83 // Skia actually expects a family name and not a font name.
84 std::string font_family_; 84 std::string font_family_;
85 int font_size_pixels_; 85 int font_size_pixels_;
86 int style_; 86 int style_;
87 #if defined(OS_CHROMEOS)
88 float device_scale_factor_; 87 float device_scale_factor_;
89 #endif
90 88
91 // Information describing how the font should be rendered. 89 // Information describing how the font should be rendered.
92 FontRenderParams font_render_params_; 90 FontRenderParams font_render_params_;
93 91
94 // Cached metrics, generated on demand. 92 // Cached metrics, generated on demand.
95 bool metrics_need_computation_ = true; 93 bool metrics_need_computation_ = true;
96 int ascent_pixels_; 94 int ascent_pixels_;
97 int height_pixels_; 95 int height_pixels_;
98 int cap_height_pixels_; 96 int cap_height_pixels_;
99 double average_width_pixels_; 97 double average_width_pixels_;
100 98
101 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
102 // A font description string of the format used by gfx::FontList. 100 // A font description string of the format used by gfx::FontList.
103 static std::string* default_font_description_; 101 static std::string* default_font_description_;
104 #endif 102 #endif
105 103
106 DISALLOW_COPY_AND_ASSIGN(PlatformFontLinux); 104 DISALLOW_COPY_AND_ASSIGN(PlatformFontLinux);
107 }; 105 };
108 106
109 } // namespace gfx 107 } // namespace gfx
110 108
111 #endif // UI_GFX_PLATFORM_FONT_LINUX_H_ 109 #endif // UI_GFX_PLATFORM_FONT_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698