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);
77 if (!pDevice->DrawTextPath(
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);
87 if (!pDevice->DrawTextPath(
pdfium::make_span(pos).subspan(startIndex), font,
88 font_size, mtText2User, pUser2Device, pGraphState,
89 fill_argb, stroke_argb, pClippingPath,
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;
128 DrawNormalText(pDevice, codes, positions, pFont, font_size, new_matrix,
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);
157 if (!pDevice->DrawNormalText(
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);
166 if (!pDevice->DrawNormalText(
pdfium::make_span(pos).subspan(startIndex), font,
167 font_size, mtText2Device, fill_argb,
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)
AliasingType aliasing_type