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 #include "../../include/fpdftext/fpdf_text.h" | 7 #include "../../include/fpdftext/fpdf_text.h" |
8 extern const FX_WCHAR g_UnicodeData_Normalization[65536]; | 8 extern const FX_WCHAR g_UnicodeData_Normalization[65536]; |
9 extern const FX_WCHAR g_UnicodeData_Normalization_Map1[5376]; | 9 extern const FX_WCHAR g_UnicodeData_Normalization_Map1[5376]; |
10 extern const FX_WCHAR g_UnicodeData_Normalization_Map2[1734]; | 10 extern const FX_WCHAR g_UnicodeData_Normalization_Map2[1724]; |
11 extern const FX_WCHAR g_UnicodeData_Normalization_Map3[1164]; | 11 extern const FX_WCHAR g_UnicodeData_Normalization_Map3[1164]; |
12 extern const FX_WCHAR g_UnicodeData_Normalization_Map4[488]; | 12 extern const FX_WCHAR g_UnicodeData_Normalization_Map4[488]; |
13 FX_LPCWSTR g_UnicodeData_Normalization_Maps[5] = { | 13 FX_LPCWSTR g_UnicodeData_Normalization_Maps[5] = { |
14 NULL, | 14 NULL, |
15 g_UnicodeData_Normalization_Map1, | 15 g_UnicodeData_Normalization_Map1, |
16 g_UnicodeData_Normalization_Map2, | 16 g_UnicodeData_Normalization_Map2, |
17 g_UnicodeData_Normalization_Map3, | 17 g_UnicodeData_Normalization_Map3, |
18 g_UnicodeData_Normalization_Map4 | 18 g_UnicodeData_Normalization_Map4 |
19 }; | 19 }; |
20 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_LPWSTR pDst) | 20 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_LPWSTR pDst) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 { | 66 { |
67 FX_STRSIZE nLen = FX_WideString_GetNormalization(wsSrc, (FX_LPWSTR)NULL); | 67 FX_STRSIZE nLen = FX_WideString_GetNormalization(wsSrc, (FX_LPWSTR)NULL); |
68 if (!nLen) { | 68 if (!nLen) { |
69 return 0; | 69 return 0; |
70 } | 70 } |
71 FX_LPWSTR pBuf = wsDst.GetBuffer(nLen); | 71 FX_LPWSTR pBuf = wsDst.GetBuffer(nLen); |
72 FX_WideString_GetNormalization(wsSrc, pBuf); | 72 FX_WideString_GetNormalization(wsSrc, pBuf); |
73 wsDst.ReleaseBuffer(nLen); | 73 wsDst.ReleaseBuffer(nLen); |
74 return nLen; | 74 return nLen; |
75 } | 75 } |
OLD | NEW |