7#include "core/fxge/win32/cfx_psrenderer.h"
18#include "core/fxcrt/bytestring.h"
19#include "core/fxcrt/fx_extension.h"
20#include "core/fxcrt/fx_memory.h"
21#include "core/fxcrt/fx_memory_wrappers.h"
22#include "core/fxcrt/fx_safe_types.h"
23#include "core/fxcrt/fx_stream.h"
24#include "core/fxcrt/span_util.h"
25#include "core/fxge/cfx_fillrenderoptions.h"
26#include "core/fxge/cfx_font.h"
27#include "core/fxge/cfx_fontcache.h"
28#include "core/fxge/cfx_gemodule.h"
29#include "core/fxge/cfx_glyphcache.h"
30#include "core/fxge/cfx_path.h"
31#include "core/fxge/cfx_renderdevice.h"
32#include "core/fxge/dib/cfx_dibbase.h"
33#include "core/fxge/dib/cfx_dibitmap.h"
34#include "core/fxge/dib/fx_dib.h"
35#include "core/fxge/text_char_pos.h"
36#include "core/fxge/win32/cfx_psfonttracker.h"
37#include "third_party/base/check_op.h"
38#include "third_party/base/numerics/safe_conversions.h"
42absl::optional<ByteString> GenerateType42SfntData(
43 const ByteString& psname,
44 pdfium::span<
const uint8_t> font_data) {
45 if (font_data.empty())
49 constexpr size_t kMaxSfntStringSize = 65535;
50 if (font_data.size() > kMaxSfntStringSize) {
56 constexpr size_t kMaxBytesPerLine = 32;
57 fxcrt::ostringstream output;
58 output <<
"/" << psname <<
"_sfnts [\n<\n";
59 size_t bytes_per_line = 0;
61 for (uint8_t datum : font_data) {
62 FXSYS_IntToTwoHexChars(datum, buf);
66 if (bytes_per_line == kMaxBytesPerLine) {
76 output <<
"\n>\n] def\n";
77 return ByteString(output);
84constexpr size_t kGlyphsPerDescendantFont = 256;
86ByteString GenerateType42FontDictionary(
const ByteString& psname,
89 size_t glyphs_per_descendant_font) {
90 DCHECK_LE(glyphs_per_descendant_font, kGlyphsPerDescendantFont);
91 CHECK_GT(glyphs_per_descendant_font, 0u);
93 const size_t descendant_font_count =
94 (num_glyphs + glyphs_per_descendant_font - 1) /
95 glyphs_per_descendant_font;
97 fxcrt::ostringstream output;
98 for (size_t i = 0; i < descendant_font_count; ++i) {
99 output <<
"8 dict begin\n";
100 output <<
"/FontType 42 def\n";
101 output <<
"/FontMatrix [1 0 0 1 0 0] def\n";
102 output <<
"/FontName /" << psname <<
"_" << i <<
" def\n";
104 output <<
"/Encoding " << glyphs_per_descendant_font <<
" array\n";
105 for (size_t j = 0, pos = i * glyphs_per_descendant_font;
106 j < glyphs_per_descendant_font; ++j, ++pos) {
107 if (pos >= num_glyphs)
110 output << ByteString::Format(
"dup %d /c%02x put\n", j, j);
112 output <<
"readonly def\n";
116 output <<
"/FontBBox [" << bbox
.left <<
" " << bbox
.top <<
" " << bbox
.right
117 <<
" " << bbox
.bottom <<
"] def\n";
119 output <<
"/PaintType 0 def\n";
121 output <<
"/CharStrings " << glyphs_per_descendant_font + 1
122 <<
" dict dup begin\n";
123 output <<
"/.notdef 0 def\n";
124 for (size_t j = 0, pos = i * glyphs_per_descendant_font;
125 j < glyphs_per_descendant_font; ++j, ++pos) {
126 if (pos >= num_glyphs)
129 output << ByteString::Format(
"/c%02x %d def\n", j, pos);
131 output <<
"end readonly def\n";
133 output <<
"/sfnts " << psname <<
"_sfnts def\n";
134 output <<
"FontName currentdict end definefont pop\n";
137 output <<
"6 dict begin\n";
138 output <<
"/FontName /" << psname <<
" def\n";
139 output <<
"/FontType 0 def\n";
140 output <<
"/FontMatrix [1 0 0 1 0 0] def\n";
141 output <<
"/FMapType 2 def\n";
143 output <<
"/Encoding [\n";
144 for (size_t i = 0; i < descendant_font_count; ++i)
148 output <<
"/FDepVector [\n";
149 for (size_t i = 0; i < descendant_font_count; ++i)
150 output <<
"/" << psname <<
"_" << i <<
" findfont\n";
153 output <<
"FontName currentdict end definefont pop\n";
154 output <<
"%%EndResource\n";
156 return ByteString(output);
159ByteString GenerateType42FontData(
const CFX_Font* font) {
160 RetainPtr<
const CFX_Face> face = font->GetFace();
165 int num_glyphs = face->GetGlyphCount();
166 if (num_glyphs < 0) {
171 DCHECK(!psname.IsEmpty());
173 absl::optional<ByteString> sfnt_data =
174 GenerateType42SfntData(psname, font->GetFontSpan());
175 if (!sfnt_data.has_value())
178 ByteString output =
"%%BeginResource: font ";
181 output += sfnt_data.value();
182 output += GenerateType42FontDictionary(psname, font->GetRawBBox().value(),
183 num_glyphs, kGlyphsPerDescendantFont);
204 FaxCompressResult&&)
noexcept =
default;
207 FaxCompressResult&&)
noexcept =
default;
214 PSCompressResult&&)
noexcept =
default;
217 PSCompressResult&&)
noexcept =
default;
224 DCHECK(m_pFontTracker);
249 static const char kInitStr[] =
250 "\nsave\n/im/initmatrix load def\n"
251 "/n/newpath load def/m/moveto load def/l/lineto load def/c/curveto load "
252 "def/h/closepath load def\n"
253 "/f/fill load def/F/eofill load def/s/stroke load def/W/clip load "
254 "def/W*/eoclip load def\n"
255 "/rg/setrgbcolor load def/k/setcmykcolor load def\n"
256 "/J/setlinecap load def/j/setlinejoin load def/w/setlinewidth load "
257 "def/M/setmiterlimit load def/d/setdash load def\n"
258 "/q/gsave load def/Q/grestore load def/iM/imagemask load def\n"
259 "/Tj/show load def/Ff/findfont load def/Fs/scalefont load def/Sf/setfont "
261 "/cm/concat load def/Cm/currentmatrix load def/mx/matrix load "
262 "def/sm/setmatrix load def\n";
263 WriteString(kInitStr);
271 WriteString(
"\nrestore\n");
275 std::streamoff preamble_pos = m_PreambleOutput.tellp();
276 if (preamble_pos > 0) {
277 m_pStream->WriteBlock(
278 {
reinterpret_cast<
const uint8_t*>(m_PreambleOutput.str().c_str()),
279 pdfium::base::checked_cast<size_t>(preamble_pos)});
280 m_PreambleOutput.str(
"");
284 m_pStream->WriteBlock(
285 {
reinterpret_cast<
const uint8_t*>(m_Output.str().c_str()),
286 pdfium::base::checked_cast<size_t>(std::streamoff(m_Output.tellp()))});
293 m_ClipBoxStack.push_back(m_ClipBox);
303 m_bGraphStateSet =
false;
304 if (m_ClipBoxStack.empty())
307 m_ClipBox = m_ClipBoxStack.back();
309 m_ClipBoxStack.pop_back();
314 fxcrt::ostringstream buf;
315 size_t size = path.GetPoints().size();
317 for (size_t i = 0; i < size; i++) {
319 bool closing = path.IsClosingFigure(i);
320 CFX_PointF pos = path.GetPoint(i);
324 buf << pos.x <<
" " << pos.y;
335 CFX_PointF pos1 = path.GetPoint(i + 1);
336 CFX_PointF pos2 = path.GetPoint(i + 2);
337 if (pObject2Device) {
341 buf <<
" " << pos1.x <<
" " << pos1.y <<
" " << pos2.x <<
" " << pos2.y
359 OutputPath(path, pObject2Device);
379 SetGraphState(pGraphState);
381 fxcrt::ostringstream buf;
382 buf <<
"mx Cm [" << pObject2Device
->a <<
" " << pObject2Device
->b <<
" "
383 << pObject2Device
->c <<
" " << pObject2Device
->d <<
" "
384 << pObject2Device
->e <<
" " << pObject2Device
->f <<
"]cm ";
387 OutputPath(path,
nullptr);
392 WriteString(
"strokepath W n sm\n");
399 uint32_t stroke_color,
402 int fill_alpha =
FXARGB_A(fill_color);
403 int stroke_alpha =
FXARGB_A(stroke_color);
404 if (fill_alpha && fill_alpha < 255)
406 if (stroke_alpha && stroke_alpha < 255)
408 if (fill_alpha == 0 && stroke_alpha == 0)
412 SetGraphState(pGraphState);
413 if (pObject2Device) {
414 fxcrt::ostringstream buf;
415 buf <<
"mx Cm [" << pObject2Device
->a <<
" " << pObject2Device
->b <<
" "
416 << pObject2Device
->c <<
" " << pObject2Device
->d <<
" "
417 << pObject2Device
->e <<
" " << pObject2Device
->f <<
"]cm ";
422 OutputPath(path, stroke_alpha ?
nullptr : pObject2Device);
425 SetColor(fill_color);
428 WriteString(
"q f Q ");
434 WriteString(
"q F Q ");
441 SetColor(stroke_color);
452 fxcrt::ostringstream buf;
453 if (!m_bGraphStateSet ||
454 m_CurGraphState.m_LineCap != pGraphState->m_LineCap) {
455 buf <<
static_cast<
int>(pGraphState
->m_LineCap) <<
" J\n";
457 if (!m_bGraphStateSet ||
458 m_CurGraphState.m_DashArray != pGraphState->m_DashArray) {
460 for (
const auto& dash : pGraphState->m_DashArray)
464 if (!m_bGraphStateSet ||
465 m_CurGraphState.m_LineJoin != pGraphState->m_LineJoin) {
466 buf <<
static_cast<
int>(pGraphState
->m_LineJoin) <<
" j\n";
468 if (!m_bGraphStateSet ||
469 m_CurGraphState.m_LineWidth != pGraphState->m_LineWidth) {
472 if (!m_bGraphStateSet ||
473 m_CurGraphState.m_MiterLimit != pGraphState->m_MiterLimit) {
476 m_CurGraphState = *pGraphState;
477 m_bGraphStateSet =
true;
486 CFX_Matrix matrix = CFX_RenderDevice::GetFlipMatrix(
487 pSource->GetWidth(), pSource->GetHeight(), left, top);
500 dest_left
, dest_top
);
509 if ((matrix
.a == 0 && matrix
.b == 0) || (matrix
.c == 0 && matrix
.d == 0))
512 if (bitmap->IsAlphaFormat()) {
517 if (bitmap->IsMaskFormat() && (alpha < 255 || bitmap->GetBPP() != 1)) {
523 fxcrt::ostringstream buf;
524 buf <<
"[" << matrix
.a <<
" " << matrix
.b <<
" " << matrix
.c <<
" "
525 << matrix
.d <<
" " << matrix
.e <<
" " << matrix
.f <<
"]cm ";
527 const int width = bitmap->GetWidth();
528 const int height = bitmap->GetHeight();
529 buf << width <<
" " << height;
531 if (bitmap->GetBPP() == 1 && !bitmap->HasPalette()) {
532 FaxCompressResult compress_result = FaxCompressData(bitmap);
533 if (compress_result.data.empty())
536 if (bitmap->IsMaskFormat()) {
543 buf << width <<
" 0 0 -" << height <<
" 0 " << height
544 <<
"]currentfile/ASCII85Decode filter ";
546 if (compress_result.compressed) {
547 buf <<
"<</K -1/EndOfBlock false/Columns " << width <<
"/Rows " << height
548 <<
">>/CCITTFaxDecode filter ";
550 if (bitmap->IsMaskFormat()) {
553 buf <<
"false 1 colorimage\n";
557 WritePSBinary(compress_result.data);
559 switch (bitmap->GetFormat()) {
565 if (bitmap->HasPalette()) {
573 WriteString(
"\nQ\n");
577 int bpp = bitmap->GetBPP() / 8;
578 uint8_t* output_buf =
nullptr;
579 size_t output_size = 0;
580 bool output_buf_is_owned =
true;
581 absl::optional<PSCompressResult> compress_result;
583 if ((m_Level.value() == RenderingLevel::kLevel2 || options.bLossy) &&
584 m_pEncoderIface->pJpegEncodeFunc(bitmap, &output_buf, &output_size)) {
585 filter
= "/DCTDecode filter ";
587 int src_pitch = width * bpp;
588 output_size = height * src_pitch;
589 output_buf = FX_Alloc(uint8_t, output_size);
590 for (
int row = 0; row < height; row++) {
591 const uint8_t* src_scan = bitmap->GetScanline(row).data();
592 uint8_t* dest_scan = output_buf + row * src_pitch;
594 for (
int col = 0; col < width; col++) {
595 *dest_scan++ = src_scan[2];
596 *dest_scan++ = src_scan[1];
597 *dest_scan++ = *src_scan;
601 memcpy(dest_scan, src_scan, src_pitch);
604 compress_result = PSCompressData({output_buf, output_size});
605 if (compress_result.has_value()) {
607 output_buf_is_owned =
false;
608 output_buf = compress_result.value().data.data();
609 output_size = compress_result.value().data.size();
610 filter = compress_result.value().filter;
614 buf << width <<
" 0 0 -" << height <<
" 0 " << height <<
"]";
615 buf <<
"currentfile/ASCII85Decode filter ";
619 buf <<
"false " << bpp;
620 buf <<
" colorimage\n";
623 WritePSBinary({output_buf, output_size});
624 if (output_buf_is_owned)
627 WriteString(
"\nQ\n");
632 if (m_bColorSet && m_LastColor == color)
635 fxcrt::ostringstream buf;
637 <<
FXARGB_B(color) / 255.0 <<
" rg\n";
647 int* ps_glyphindex) {
648 for (size_t i = 0; i < m_PSFontList.size(); ++i) {
649 const Glyph& glyph = *m_PSFontList[i];
653 if (glyph.adjust_matrix.has_value()) {
654 constexpr float kEpsilon = 0.01f;
655 const auto& adjust_matrix = glyph.adjust_matrix.value();
656 found = fabs(adjust_matrix[0] - charpos
.m_AdjustMatrix[0]) < kEpsilon &&
664 *ps_fontnum = pdfium::base::checked_cast<
int>(i / 256);
665 *ps_glyphindex = i % 256;
671 m_PSFontList.push_back(std::make_unique<Glyph>(pFont, charpos.m_GlyphIndex));
673 pdfium::base::checked_cast<
int>((m_PSFontList.size() - 1) / 256);
674 *ps_glyphindex = (m_PSFontList.size() - 1) % 256;
675 if (*ps_glyphindex == 0) {
676 fxcrt::ostringstream buf;
677 buf <<
"8 dict begin/FontType 3 def/FontMatrix[1 0 0 1 0 0]def\n"
678 "/FontBBox[0 0 0 0]def/Encoding 256 array def 0 1 255{Encoding "
679 "exch/.notdef put}for\n"
680 "/CharProcs 1 dict def CharProcs begin/.notdef {} def end\n"
681 "/BuildGlyph{1 0 -10 -10 10 10 setcachedevice exch/CharProcs get "
682 "exch 2 copy known not{pop/.notdef}if get exec}bind def\n"
683 "/BuildChar{1 index/Encoding get exch get 1 index/BuildGlyph get "
686 buf <<
"/X" << *ps_fontnum <<
" exch definefont pop\n";
691 m_PSFontList.back()->adjust_matrix = std::array<
float, 4>{
692 charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1],
693 charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3]};
711 fxcrt::ostringstream buf;
712 buf <<
"/X" << *ps_fontnum <<
" Ff/CharProcs get begin/" << *ps_glyphindex
714 for (size_t p = 0; p < TransformedPath.GetPoints().size(); p++) {
715 CFX_PointF point = TransformedPath.GetPoint(p);
716 switch (TransformedPath.GetType(p)) {
718 buf << point.x <<
" " << point.y <<
" m\n";
722 buf << point.x <<
" " << point.y <<
" l\n";
726 CFX_PointF point1 = TransformedPath.GetPoint(p + 1);
727 CFX_PointF point2 = TransformedPath.GetPoint(p + 2);
728 buf << point.x <<
" " << point.y <<
" " << point1.x <<
" " << point1.y
729 <<
" " << point2.x <<
" " << point2.y <<
" c\n";
735 buf <<
"f}bind def end\n";
736 buf <<
"/X" << *ps_fontnum <<
" Ff/Encoding get " << *ps_glyphindex <<
"/"
737 << *ps_glyphindex <<
" put\n";
745 fxcrt::ostringstream& buf) {
747 RetainPtr<CFX_GlyphCache> pGlyphCache = pCache->GetGlyphCache(font);
748 int last_fontnum = -1;
749 for (
int i = 0; i < char_count; i++) {
752 FindPSFontGlyph(pGlyphCache.Get(), font, char_pos[i], &ps_fontnum,
754 if (last_fontnum != ps_fontnum) {
755 buf <<
"/X" << ps_fontnum <<
" Ff " << font_size <<
" Fs Sf ";
756 last_fontnum = ps_fontnum;
758 buf << char_pos[i].m_Origin.x <<
" " << char_pos[i].m_Origin.y <<
" m";
759 ByteString hex = ByteString
::Format("<%02X>", ps_glyphindex
);
760 buf << hex.AsStringView() <<
"Tj\n";
768 fxcrt::ostringstream& buf) {
769 if (m_Level != RenderingLevel::kLevel3Type42) {
773 RetainPtr<CFX_Face> face = font->GetFace();
774 if (!face || !face->CanEmbed()) {
781 bool is_existing_font = m_pFontTracker->SeenFontObject(font);
782 if (!is_existing_font) {
783 ByteString font_data = GenerateType42FontData(font);
787 m_pFontTracker->AddFontObject(font);
788 WritePreambleString(font_data.AsStringView());
791 buf <<
"/" << font
->GetPsName() <<
" " << font_size <<
" selectfont\n";
792 for (
int i = 0; i < char_count; ++i) {
793 buf << char_pos[i].m_Origin.x <<
" " << char_pos[i].m_Origin.y <<
" m";
796 ByteString hex = ByteString
::Format("<%02X%02X>", hi
, lo
);
797 buf << hex.AsStringView() <<
"Tj\n";
809 if ((mtObject2Device
.a == 0 && mtObject2Device
.b == 0) ||
810 (mtObject2Device
.c == 0 && mtObject2Device
.d == 0)) {
817 static constexpr float kEpsilon = 0.01f;
818 if (fabsf(font_size * scale) < kEpsilon)
827 fxcrt::ostringstream buf;
828 buf <<
"q[" << mtObject2Device
.a <<
" " << mtObject2Device
.b <<
" "
829 << mtObject2Device
.c <<
" " << mtObject2Device
.d <<
" "
830 << mtObject2Device
.e <<
" " << mtObject2Device
.f <<
"]cm\n";
832 if (!DrawTextAsType42Font(nChars, pCharPos, pFont, font_size, buf)) {
833 DrawTextAsType3Font(nChars, pCharPos, pFont, font_size, buf);
843 DCHECK_EQ(1, src->GetBPP());
845 FaxCompressResult result;
846 const int width = src->GetWidth();
847 const int height = src->GetHeight();
848 const int pitch = src->GetPitch();
849 DCHECK_GE(width, pitch);
851 FX_SAFE_UINT32 safe_pixel_count = width;
852 safe_pixel_count *= height;
853 if (!safe_pixel_count.IsValid())
856 if (safe_pixel_count.ValueOrDie() > 128) {
857 result.data = m_pEncoderIface->pFaxEncodeFunc(std::move(src));
858 result.compressed =
true;
862 FX_SAFE_UINT32 safe_size = pitch;
864 result.data.resize(safe_size.ValueOrDie());
865 auto dest_span = pdfium::make_span(result.data);
866 for (
int row = 0; row < height; row++) {
867 pdfium::span<
const uint8_t> src_scan = src->GetScanline(row);
868 fxcrt::spancpy(dest_span.subspan(row * pitch, pitch), src_scan);
873absl::optional<CFX_PSRenderer::PSCompressResult>
CFX_PSRenderer::PSCompressData(
874 pdfium::span<
const uint8_t> src_span)
const {
875 if (src_span.size() < 1024)
876 return absl::nullopt;
878 DataVector<uint8_t> (*encode_func)(pdfium::span<
const uint8_t> src_span);
880 if (m_Level.value() == RenderingLevel::kLevel3 ||
881 m_Level.value() == RenderingLevel::kLevel3Type42) {
882 encode_func = m_pEncoderIface->pFlateEncodeFunc;
883 filter
= "/FlateDecode filter ";
885 encode_func = m_pEncoderIface->pRunLengthEncodeFunc;
886 filter
= "/RunLengthDecode filter ";
889 DataVector<uint8_t> decode_result = encode_func(src_span);
890 if (decode_result.size() == 0 || decode_result.size() >= src_span.size())
891 return absl::nullopt;
893 PSCompressResult result;
894 result.data =
std::move(decode_result);
895 result.filter = filter;
900 m_PreambleOutput << str;
903void CFX_PSRenderer::WritePSBinary(pdfium::span<
const uint8_t> data) {
904 DataVector<uint8_t> encoded_data = m_pEncoderIface->pA85EncodeFunc(data);
905 pdfium::span<
const uint8_t> result =
906 encoded_data.empty() ? data : encoded_data;
907 auto chars =
fxcrt::reinterpret_span<
const char>(result);
908 m_Output.write(chars.data(), chars.size());
912 std::streamoff output_pos = stream.tellp();
913 if (output_pos > 0) {
914 m_Output.write(stream.str().c_str(),
915 pdfium::base::checked_cast<size_t>(output_pos));
925 const ByteString& psname,
926 pdfium::span<
const uint8_t> font_data) {
927 return GenerateType42SfntData(psname, font_data);
932 const ByteString& psname,
935 size_t glyphs_per_descendant_font) {
936 return GenerateType42FontDictionary(psname, bbox, num_glyphs,
937 glyphs_per_descendant_font);
CFX_FloatRect & operator=(const CFX_FloatRect &that)=default
FX_RECT GetOuterRect() const
ByteString GetPsName() const
FontType GetFontType() const
static CFX_GEModule * Get()
CFX_FontCache * GetFontCache() const
const CFX_Path * LoadGlyphPath(const CFX_Font *pFont, uint32_t glyph_index, int dest_width)
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_FloatRect TransformRect(const CFX_FloatRect &rect) const
CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
CFX_PointF Transform(const CFX_PointF &point) const
bool DrawDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options)
void SetClip_PathStroke(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState)
bool StretchDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FXDIB_ResampleOptions &options)
bool DrawText(int nChars, const TextCharPos *pCharPos, CFX_Font *pFont, const CFX_Matrix &mtObject2Device, float font_size, uint32_t color)
CFX_PSRenderer(CFX_PSFontTracker *font_tracker, const EncoderIface *encoder_iface)
void SetClip_PathFill(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options)
void Init(const RetainPtr< IFX_RetainableWriteStream > &stream, RenderingLevel level, int width, int height)
bool DrawPath(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options)
void RestoreState(bool bKeepSaved)
bool SetDIBits(const RetainPtr< const CFX_DIBBase > &pBitmap, uint32_t color, int dest_left, int dest_top)
CFX_FloatRect GetBoundingBox() const
void Transform(const CFX_Matrix &matrix)
CFX_FloatRect GetBoundingBoxForStrokePath(float line_width, float miter_limit) const
CFX_Path(const CFX_Path &src)
static CFX_Matrix GetFlipMatrix(float width, float height, float left, float top)
static ByteString Format(const char *pFormat,...)
ByteString & operator+=(const ByteString &str)
ByteString & operator+=(const char *str)
ByteString & operator=(const char *str)
Glyph(CFX_Font *font, uint32_t glyph_index)
UnownedPtr< CFX_Font > const font
Glyph & operator=(const Glyph &)=delete
absl::optional< std::array< float, 4 > > adjust_matrix
const uint32_t glyph_index
Glyph(const Glyph &other)=delete
void Intersect(const FX_RECT &src)