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_fontcache.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_fontcache.h"
8
9
#
include
"core/fxge/cfx_font.h"
10
#
include
"core/fxge/cfx_glyphcache.h"
11
#
include
"core/fxge/fx_font.h"
12
13
CFX_FontCache
::
CFX_FontCache
() =
default
;
14
15
CFX_FontCache
::~
CFX_FontCache
() =
default
;
16
17
RetainPtr
<CFX_GlyphCache>
CFX_FontCache
::
GetGlyphCache
(
const
CFX_Font
* pFont) {
18
RetainPtr
<CFX_Face> face = pFont->GetFace();
19
const
bool
bExternal = !face;
20
auto
& map = bExternal ? m_ExtGlyphCacheMap : m_GlyphCacheMap;
21
auto
it = map.find(face.Get());
22
if
(it != map.end() && it->second)
23
return
pdfium
::WrapRetain(it->second.Get());
24
25
auto
new_cache =
pdfium
::MakeRetain<CFX_GlyphCache>(face);
26
map[face.Get()].Reset(new_cache.Get());
27
return
new_cache;
28
}
29
30
#
if
defined
(
PDF_USE_SKIA
)
31
CFX_TypeFace* CFX_FontCache::GetDeviceCache(
const
CFX_Font* pFont) {
32
return
GetGlyphCache(pFont)->GetDeviceCache(pFont);
33
}
34
#
endif
CFX_FontCache
Definition
cfx_fontcache.h:18
CFX_FontCache::GetGlyphCache
RetainPtr< CFX_GlyphCache > GetGlyphCache(const CFX_Font *pFont)
Definition
cfx_fontcache.cpp:17
CFX_FontCache::~CFX_FontCache
~CFX_FontCache()
CFX_FontCache::CFX_FontCache
CFX_FontCache()
CFX_Font
Definition
cfx_font.h:38
fxcrt::RetainPtr
Definition
retain_ptr.h:28
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxge
cfx_fontcache.cpp
Generated on
for Qt by
1.18.0