xref: /aosp_15_r20/external/pdfium/xfa/fgas/layout/cfgas_textpiece.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2019 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef XFA_FGAS_LAYOUT_CFGAS_TEXTPIECE_H_
8 #define XFA_FGAS_LAYOUT_CFGAS_TEXTPIECE_H_
9 
10 #include <vector>
11 
12 #include "core/fxcrt/fx_coordinates.h"
13 #include "core/fxcrt/retain_ptr.h"
14 #include "core/fxcrt/widestring.h"
15 
16 class CFGAS_GEFont;
17 
18 class CFGAS_TextPiece {
19  public:
20   CFGAS_TextPiece();
21   ~CFGAS_TextPiece();
22 
23   WideString szText;
24   std::vector<int32_t> Widths;
25   int32_t iChars = 0;
26   int32_t iHorScale = 0;
27   int32_t iVerScale = 0;
28   int32_t iBidiLevel = 0;
29   float fFontSize = 0.0f;
30   CFX_RectF rtPiece;
31   RetainPtr<CFGAS_GEFont> pFont;
32 };
33 
34 #endif  // XFA_FGAS_LAYOUT_CFGAS_TEXTPIECE_H_
35