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_
fxcrt::ByteString ByteString
Definition bytestring.h:180
bool operator!=(const CFX_TextRenderOptions &lhs, const CFX_TextRenderOptions &rhs)
bool operator==(const CFX_TextRenderOptions &lhs, const CFX_TextRenderOptions &rhs)
virtual int GetCharWidthF(uint32_t charcode)=0
virtual bool IsCIDFont() const
Definition cpdf_font.cpp:74
CFX_Font * GetFont()
Definition cpdf_font.h:128
virtual bool IsType3Font() const
Definition cpdf_font.cpp:70
CFX_Font * GetFontFallback(int position)
const Options & GetOptions() const
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)
uint32_t FX_ARGB
Definition fx_dib.h:36
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