Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cfpf_skiafontmgr.h
Go to the documentation of this file.
1
// Copyright 2016 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_
8
#
define
CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_
9
10
#
include
<
map
>
11
#
include
<
memory
>
12
#
include
<
vector
>
13
14
#
include
"core/fxcrt/bytestring.h"
15
#
include
"core/fxcrt/fx_codepage_forward.h"
16
#
include
"core/fxcrt/retain_ptr.h"
17
#
include
"core/fxge/cfx_face.h"
18
#
include
"core/fxge/freetype/fx_freetype.h"
19
20
class
CFPF_SkiaFont
;
21
class
CFPF_SkiaPathFont
;
22
23
class
CFPF_SkiaFontMgr
{
24
public
:
25
CFPF_SkiaFontMgr
();
26
~
CFPF_SkiaFontMgr
();
27
28
void
LoadFonts
(
const
char
** user_paths);
29
CFPF_SkiaFont
*
CreateFont
(
ByteStringView
family_name,
30
FX_Charset
charset,
31
uint32_t style);
32
33
bool
InitFTLibrary
();
34
RetainPtr
<CFX_Face>
GetFontFace
(
ByteStringView
path, int32_t face_index);
35
36
private
:
37
void
ScanPath(
const
ByteString
& path);
38
void
ScanFile(
const
ByteString
& file);
39
std::unique_ptr<CFPF_SkiaPathFont> ReportFace(
RetainPtr
<CFX_Face> face,
40
const
ByteString
& file);
41
42
bool
loaded_fonts_ =
false
;
43
ScopedFXFTLibraryRec
ft_library_;
44
std::vector<std::unique_ptr<CFPF_SkiaPathFont>> font_faces_;
45
// Key is a hash based on CreateFont() parameters.
46
std::map<uint32_t, std::unique_ptr<CFPF_SkiaFont>> family_font_map_;
47
};
48
49
#
endif
// CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_
ByteString
fxcrt::ByteString ByteString
Definition
bytestring.h:180
CFPF_GetSkiaDeviceModule
CFPF_SkiaDeviceModule * CFPF_GetSkiaDeviceModule()
Definition
cfpf_skiadevicemodule.cpp:19
CFPF_SkiaDeviceModule
Definition
cfpf_skiadevicemodule.h:14
CFPF_SkiaDeviceModule::~CFPF_SkiaDeviceModule
~CFPF_SkiaDeviceModule()
CFPF_SkiaDeviceModule::Destroy
void Destroy()
Definition
cfpf_skiadevicemodule.cpp:29
CFPF_SkiaDeviceModule::GetFontMgr
CFPF_SkiaFontMgr * GetFontMgr()
Definition
cfpf_skiadevicemodule.cpp:34
CFPF_SkiaDeviceModule::m_pFontMgr
std::unique_ptr< CFPF_SkiaFontMgr > m_pFontMgr
Definition
cfpf_skiadevicemodule.h:23
CFPF_SkiaDeviceModule::CFPF_SkiaDeviceModule
CFPF_SkiaDeviceModule()
CFPF_SkiaFontMgr
Definition
cfpf_skiafontmgr.h:23
CFPF_SkiaFontMgr::InitFTLibrary
bool InitFTLibrary()
Definition
cfpf_skiafontmgr.cpp:224
CFPF_SkiaFontMgr::LoadFonts
void LoadFonts(const char **user_paths)
Definition
cfpf_skiafontmgr.cpp:239
CFPF_SkiaFontMgr::GetFontFace
RetainPtr< CFX_Face > GetFontFace(ByteStringView path, int32_t face_index)
Definition
cfpf_skiafontmgr.cpp:346
CFPF_SkiaFontMgr::CreateFont
CFPF_SkiaFont * CreateFont(ByteStringView family_name, FX_Charset charset, uint32_t style)
Definition
cfpf_skiafontmgr.cpp:258
CFPF_SkiaFontMgr::~CFPF_SkiaFontMgr
~CFPF_SkiaFontMgr()
CFPF_SkiaFontMgr::CFPF_SkiaFontMgr
CFPF_SkiaFontMgr()
CFPF_SkiaFont
Definition
cfpf_skiafont.h:22
CFPF_SkiaPathFont
Definition
cfpf_skiapathfont.h:14
fxcrt::RetainPtr
Definition
retain_ptr.h:28
FX_Charset
FX_Charset
Definition
fx_codepage.h:71
ScopedFXFTLibraryRec
std::unique_ptr< FXFT_LibraryRec, FXFTLibraryRecDeleter > ScopedFXFTLibraryRec
Definition
fx_freetype.h:40
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
ByteStringView
fxcrt::ByteStringView ByteStringView
Definition
string_view_template.h:325
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxge
android
cfpf_skiafontmgr.h
Generated on
for Qt by
1.18.0