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_skiafont.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/android/cfpf_skiafont.h"
8
9#include <algorithm>
10
11#include "core/fxcrt/fx_codepage.h"
12#include "core/fxcrt/fx_coordinates.h"
13#include "core/fxcrt/fx_system.h"
14#include "core/fxge/android/cfpf_skiafontmgr.h"
15#include "core/fxge/android/cfpf_skiapathfont.h"
16#include "core/fxge/fx_fontencoding.h"
17#include "third_party/base/numerics/safe_conversions.h"
18
20 const CFPF_SkiaPathFont* pFont,
21 FX_Charset uCharset)
25 m_uCharset(uCharset) {}
26
27CFPF_SkiaFont::~CFPF_SkiaFont() = default;
28
30 if (!m_Face)
31 return ByteString();
32 return m_Face->GetFamilyName();
33}
34
35uint32_t CFPF_SkiaFont::GetFontData(uint32_t dwTable,
36 pdfium::span<uint8_t> pBuffer) {
37 if (!m_Face)
38 return 0;
39
40 return pdfium::base::checked_cast<uint32_t>(
41 m_Face->GetSfntTable(dwTable, pBuffer));
42}
ByteString GetFamilyName()
CFPF_SkiaFont(CFPF_SkiaFontMgr *pFontMgr, const CFPF_SkiaPathFont *pFont, FX_Charset uCharset)
uint32_t GetFontData(uint32_t dwTable, pdfium::span< uint8_t > pBuffer)
FX_Charset
Definition fx_codepage.h:70