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
cfx_psfonttracker.h
Go to the documentation of this file.
1// Copyright 2021 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#ifndef CORE_FXGE_WIN32_CFX_PSFONTTRACKER_H_
6#define CORE_FXGE_WIN32_CFX_PSFONTTRACKER_H_
7
8#include <stdint.h>
9
10#include <functional>
11#include <set>
12
13#include "core/fxcrt/unowned_ptr.h"
14
15class CFX_Font;
16
18 public:
21
22 void AddFontObject(const CFX_Font* font);
23 bool SeenFontObject(const CFX_Font* font) const;
24
25 private:
26 // Tracks font objects via tags, so if two CFX_Font instances are for the same
27 // PDF object, then they are deduplicated.
28 std::set<uint64_t> seen_font_tags_;
29
30 // For fonts without valid tags, e.g. ones created in-memory, track them by
31 // pointer.
32 std::set<UnownedPtr<const CFX_Font>, std::less<>> seen_font_ptrs_;
33};
34
35#endif // CORE_FXGE_WIN32_CFX_PSFONTTRACKER_H_
TEST_F(CFX_WindowsRenderDeviceTest, SimpleClipTriangle)
bool SeenFontObject(const CFX_Font *font) const
void AddFontObject(const CFX_Font *font)
void AppendRect(float left, float bottom, float right, float top)
Definition cfx_path.cpp:309
void AppendLine(const CFX_PointF &pt1, const CFX_PointF &pt2)
Definition cfx_path.cpp:297
void ClosePath()
Definition cfx_path.cpp:269
std::unique_ptr< CFX_WindowsRenderDevice > m_driver
void SetUp() override
void TearDown() override
constexpr FX_RECT(int l, int t, int r, int b)