Fix search results being clipped in app list.
[chromium-blink-merge.git] / ui / gfx / linux_font_delegate.h
blob3a8d7bb86dcb74376d80b16e7ee0d77f31118960
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 "base/memory/scoped_ptr.h"
11 #include "ui/gfx/font_render_params.h"
12 #include "ui/gfx/gfx_export.h"
14 namespace gfx {
16 // Allows a Linux platform-specific overriding of font preferences.
17 class GFX_EXPORT LinuxFontDelegate {
18 public:
19 virtual ~LinuxFontDelegate() {}
21 // Sets the dynamically loaded singleton that provides font preferences.
22 // This pointer is not owned, and if this method is called a second time,
23 // the first instance is not deleted.
24 static void SetInstance(LinuxFontDelegate* instance);
26 // Returns a LinuxFontDelegate instance for the toolkit used in
27 // the user's desktop environment.
29 // Can return NULL, in case no toolkit has been set. (For example, if we're
30 // running with the "--ash" flag.)
31 static const LinuxFontDelegate* instance();
33 // Returns the default font rendering settings.
34 virtual FontRenderParams GetDefaultFontRenderParams() const = 0;
36 // Returns details about the default UI font. |style_out| holds a bitfield of
37 // gfx::Font::Style values.
38 virtual void GetDefaultFontDescription(
39 std::string* family_out,
40 int* size_pixels_out,
41 int* style_out,
42 FontRenderParams* params_out) const = 0;
45 } // namespace gfx
47 #endif // UI_GFX_LINUX_FONT_DELEGATE_H_