Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
20class CFPF_SkiaFont;
22
24 public:
27
28 void LoadSystemFonts();
29 CFPF_SkiaFont* CreateFont(ByteStringView bsFamilyname,
30 FX_Charset uCharset,
31 uint32_t dwStyle);
32
33 bool InitFTLibrary();
34 RetainPtr<CFX_Face> GetFontFace(ByteStringView bsFile, int32_t iFaceIndex);
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 m_bLoaded = false;
43 ScopedFXFTLibraryRec m_FTLibrary;
44 std::vector<std::unique_ptr<CFPF_SkiaPathFont>> m_FontFaces;
45 std::map<uint32_t, std::unique_ptr<CFPF_SkiaFont>> m_FamilyFonts;
46};
47
48#endif // CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_
CFPF_SkiaDeviceModule * CFPF_GetSkiaDeviceModule()
CFPF_SkiaFontMgr * GetFontMgr()
std::unique_ptr< CFPF_SkiaFontMgr > m_pFontMgr
RetainPtr< CFX_Face > GetFontFace(ByteStringView bsFile, int32_t iFaceIndex)
CFPF_SkiaFont * CreateFont(ByteStringView bsFamilyname, FX_Charset uCharset, uint32_t dwStyle)
FX_Charset
Definition fx_codepage.h:70