Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
ports
SkFontConfigInterface_direct.h
Go to the documentation of this file.
1
/*
2
* Copyright 2009-2015 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
/* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */
9
#ifndef SKFONTCONFIGINTERFACE_DIRECT_H_
10
#define SKFONTCONFIGINTERFACE_DIRECT_H_
11
12
#include "
include/ports/SkFontConfigInterface.h
"
13
14
#include <fontconfig/fontconfig.h>
15
16
class
SkFontConfigInterfaceDirect
:
public
SkFontConfigInterface
{
17
public
:
18
/** Create around a FontConfig instance.
19
* If 'fc' is nullptr, each method call will use the current config.
20
* Takes ownership of 'fc' and will call FcConfigDestroy on it.
21
*/
22
SkFontConfigInterfaceDirect
(FcConfig* fc);
23
~SkFontConfigInterfaceDirect
()
override
;
24
25
bool
matchFamilyName
(
const
char
familyName[],
26
SkFontStyle
requested,
27
FontIdentity
* outFontIdentifier,
28
SkString
* outFamilyName,
29
SkFontStyle
* outStyle)
override
;
30
31
SkStreamAsset
*
openStream
(
const
FontIdentity
&)
override
;
32
33
protected
:
34
virtual
bool
isAccessible
(
const
char
* filename);
35
36
private
:
37
FcConfig *
const
fFC;
38
bool
isValidPattern(FcPattern* pattern);
39
FcPattern* MatchFont(FcFontSet* font_set,
const
char
* post_config_family,
40
const
SkString
& family);
41
using
INHERITED
=
SkFontConfigInterface
;
42
};
43
44
#endif
SkFontConfigInterface.h
SkFontConfigInterfaceDirect
Definition
SkFontConfigInterface_direct.h:16
SkFontConfigInterfaceDirect::openStream
SkStreamAsset * openStream(const FontIdentity &) override
Definition
SkFontConfigInterface_direct.cpp:707
SkFontConfigInterfaceDirect::isAccessible
virtual bool isAccessible(const char *filename)
Definition
SkFontConfigInterface_direct.cpp:507
SkFontConfigInterfaceDirect::matchFamilyName
bool matchFamilyName(const char familyName[], SkFontStyle requested, FontIdentity *outFontIdentifier, SkString *outFamilyName, SkFontStyle *outStyle) override
Definition
SkFontConfigInterface_direct.cpp:588
SkFontConfigInterfaceDirect::~SkFontConfigInterfaceDirect
~SkFontConfigInterfaceDirect() override
Definition
SkFontConfigInterface_direct.cpp:501
SkFontConfigInterface
Definition
SkFontConfigInterface.h:24
SkFontStyle
Definition
SkFontStyle.h:16
SkStreamAsset
Definition
SkStream.h:186
SkString
Definition
SkString.h:118
SkFontConfigInterface::FontIdentity
Definition
SkFontConfigInterface.h:45
Generated on Fri Apr 26 2024 06:17:24 for Flutter Engine by
1.9.8