blob: e478f6ae73a55e9c1e9f42c656605c5ce5b63d77 (
plain)
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
|
// Copyright (c) 2010 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 CHROME_COMMON_FONT_CONFIG_IPC_LINUX_H_
#define CHROME_COMMON_FONT_CONFIG_IPC_LINUX_H_
#pragma once
#include "skia/ext/SkFontHost_fontconfig_impl.h"
#include <string>
// FontConfig implementation for Skia that proxies out of process to get out
// of the sandbox. See http://code.google.com/p/chromium/wiki/LinuxSandboxIPC
class FontConfigIPC : public FontConfigInterface {
public:
explicit FontConfigIPC(int fd);
~FontConfigIPC();
// FontConfigInterface implementation.
virtual bool Match(std::string* result_family,
unsigned* result_filefaceid,
bool filefaceid_valid,
unsigned filefaceid,
const std::string& family,
const void* characters,
size_t characters_bytes,
bool* is_bold, bool* is_italic);
virtual int Open(unsigned filefaceid);
enum Method {
METHOD_MATCH = 0,
METHOD_OPEN = 1,
};
private:
const int fd_;
};
#endif // CHROME_COMMON_FONT_CONFIG_IPC_LINUX_H_
|