adjust browser_tests exclusion list for DrMemory to find suitable tests
[chromium-blink-merge.git] / ui / gfx / linux_font_delegate.h
blob8a3070bfd7bece1ea0f5753c67303da0ba9205f0
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_GFX_LINUX_FONT_DELEGATE_H_
6 #define UI_GFX_LINUX_FONT_DELEGATE_H_
8 #include <string>
10 #include "ui/gfx/font_render_params_linux.h"
11 #include "ui/gfx/gfx_export.h"
13 namespace gfx {
15 // Allows a Linux platform specific overriding of font preferences.
16 class GFX_EXPORT LinuxFontDelegate {
17 public:
18 virtual ~LinuxFontDelegate() {}
20 // Sets the dynamically loaded singleton that provides font preferences.
21 // This pointer is not owned, and if this method is called a second time,
22 // the first instance is not deleted.
23 static void SetInstance(LinuxFontDelegate* instance);
25 // Returns a LinuxFontDelegate instance for the toolkit used in
26 // the user's desktop environment.
28 // Can return NULL, in case no toolkit has been set. (For example, if we're
29 // running with the "--ash" flag.)
30 static const LinuxFontDelegate* instance();
32 // Whether we should antialias our text.
33 virtual bool UseAntialiasing() const = 0;
35 // What sort of text hinting should we apply?
36 virtual FontRenderParams::Hinting GetHintingStyle() const = 0;
38 // What sort of subpixel rendering should we perform.
39 virtual FontRenderParams::SubpixelRendering
40 GetSubpixelRenderingStyle() const = 0;
42 // Returns the default font name for pango style rendering. The format is a
43 // string of the form "[font name] [font size]".
44 virtual std::string GetDefaultFontName() const = 0;
47 } // namespace gfx
49 #endif // UI_GFX_LINUX_FONT_DELEGATE_H_