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 <limits> | 7 #include <limits> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "core/fxcodec/include/fx_codec.h" | 10 #include "core/fxcodec/include/fx_codec.h" |
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 return nullptr; | 1084 return nullptr; |
1085 } | 1085 } |
1086 FXFT_Matrix ft_matrix; | 1086 FXFT_Matrix ft_matrix; |
1087 ft_matrix.xx = (signed long)(pMatrix->GetA() / 64 * 65536); | 1087 ft_matrix.xx = (signed long)(pMatrix->GetA() / 64 * 65536); |
1088 ft_matrix.xy = (signed long)(pMatrix->GetC() / 64 * 65536); | 1088 ft_matrix.xy = (signed long)(pMatrix->GetC() / 64 * 65536); |
1089 ft_matrix.yx = (signed long)(pMatrix->GetB() / 64 * 65536); | 1089 ft_matrix.yx = (signed long)(pMatrix->GetB() / 64 * 65536); |
1090 ft_matrix.yy = (signed long)(pMatrix->GetD() / 64 * 65536); | 1090 ft_matrix.yy = (signed long)(pMatrix->GetD() / 64 * 65536); |
1091 FX_BOOL bUseCJKSubFont = FALSE; | 1091 FX_BOOL bUseCJKSubFont = FALSE; |
1092 const CFX_SubstFont* pSubstFont = pFont->GetSubstFont(); | 1092 const CFX_SubstFont* pSubstFont = pFont->GetSubstFont(); |
1093 if (pSubstFont) { | 1093 if (pSubstFont) { |
1094 bUseCJKSubFont = pSubstFont->m_bSubstOfCJK && bFontStyle; | 1094 bUseCJKSubFont = pSubstFont->m_bSubstCJK && bFontStyle; |
1095 int skew = 0; | 1095 int skew = 0; |
1096 if (bUseCJKSubFont) { | 1096 if (bUseCJKSubFont) { |
1097 skew = pSubstFont->m_bItlicCJK ? -15 : 0; | 1097 skew = pSubstFont->m_bItalicCJK ? -15 : 0; |
1098 } else { | 1098 } else { |
1099 skew = pSubstFont->m_ItalicAngle; | 1099 skew = pSubstFont->m_ItalicAngle; |
1100 } | 1100 } |
1101 if (skew) { | 1101 if (skew) { |
1102 // |skew| is nonpositive so |-skew| is used as the index. We need to make | 1102 // |skew| is nonpositive so |-skew| is used as the index. We need to make |
1103 // sure |skew| != INT_MIN since -INT_MIN is undefined. | 1103 // sure |skew| != INT_MIN since -INT_MIN is undefined. |
1104 if (skew <= 0 && skew != std::numeric_limits<int>::min() && | 1104 if (skew <= 0 && skew != std::numeric_limits<int>::min() && |
1105 static_cast<size_t>(-skew) < ANGLESKEW_ARRAY_SIZE) { | 1105 static_cast<size_t>(-skew) < ANGLESKEW_ARRAY_SIZE) { |
1106 skew = -g_AngleSkew[-skew]; | 1106 skew = -g_AngleSkew[-skew]; |
1107 } else { | 1107 } else { |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 void _CFX_UniqueKeyGen::Generate(int count, ...) { | 1437 void _CFX_UniqueKeyGen::Generate(int count, ...) { |
1438 va_list argList; | 1438 va_list argList; |
1439 va_start(argList, count); | 1439 va_start(argList, count); |
1440 for (int i = 0; i < count; i++) { | 1440 for (int i = 0; i < count; i++) { |
1441 int p = va_arg(argList, int); | 1441 int p = va_arg(argList, int); |
1442 ((uint32_t*)m_Key)[i] = p; | 1442 ((uint32_t*)m_Key)[i] = p; |
1443 } | 1443 } |
1444 va_end(argList); | 1444 va_end(argList); |
1445 m_KeyLen = count * sizeof(uint32_t); | 1445 m_KeyLen = count * sizeof(uint32_t); |
1446 } | 1446 } |
OLD | NEW |