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_textrenderoptions.h
Go to the documentation of this file.
1// Copyright 2020 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_CFX_TEXTRENDEROPTIONS_H_
6#define CORE_FXGE_CFX_TEXTRENDEROPTIONS_H_
7
9 // AliasingType defines the options for drawing pixels on the edges of the
10 // text. The values are defined in an incrementing order due to the latter
11 // aliasing type's dependency on the previous one.
13 // No transparent pixels on glyph edges.
15
16 // May have transparent pixels on glyph edges.
18
19 // LCD optimization, can be enabled when anti-aliasing is allowed.
21 };
22
23 constexpr CFX_TextRenderOptions() = default;
24 constexpr explicit CFX_TextRenderOptions(AliasingType type)
25 : aliasing_type(type) {}
26 constexpr CFX_TextRenderOptions(const CFX_TextRenderOptions& other) = default;
28 default;
29
30 // Indicates whether anti-aliasing is enabled.
31 bool IsSmooth() const {
33 }
34
35 // Aliasing option for fonts.
37
38 // Font is CID font.
39 bool font_is_cid = false;
40
41 // Using the native text output available on some platforms.
42 bool native_text = true;
43};
44
45inline bool operator==(const CFX_TextRenderOptions& lhs,
46 const CFX_TextRenderOptions& rhs) {
47 return lhs.aliasing_type == rhs.aliasing_type &&
48 lhs.font_is_cid == rhs.font_is_cid &&
50}
51
52inline bool operator!=(const CFX_TextRenderOptions& lhs,
53 const CFX_TextRenderOptions& rhs) {
54 return !(lhs == rhs);
55}
56
57#endif // CORE_FXGE_CFX_TEXTRENDEROPTIONS_H_
bool operator!=(const CFX_TextRenderOptions &lhs, const CFX_TextRenderOptions &rhs)
bool operator==(const CFX_TextRenderOptions &lhs, const CFX_TextRenderOptions &rhs)
bool DrawTextPath(pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, float font_size, const CFX_Matrix &mtText2User, const CFX_Matrix *pUser2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, CFX_Path *pClippingPath, const CFX_FillRenderOptions &fill_options)
bool DrawNormalText(pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, float font_size, const CFX_Matrix &mtText2Device, uint32_t fill_color, const CFX_TextRenderOptions &options)
virtual int GetCharWidthF(uint32_t charcode)=0
virtual bool IsCIDFont() const
Definition cpdf_font.cpp:75
CFX_Font * GetFont()
Definition cpdf_font.h:130
virtual bool IsType3Font() const
Definition cpdf_font.cpp:71
CFX_Font * GetFontFallback(int position)
const Options & GetOptions() const
static bool DrawTextPath(CFX_RenderDevice *pDevice, pdfium::span< const uint32_t > char_codes, pdfium::span< const float > char_pos, CPDF_Font *pFont, float font_size, const CFX_Matrix &mtText2User, const CFX_Matrix *pUser2Device, const CFX_GraphStateData *pGraphState, FX_ARGB fill_argb, FX_ARGB stroke_argb, CFX_Path *pClippingPath, const CFX_FillRenderOptions &fill_options)
static void DrawTextString(CFX_RenderDevice *pDevice, float origin_x, float origin_y, CPDF_Font *pFont, float font_size, const CFX_Matrix &matrix, const ByteString &str, FX_ARGB fill_argb, const CPDF_RenderOptions &options)
static bool DrawNormalText(CFX_RenderDevice *pDevice, pdfium::span< const uint32_t > char_codes, pdfium::span< const float > char_pos, CPDF_Font *pFont, float font_size, const CFX_Matrix &mtText2Device, FX_ARGB fill_argb, const CPDF_RenderOptions &options)
constexpr CFX_TextRenderOptions()=default
CFX_TextRenderOptions & operator=(const CFX_TextRenderOptions &other)=default
constexpr CFX_TextRenderOptions(AliasingType type)
constexpr CFX_TextRenderOptions(const CFX_TextRenderOptions &other)=default