7#include "core/fxge/win32/cfx_psrenderer.h"
17#include "core/fxcrt/bytestring.h"
18#include "core/fxcrt/check_op.h"
19#include "core/fxcrt/compiler_specific.h"
20#include "core/fxcrt/fx_extension.h"
21#include "core/fxcrt/fx_memcpy_wrappers.h"
22#include "core/fxcrt/fx_memory.h"
23#include "core/fxcrt/fx_safe_types.h"
24#include "core/fxcrt/fx_stream.h"
25#include "core/fxcrt/notreached.h"
26#include "core/fxcrt/numerics/safe_conversions.h"
27#include "core/fxcrt/span.h"
28#include "core/fxcrt/stl_util.h"
29#include "core/fxge/cfx_fillrenderoptions.h"
30#include "core/fxge/cfx_font.h"
31#include "core/fxge/cfx_fontcache.h"
32#include "core/fxge/cfx_gemodule.h"
33#include "core/fxge/cfx_glyphcache.h"
34#include "core/fxge/cfx_path.h"
35#include "core/fxge/cfx_renderdevice.h"
36#include "core/fxge/dib/cfx_dibbase.h"
37#include "core/fxge/dib/cfx_dibitmap.h"
38#include "core/fxge/dib/fx_dib.h"
39#include "core/fxge/text_char_pos.h"
40#include "core/fxge/win32/cfx_psfonttracker.h"
46 pdfium::span<
const uint8_t> font_data) {
47 if (font_data.empty())
51 constexpr size_t kMaxSfntStringSize = 65535;
52 if (font_data.size() > kMaxSfntStringSize) {
58 constexpr size_t kMaxBytesPerLine = 32;
59 fxcrt::ostringstream output;
60 output <<
"/" << psname <<
"_sfnts [\n<\n";
61 size_t bytes_per_line = 0;
63 for (uint8_t datum : font_data) {
64 FXSYS_IntToTwoHexChars(datum, buf);
68 if (bytes_per_line == kMaxBytesPerLine) {
78 output <<
"\n>\n] def\n";
86constexpr size_t kGlyphsPerDescendantFont = 256;
91 size_t glyphs_per_descendant_font) {
92 DCHECK_LE(glyphs_per_descendant_font, kGlyphsPerDescendantFont);
93 CHECK_GT(glyphs_per_descendant_font, 0u);
95 const size_t descendant_font_count =
96 (num_glyphs + glyphs_per_descendant_font - 1) /
97 glyphs_per_descendant_font;
99 fxcrt::ostringstream output;
100 for (size_t i = 0; i < descendant_font_count; ++i) {
101 output <<
"8 dict begin\n";
102 output <<
"/FontType 42 def\n";
103 output <<
"/FontMatrix [1 0 0 1 0 0] def\n";
104 output <<
"/FontName /" << psname <<
"_" << i <<
" def\n";
106 output <<
"/Encoding " << glyphs_per_descendant_font <<
" array\n";
107 for (size_t j = 0, pos = i * glyphs_per_descendant_font;
108 j < glyphs_per_descendant_font; ++j, ++pos) {
109 if (pos >= num_glyphs)
112 output << ByteString::Format(
"dup %d /c%02x put\n", j, j);
114 output <<
"readonly def\n";
118 output <<
"/FontBBox [" << bbox
.left <<
" " << bbox
.top <<
" " << bbox
.right
119 <<
" " << bbox
.bottom <<
"] def\n";
121 output <<
"/PaintType 0 def\n";
123 output <<
"/CharStrings " << glyphs_per_descendant_font + 1
124 <<
" dict dup begin\n";
125 output <<
"/.notdef 0 def\n";
126 for (size_t j = 0, pos = i * glyphs_per_descendant_font;
127 j < glyphs_per_descendant_font; ++j, ++pos) {
128 if (pos >= num_glyphs)
131 output << ByteString::Format(
"/c%02x %d def\n", j, pos);
133 output <<
"end readonly def\n";
135 output <<
"/sfnts " << psname <<
"_sfnts def\n";
136 output <<
"FontName currentdict end definefont pop\n";
139 output <<
"6 dict begin\n";
140 output <<
"/FontName /" << psname <<
" def\n";
141 output <<
"/FontType 0 def\n";
142 output <<
"/FontMatrix [1 0 0 1 0 0] def\n";
143 output <<
"/FMapType 2 def\n";
145 output <<
"/Encoding [\n";
146 for (size_t i = 0; i < descendant_font_count; ++i)
150 output <<
"/FDepVector [\n";
151 for (size_t i = 0; i < descendant_font_count; ++i)
152 output <<
"/" << psname <<
"_" << i <<
" findfont\n";
155 output <<
"FontName currentdict end definefont pop\n";
156 output <<
"%%EndResource\n";
162 RetainPtr<
const CFX_Face> face = font->GetFace();
167 int num_glyphs = face->GetGlyphCount();
168 if (num_glyphs < 0) {
173 DCHECK(!psname.IsEmpty());
176 GenerateType42SfntData(psname, font->GetFontSpan());
177 if (!sfnt_data.has_value())
183 output += sfnt_data.value();
184 output += GenerateType42FontDictionary(psname, font->GetRawBBox().value(),
185 num_glyphs, kGlyphsPerDescendantFont);
206 FaxCompressResult&&)
noexcept =
default;
209 FaxCompressResult&&)
noexcept =
default;
216 PSCompressResult&&)
noexcept =
default;
219 PSCompressResult&&)
noexcept =
default;
251 static const char kInitStr[] =
252 "\nsave\n/im/initmatrix load def\n"
253 "/n/newpath load def/m/moveto load def/l/lineto load def/c/curveto load "
254 "def/h/closepath load def\n"
255 "/f/fill load def/F/eofill load def/s/stroke load def/W/clip load "
256 "def/W*/eoclip load def\n"
257 "/rg/setrgbcolor load def/k/setcmykcolor load def\n"
258 "/J/setlinecap load def/j/setlinejoin load def/w/setlinewidth load "
259 "def/M/setmiterlimit load def/d/setdash load def\n"
260 "/q/gsave load def/Q/grestore load def/iM/imagemask load def\n"
261 "/Tj/show load def/Ff/findfont load def/Fs/scalefont load def/Sf/setfont "
263 "/cm/concat load def/Cm/currentmatrix load def/mx/matrix load "
264 "def/sm/setmatrix load def\n";
265 WriteString(kInitStr);
273 WriteString(
"\nrestore\n");
277 std::streamoff preamble_pos = m_PreambleOutput.tellp();
278 if (preamble_pos > 0) {
279 m_pStream->WriteBlock(
280 pdfium::as_byte_span(m_PreambleOutput.str())
281 .first(pdfium::checked_cast<size_t>(preamble_pos)));
282 m_PreambleOutput.str(
"");
286 m_pStream->WriteBlock(pdfium::as_byte_span(m_Output.str())
287 .first(pdfium::checked_cast<size_t>(
288 std::streamoff(m_Output.tellp()))));
295 m_ClipBoxStack.push_back(m_ClipBox);
305 m_bGraphStateSet =
false;
306 if (m_ClipBoxStack.empty())
309 m_ClipBox = m_ClipBoxStack.back();
311 m_ClipBoxStack.pop_back();
316 fxcrt::ostringstream buf;
317 size_t size = path.GetPoints().size();
319 for (size_t i = 0; i < size; i++) {
321 bool closing = path.IsClosingFigure(i);
326 buf << pos.x <<
" " << pos.y;
339 if (pObject2Device) {
343 buf <<
" " << pos1.x <<
" " << pos1.y <<
" " << pos2.x <<
" " << pos2.y
361 OutputPath(path, pObject2Device);
381 SetGraphState(pGraphState);
383 fxcrt::ostringstream buf;
384 buf <<
"mx Cm [" << pObject2Device
->a <<
" " << pObject2Device
->b <<
" "
385 << pObject2Device
->c <<
" " << pObject2Device
->d <<
" "
386 << pObject2Device
->e <<
" " << pObject2Device
->f <<
"]cm ";
389 OutputPath(path,
nullptr);
394 WriteString(
"strokepath W n sm\n");
401 uint32_t stroke_color,
404 int fill_alpha =
FXARGB_A(fill_color);
405 int stroke_alpha =
FXARGB_A(stroke_color);
406 if (fill_alpha && fill_alpha < 255)
408 if (stroke_alpha && stroke_alpha < 255)
410 if (fill_alpha == 0 && stroke_alpha == 0)
414 SetGraphState(pGraphState);
415 if (pObject2Device) {
416 fxcrt::ostringstream buf;
417 buf <<
"mx Cm [" << pObject2Device
->a <<
" " << pObject2Device
->b <<
" "
418 << pObject2Device
->c <<
" " << pObject2Device
->d <<
" "
419 << pObject2Device
->e <<
" " << pObject2Device
->f <<
"]cm ";
424 OutputPath(path, stroke_alpha ?
nullptr : pObject2Device);
427 SetColor(fill_color);
430 WriteString(
"q f Q ");
436 WriteString(
"q F Q ");
443 SetColor(stroke_color);
454 fxcrt::ostringstream buf;
455 if (!m_bGraphStateSet ||
456 m_CurGraphState.m_LineCap != pGraphState->m_LineCap) {
457 buf <<
static_cast<
int>(pGraphState
->m_LineCap) <<
" J\n";
459 if (!m_bGraphStateSet ||
460 m_CurGraphState.m_DashArray != pGraphState->m_DashArray) {
462 for (
const auto& dash : pGraphState->m_DashArray)
466 if (!m_bGraphStateSet ||
467 m_CurGraphState.m_LineJoin != pGraphState->m_LineJoin) {
468 buf <<
static_cast<
int>(pGraphState
->m_LineJoin) <<
" j\n";
470 if (!m_bGraphStateSet ||
471 m_CurGraphState.m_LineWidth != pGraphState->m_LineWidth) {
474 if (!m_bGraphStateSet ||
475 m_CurGraphState.m_MiterLimit != pGraphState->m_MiterLimit) {
478 m_CurGraphState = *pGraphState;
479 m_bGraphStateSet =
true;
489 bitmap->GetWidth()
, bitmap->GetHeight()
, left
, top
);
502 dest_left
, dest_top
);
511 if ((matrix
.a == 0 && matrix
.b == 0) || (matrix
.c == 0 && matrix
.d == 0))
514 if (bitmap->IsAlphaFormat()) {
519 if (bitmap->IsMaskFormat() && (alpha < 255 || bitmap->GetBPP() != 1)) {
525 fxcrt::ostringstream buf;
526 buf <<
"[" << matrix
.a <<
" " << matrix
.b <<
" " << matrix
.c <<
" "
527 << matrix
.d <<
" " << matrix
.e <<
" " << matrix
.f <<
"]cm ";
529 const int width = bitmap->GetWidth();
530 const int height = bitmap->GetHeight();
531 buf << width <<
" " << height;
533 if (bitmap->GetBPP() == 1 && !bitmap->HasPalette()) {
534 FaxCompressResult compress_result = FaxCompressData(bitmap);
535 if (compress_result.data.empty())
538 if (bitmap->IsMaskFormat()) {
545 buf << width <<
" 0 0 -" << height <<
" 0 " << height
546 <<
"]currentfile/ASCII85Decode filter ";
548 if (compress_result.compressed) {
549 buf <<
"<</K -1/EndOfBlock false/Columns " << width <<
"/Rows " << height
550 <<
">>/CCITTFaxDecode filter ";
552 if (bitmap->IsMaskFormat()) {
555 buf <<
"false 1 colorimage\n";
559 WritePSBinary(compress_result.data);
561 switch (bitmap->GetFormat()) {
567 if (bitmap->HasPalette()) {
577#if defined(PDF_USE_SKIA)
578 case FXDIB_Format::kBgraPremul:
584 WriteString(
"\nQ\n");
588 const int bytes_per_pixel = bitmap->GetBPP() / 8;
589 uint8_t* output_buf =
nullptr;
590 size_t output_size = 0;
591 bool output_buf_is_owned =
true;
592 std::optional<PSCompressResult> compress_result;
594 if ((m_Level.value() == RenderingLevel::kLevel2 || options.bLossy) &&
595 m_pEncoderIface->pJpegEncodeFunc(bitmap, &output_buf, &output_size)) {
596 filter
= "/DCTDecode filter ";
598 int src_pitch = width * bytes_per_pixel;
599 output_size = height * src_pitch;
600 output_buf = FX_Alloc(uint8_t, output_size);
601 for (
int row = 0; row < height; row++) {
602 const uint8_t* src_scan = bitmap->GetScanline(row).data();
603 uint8_t* dest_scan =
UNSAFE_TODO(output_buf + row * src_pitch);
604 if (bytes_per_pixel == 3) {
606 for (
int col = 0; col < width; col++) {
607 *dest_scan++ = src_scan[2];
608 *dest_scan++ = src_scan[1];
609 *dest_scan++ = *src_scan;
618 compress_result = PSCompressData(
620 if (compress_result.has_value()) {
622 output_buf_is_owned =
false;
623 output_buf = compress_result.value().data.data();
624 output_size = compress_result.value().data.size();
625 filter = compress_result.value().filter;
629 buf << width <<
" 0 0 -" << height <<
" 0 " << height <<
"]";
630 buf <<
"currentfile/ASCII85Decode filter ";
631 if (!filter.IsEmpty())
634 buf <<
"false " << bytes_per_pixel;
635 buf <<
" colorimage\n";
639 WritePSBinary(
UNSAFE_BUFFERS(pdfium::make_span(output_buf, output_size)));
640 if (output_buf_is_owned)
643 WriteString(
"\nQ\n");
648 if (m_bColorSet && m_LastColor == color)
651 fxcrt::ostringstream buf;
653 <<
FXARGB_B(color) / 255.0 <<
" rg\n";
663 int* ps_glyphindex) {
664 for (size_t i = 0; i < m_PSFontList.size(); ++i) {
665 const Glyph& glyph = *m_PSFontList[i];
669 if (glyph.adjust_matrix.has_value()) {
670 constexpr float kEpsilon = 0.01f;
671 const auto& adjust_matrix = glyph.adjust_matrix.value();
672 found = fabs(adjust_matrix[0] - charpos.m_AdjustMatrix[0]) < kEpsilon &&
673 fabs(adjust_matrix[1] - charpos.m_AdjustMatrix[1]) < kEpsilon &&
674 fabs(adjust_matrix[2] - charpos.m_AdjustMatrix[2]) < kEpsilon &&
675 fabs(adjust_matrix[3] - charpos.m_AdjustMatrix[3]) < kEpsilon;
680 *ps_fontnum =
pdfium::checked_cast<
int>(i / 256);
681 *ps_glyphindex = i % 256;
687 m_PSFontList.push_back(std::make_unique<Glyph>(pFont, charpos.m_GlyphIndex));
688 *ps_fontnum = pdfium::checked_cast<
int>((m_PSFontList.size() - 1) / 256);
689 *ps_glyphindex = (m_PSFontList.size() - 1) % 256;
690 if (*ps_glyphindex == 0) {
691 fxcrt::ostringstream buf;
692 buf <<
"8 dict begin/FontType 3 def/FontMatrix[1 0 0 1 0 0]def\n"
693 "/FontBBox[0 0 0 0]def/Encoding 256 array def 0 1 255{Encoding "
694 "exch/.notdef put}for\n"
695 "/CharProcs 1 dict def CharProcs begin/.notdef {} def end\n"
696 "/BuildGlyph{1 0 -10 -10 10 10 setcachedevice exch/CharProcs get "
697 "exch 2 copy known not{pop/.notdef}if get exec}bind def\n"
698 "/BuildChar{1 index/Encoding get exch get 1 index/BuildGlyph get "
701 buf <<
"/X" << *ps_fontnum <<
" exch definefont pop\n";
706 m_PSFontList.back()->adjust_matrix = std::array<
float, 4>{
707 charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1],
708 charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3]};
714 CFX_Matrix(charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1],
715 charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0);
726 fxcrt::ostringstream buf;
727 buf <<
"/X" << *ps_fontnum <<
" Ff/CharProcs get begin/" << *ps_glyphindex
729 for (size_t p = 0; p < TransformedPath.GetPoints().size(); p++) {
730 CFX_PointF point = TransformedPath.GetPoint(p);
731 switch (TransformedPath.GetType(p)) {
733 buf << point.x <<
" " << point.y <<
" m\n";
737 buf << point.x <<
" " << point.y <<
" l\n";
741 CFX_PointF point1 = TransformedPath.GetPoint(p + 1);
742 CFX_PointF point2 = TransformedPath.GetPoint(p + 2);
743 buf << point.x <<
" " << point.y <<
" " << point1.x <<
" " << point1.y
744 <<
" " << point2.x <<
" " << point2.y <<
" c\n";
750 buf <<
"f}bind def end\n";
751 buf <<
"/X" << *ps_fontnum <<
" Ff/Encoding get " << *ps_glyphindex <<
"/"
752 << *ps_glyphindex <<
" put\n";
760 fxcrt::ostringstream& buf) {
762 RetainPtr<CFX_GlyphCache> pGlyphCache = pCache->GetGlyphCache(font);
763 int last_fontnum = -1;
765 for (
int i = 0; i < char_count; i++) {
768 FindPSFontGlyph(pGlyphCache.Get(), font, char_pos[i], &ps_fontnum,
770 if (last_fontnum != ps_fontnum) {
771 buf <<
"/X" << ps_fontnum <<
" Ff " << font_size <<
" Fs Sf ";
772 last_fontnum = ps_fontnum;
774 buf << char_pos[i].m_Origin.x <<
" " << char_pos[i].m_Origin.y <<
" m";
776 buf << hex.AsStringView() <<
"Tj\n";
785 fxcrt::ostringstream& buf) {
786 if (m_Level != RenderingLevel::kLevel3Type42) {
790 RetainPtr<CFX_Face> face = font->GetFace();
791 if (!face || !face->CanEmbed()) {
798 bool is_existing_font = m_pFontTracker->SeenFontObject(font);
799 if (!is_existing_font) {
800 ByteString font_data = GenerateType42FontData(font);
801 if (font_data.IsEmpty())
804 m_pFontTracker->AddFontObject(font);
805 WritePreambleString(font_data.AsStringView());
808 buf <<
"/" << font
->GetPsName() <<
" " << font_size <<
" selectfont\n";
810 for (
int i = 0; i < char_count; ++i) {
811 buf << char_pos[i].m_Origin.x <<
" " << char_pos[i].m_Origin.y <<
" m";
815 buf << hex.AsStringView() <<
"Tj\n";
828 if ((mtObject2Device
.a == 0 && mtObject2Device
.b == 0) ||
829 (mtObject2Device
.c == 0 && mtObject2Device
.d == 0)) {
836 static constexpr float kEpsilon = 0.01f;
837 if (fabsf(font_size * scale) < kEpsilon)
846 fxcrt::ostringstream buf;
847 buf <<
"q[" << mtObject2Device
.a <<
" " << mtObject2Device
.b <<
" "
848 << mtObject2Device
.c <<
" " << mtObject2Device
.d <<
" "
849 << mtObject2Device
.e <<
" " << mtObject2Device
.f <<
"]cm\n";
851 if (!DrawTextAsType42Font(nChars, pCharPos, pFont, font_size, buf)) {
852 DrawTextAsType3Font(nChars, pCharPos, pFont, font_size, buf);
864 FaxCompressResult result;
865 const int width = src->GetWidth();
866 const int height = src->GetHeight();
867 const int pitch = src->GetPitch();
871 safe_pixel_count *= height;
872 if (!safe_pixel_count.IsValid())
875 if (safe_pixel_count.ValueOrDie() > 128) {
876 result.data = m_pEncoderIface->pFaxEncodeFunc(std::move(src));
877 result.compressed =
true;
883 result.data.resize(safe_size.ValueOrDie());
884 auto dest_span =
pdfium::make_span(result.data);
885 for (
int row = 0; row < height; row++) {
886 fxcrt::Copy(src->GetScanline(row), dest_span.subspan(row * pitch, pitch));
892 pdfium::span<
const uint8_t> src_span)
const {
893 if (src_span.size() < 1024)
896 DataVector<uint8_t> (*encode_func)(pdfium::span<
const uint8_t> src_span);
898 if (m_Level.value() == RenderingLevel::kLevel3 ||
899 m_Level.value() == RenderingLevel::kLevel3Type42) {
900 encode_func = m_pEncoderIface->pFlateEncodeFunc;
901 filter
= "/FlateDecode filter ";
903 encode_func = m_pEncoderIface->pRunLengthEncodeFunc;
904 filter
= "/RunLengthDecode filter ";
907 DataVector<uint8_t> decode_result = encode_func(src_span);
908 if (decode_result.size() == 0 || decode_result.size() >= src_span.size())
911 PSCompressResult result;
912 result.data =
std::move(decode_result);
913 result.filter = filter;
918 m_PreambleOutput << str;
921void CFX_PSRenderer::WritePSBinary(pdfium::span<
const uint8_t> data) {
922 DataVector<uint8_t> encoded_data = m_pEncoderIface->pA85EncodeFunc(data);
923 pdfium::span<
const uint8_t> result =
924 encoded_data.empty() ? data : encoded_data;
925 auto chars =
pdfium::as_chars(result);
926 m_Output.write(chars.data(), chars.size());
930 std::streamoff output_pos = stream.tellp();
931 if (output_pos > 0) {
932 m_Output.write(stream.str().c_str(),
933 pdfium::checked_cast<size_t>(output_pos));
944 pdfium::span<
const uint8_t> font_data) {
945 return GenerateType42SfntData(psname, font_data);
953 size_t glyphs_per_descendant_font) {
954 return GenerateType42FontDictionary(psname, bbox, num_glyphs,
955 glyphs_per_descendant_font);
fxcrt::ByteString ByteString
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_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)
bool SetDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, int dest_left, int dest_top)
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)
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)
#define UNSAFE_BUFFERS(...)
CFX_PTemplate< float > CFX_PointF
UNSAFE_BUFFER_USAGE void * FXSYS_memcpy(void *ptr1, const void *ptr2, size_t len)
pdfium::CheckedNumeric< uint32_t > FX_SAFE_UINT32
#define NOTREACHED_NORETURN()
fxcrt::ByteStringView ByteStringView
Glyph(CFX_Font *font, uint32_t glyph_index)
UnownedPtr< CFX_Font > const font
Glyph & operator=(const Glyph &)=delete
const uint32_t glyph_index
Glyph(const Glyph &other)=delete
std::optional< std::array< float, 4 > > adjust_matrix
void Intersect(const FX_RECT &src)