OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FGAS_LAYOUT_FGAS_UNICODE_H_ | 7 #ifndef XFA_FGAS_LAYOUT_FGAS_UNICODE_H_ |
8 #define XFA_FGAS_LAYOUT_FGAS_UNICODE_H_ | 8 #define XFA_FGAS_LAYOUT_FGAS_UNICODE_H_ |
9 | 9 |
10 #include "xfa/fgas/crt/fgas_utils.h" | 10 #include "xfa/fgas/crt/fgas_utils.h" |
11 #include "xfa/fgas/font/fgas_font.h" | 11 #include "xfa/fgas/font/fgas_font.h" |
12 | 12 |
13 #define FX_JAPCHARPROPERTYEX_Left 0x01 | 13 #define FX_JAPCHARPROPERTYEX_Left 0x01 |
14 #define FX_JAPCHARPROPERTYEX_Center 0x02 | 14 #define FX_JAPCHARPROPERTYEX_Center 0x02 |
15 #define FX_JAPCHARPROPERTYEX_Right 0x03 | 15 #define FX_JAPCHARPROPERTYEX_Right 0x03 |
16 #define FX_JAPCHARPROPERTYEX_Top 0x10 | 16 #define FX_JAPCHARPROPERTYEX_Top 0x10 |
17 #define FX_JAPCHARPROPERTYEX_Middle 0x20 | 17 #define FX_JAPCHARPROPERTYEX_Middle 0x20 |
18 #define FX_JAPCHARPROPERTYEX_Bottom 0x30 | 18 #define FX_JAPCHARPROPERTYEX_Bottom 0x30 |
19 | 19 |
20 struct FX_TPO { | 20 struct FX_TPO { |
21 int32_t index; | 21 int32_t index; |
22 int32_t pos; | 22 int32_t pos; |
23 }; | 23 }; |
24 typedef CFX_MassArrayTemplate<FX_TPO> CFX_TPOArray; | 24 typedef CFX_MassArrayTemplate<FX_TPO> CFX_TPOArray; |
25 | 25 |
26 void FX_TEXTLAYOUT_PieceSort(CFX_TPOArray& tpos, int32_t iStart, int32_t iEnd); | 26 void FX_TEXTLAYOUT_PieceSort(CFX_TPOArray& tpos, int32_t iStart, int32_t iEnd); |
27 | 27 |
28 struct FX_JAPCHARPROPERTYEX { | 28 struct FX_JAPCHARPROPERTYEX { |
29 FX_WCHAR wChar; | 29 uint16_t wChar; |
30 uint8_t uAlign; | 30 uint8_t uAlign; |
31 }; | 31 }; |
32 | 32 |
33 const FX_JAPCHARPROPERTYEX* FX_GetJapCharPropertyEx(FX_WCHAR wch); | 33 const FX_JAPCHARPROPERTYEX* FX_GetJapCharPropertyEx(FX_WCHAR wch); |
34 typedef FX_BOOL (*FX_AdjustCharDisplayPos)(FX_WCHAR wch, | 34 typedef FX_BOOL (*FX_AdjustCharDisplayPos)(FX_WCHAR wch, |
35 FX_BOOL bMBCSCode, | 35 FX_BOOL bMBCSCode, |
36 IFX_Font* pFont, | 36 IFX_Font* pFont, |
37 FX_FLOAT fFontSize, | 37 FX_FLOAT fFontSize, |
38 FX_BOOL bVertical, | 38 FX_BOOL bVertical, |
39 CFX_PointF& ptOffset); | 39 CFX_PointF& ptOffset); |
40 FX_BOOL FX_AdjustJapCharDisplayPos(FX_WCHAR wch, | 40 FX_BOOL FX_AdjustJapCharDisplayPos(FX_WCHAR wch, |
41 FX_BOOL bMBCSCode, | 41 FX_BOOL bMBCSCode, |
42 IFX_Font* pFont, | 42 IFX_Font* pFont, |
43 FX_FLOAT fFontSize, | 43 FX_FLOAT fFontSize, |
44 FX_BOOL bVertical, | 44 FX_BOOL bVertical, |
45 CFX_PointF& ptOffset); | 45 CFX_PointF& ptOffset); |
46 | 46 |
47 #endif // XFA_FGAS_LAYOUT_FGAS_UNICODE_H_ | 47 #endif // XFA_FGAS_LAYOUT_FGAS_UNICODE_H_ |
OLD | NEW |