52 pdfium::span<
const uint32_t> char_codes,
53 pdfium::span<
const float> char_pos,
63 std::vector<TextCharPos> pos =
64 GetCharPosList(char_codes, char_pos, pFont, font_size);
69 int32_t fontPosition = pos[0].m_FallbackFontPosition;
70 size_t startIndex = 0;
71 for (size_t i = 0; i < pos.size(); ++i) {
72 int32_t curFontPosition = pos[i].m_FallbackFontPosition;
73 if (fontPosition == curFontPosition)
76 CFX_Font* font = GetFont(pFont, fontPosition);
78 pdfium::make_span(pos).subspan(startIndex, i - startIndex)
, font
,
79 font_size
, mtText2User
, pUser2Device
, pGraphState
, fill_argb
,
80 stroke_argb
, pClippingPath
, fill_options
)) {
83 fontPosition = curFontPosition;
86 CFX_Font* font = GetFont(pFont, fontPosition);
88 font_size
, mtText2User
, pUser2Device
, pGraphState
,
89 fill_argb
, stroke_argb
, pClippingPath
,
103 const ByteString& str,
109 size_t nChars = pFont->CountChar(str.AsStringView());
114 std::vector<uint32_t> codes;
115 std::vector<
float> positions;
116 codes.resize(nChars);
117 positions.resize(nChars - 1);
119 for (size_t i = 0; i < nChars; i++) {
120 codes[i] = pFont->GetNextChar(str.AsStringView(), &offset);
122 positions[i - 1] = cur_pos;
126 new_matrix
.e = origin_x;
127 new_matrix
.f = origin_y;
134 pdfium::span<
const uint32_t> char_codes,
135 pdfium::span<
const float> char_pos,
141 std::vector<TextCharPos> pos =
142 GetCharPosList(char_codes, char_pos, pFont, font_size);
147 GetTextRenderOptionsHelper(pFont, options);
149 int32_t fontPosition = pos[0].m_FallbackFontPosition;
150 size_t startIndex = 0;
151 for (size_t i = 0; i < pos.size(); ++i) {
152 int32_t curFontPosition = pos[i].m_FallbackFontPosition;
153 if (fontPosition == curFontPosition)
156 CFX_Font* font = GetFont(pFont, fontPosition);
158 pdfium::make_span(pos).subspan(startIndex, i - startIndex)
, font
,
159 font_size
, mtText2Device
, fill_argb
, text_options
)) {
162 fontPosition = curFontPosition;
165 CFX_Font* font = GetFont(pFont, fontPosition);
167 font_size
, mtText2Device
, fill_argb
,
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)
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)
AliasingType aliasing_type