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
cfx_gemodule.cpp
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
#
include
"core/fxge/cfx_gemodule.h"
8
9
#
include
"core/fxcrt/check.h"
10
#
include
"core/fxge/cfx_folderfontinfo.h"
11
#
include
"core/fxge/cfx_fontcache.h"
12
#
include
"core/fxge/cfx_fontmgr.h"
13
14
namespace
{
15
16
CFX_GEModule
* g_pGEModule =
nullptr
;
17
18
}
// namespace
19
20
CFX_GEModule
::CFX_GEModule(
const
char
** pUserFontPaths)
21
: m_pPlatform(PlatformIface::Create()),
22
m_pFontMgr(std::make_unique<CFX_FontMgr>()),
23
m_pFontCache(std::make_unique<CFX_FontCache>()),
24
m_pUserFontPaths(pUserFontPaths) {}
25
26
CFX_GEModule
::~CFX_GEModule() =
default
;
27
28
// static
29
void
CFX_GEModule
::
Create
(
const
char
** pUserFontPaths) {
30
DCHECK
(!g_pGEModule);
31
g_pGEModule =
new
CFX_GEModule
(pUserFontPaths);
32
g_pGEModule->m_pPlatform->Init();
33
g_pGEModule
->
GetFontMgr
(
)
->
GetBuiltinMapper
(
)
->SetSystemFontInfo(
34
g_pGEModule->m_pPlatform->CreateDefaultSystemFontInfo());
35
}
36
37
// static
38
void
CFX_GEModule
::
Destroy
() {
39
DCHECK
(g_pGEModule);
40
delete
g_pGEModule;
41
g_pGEModule =
nullptr
;
42
}
43
44
// static
45
CFX_GEModule
*
CFX_GEModule
::
Get
() {
46
DCHECK
(g_pGEModule);
47
return
g_pGEModule;
48
}
DCHECK
#define DCHECK
Definition
check.h:33
CFX_FontMgr::GetBuiltinMapper
CFX_FontMapper * GetBuiltinMapper() const
Definition
cfx_fontmgr.h:72
CFX_GEModule
Definition
cfx_gemodule.h:25
CFX_GEModule::Get
static CFX_GEModule * Get()
Definition
cfx_gemodule.cpp:45
CFX_GEModule::Create
static void Create(const char **pUserFontPaths)
Definition
cfx_gemodule.cpp:29
CFX_GEModule::GetFontMgr
CFX_FontMgr * GetFontMgr() const
Definition
cfx_gemodule.h:45
CFX_GEModule::Destroy
static void Destroy()
Definition
cfx_gemodule.cpp:38
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxge
cfx_gemodule.cpp
Generated on
for Qt by
1.18.0