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

Side by Side Diff: ui/gfx/test/fontconfig_util_linux.h

Issue 394963002: linux: Add tests for FontRenderParams on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add pangoft2 to BUILD.gn Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 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.
4
5 #ifndef UI_GFX_TEST_FONTCONFIG_UTIL_LINUX_H_
6 #define UI_GFX_TEST_FONTCONFIG_UTIL_LINUX_H_
7
8 #include <string>
9
10 #include "base/files/file_path.h"
11
12 namespace gfx {
13
14 // NULL-terminated array of paths to font files that are expected to exist on
15 // machines where tests are run.
16 extern const char* const kSystemFontsForFontconfig[];
17
18 // Strings appearing at the beginning and end of Fontconfig XML files.
19 extern const char kFontconfigFileHeader[];
20 extern const char kFontconfigFileFooter[];
21
22 // Strings appearing at the beginning and end of Fontconfig <match> stanzas.
23 extern const char kFontconfigMatchHeader[];
24 extern const char kFontconfigMatchFooter[];
25
26 // Initializes Fontconfig and creates and swaps in a new, empty config.
27 void SetUpFontconfig();
28
29 // Deinitializes Fontconfig.
30 void TearDownFontconfig();
31
32 // Loads the font file at |path| into the current config, returning true on
33 // success.
34 bool LoadFontIntoFontconfig(const base::FilePath& path);
35
36 // Instructs Fontconfig to load |path|, an XML configuration file, into the
37 // current config, returning true on success.
38 bool LoadConfigFileIntoFontconfig(const base::FilePath& path);
39
40 // Writes |data| to a file in |temp_dir| and passes it to
41 // LoadConfigFileIntoFontconfig().
42 bool LoadConfigDataIntoFontconfig(const base::FilePath& temp_dir,
43 const std::string& data);
44
45 // Returns a Fontconfig <edit> stanza.
46 std::string CreateFontconfigEditStanza(const std::string& name,
47 const std::string& type,
48 const std::string& value);
49
50 // Returns a Fontconfig <test> stanza.
51 std::string CreateFontconfigTestStanza(const std::string& name,
52 const std::string& op,
53 const std::string& type,
54 const std::string& value);
55
56 } // namespace gfx
57
58 #endif // UI_GFX_TEST_FONTCONFIG_UTIL_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698