forked from kiwibrowser/src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfontconfig_util_linux.h
47 lines (34 loc) · 1.63 KB
/
fontconfig_util_linux.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_TEST_FONTCONFIG_UTIL_LINUX_H_
#define BASE_TEST_FONTCONFIG_UTIL_LINUX_H_
#include <stddef.h>
#include <string>
namespace base {
class FilePath;
// Initializes Fontconfig with a custom configuration suitable for tests.
void SetUpFontconfig();
// Deinitializes Fontconfig.
void TearDownFontconfig();
// Instructs Fontconfig to load |path|, an XML configuration file, into the
// current config, returning true on success.
bool LoadConfigFileIntoFontconfig(const FilePath& path);
// Writes |data| to a file in |temp_dir| and passes it to
// LoadConfigFileIntoFontconfig().
bool LoadConfigDataIntoFontconfig(const FilePath& temp_dir,
const std::string& data);
// Returns a Fontconfig <edit> stanza.
std::string CreateFontconfigEditStanza(const std::string& name,
const std::string& type,
const std::string& value);
// Returns a Fontconfig <test> stanza.
std::string CreateFontconfigTestStanza(const std::string& name,
const std::string& op,
const std::string& type,
const std::string& value);
// Returns a Fontconfig <alias> stanza.
std::string CreateFontconfigAliasStanza(const std::string& original_family,
const std::string& preferred_family);
} // namespace base
#endif // BASE_TEST_FONTCONFIG_UTIL_LINUX_H_