| 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/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 #include "../../../include/fxge/fx_freetype.h" | 8 #include "../../../include/fxge/fx_freetype.h" |
| 9 #include "../../../include/fxcodec/fx_codec.h" | 9 #include "../../../include/fxcodec/fx_codec.h" |
| 10 #include "text_int.h" | 10 #include "text_int.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 if (pCache == NULL) { | 200 if (pCache == NULL) { |
| 201 pCache = CFX_GEModule::Get()->GetFontCache(); | 201 pCache = CFX_GEModule::Get()->GetFontCache(); |
| 202 } | 202 } |
| 203 CFX_FaceCache* pFaceCache = pCache->GetCachedFace(pFont); | 203 CFX_FaceCache* pFaceCache = pCache->GetCachedFace(pFont); |
| 204 FX_FONTCACHE_DEFINE(pCache, pFont); | 204 FX_FONTCACHE_DEFINE(pCache, pFont); |
| 205 FXTEXT_GLYPHPOS* pGlyphAndPos = FX_Alloc(FXTEXT_GLYPHPOS, nChars); | 205 FXTEXT_GLYPHPOS* pGlyphAndPos = FX_Alloc(FXTEXT_GLYPHPOS, nChars); |
| 206 if (!pGlyphAndPos) { |
| 207 return FALSE; |
| 208 } |
| 206 int iChar; | 209 int iChar; |
| 207 deviceCtm = char2device; | 210 deviceCtm = char2device; |
| 208 CFX_AffineMatrix matrixCTM = GetCTM(); | 211 CFX_AffineMatrix matrixCTM = GetCTM(); |
| 209 FX_FLOAT scale_x = FXSYS_fabs(matrixCTM.a); | 212 FX_FLOAT scale_x = FXSYS_fabs(matrixCTM.a); |
| 210 FX_FLOAT scale_y = FXSYS_fabs(matrixCTM.d); | 213 FX_FLOAT scale_y = FXSYS_fabs(matrixCTM.d); |
| 211 deviceCtm.Concat(scale_x, 0, 0, scale_y, 0, 0); | 214 deviceCtm.Concat(scale_x, 0, 0, scale_y, 0, 0); |
| 212 text2Device.Concat(scale_x, 0, 0, scale_y, 0, 0); | 215 text2Device.Concat(scale_x, 0, 0, scale_y, 0, 0); |
| 213 for (iChar = 0; iChar < nChars; iChar ++) { | 216 for (iChar = 0; iChar < nChars; iChar ++) { |
| 214 FXTEXT_GLYPHPOS& glyph = pGlyphAndPos[iChar]; | 217 FXTEXT_GLYPHPOS& glyph = pGlyphAndPos[iChar]; |
| 215 const FXTEXT_CHARPOS& charpos = pCharPos[iChar]; | 218 const FXTEXT_CHARPOS& charpos = pCharPos[iChar]; |
| (...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 { | 1675 { |
| 1673 va_list argList; | 1676 va_list argList; |
| 1674 va_start(argList, count); | 1677 va_start(argList, count); |
| 1675 for (int i = 0; i < count; i ++) { | 1678 for (int i = 0; i < count; i ++) { |
| 1676 int p = va_arg(argList, int); | 1679 int p = va_arg(argList, int); |
| 1677 ((FX_DWORD*)m_Key)[i] = p; | 1680 ((FX_DWORD*)m_Key)[i] = p; |
| 1678 } | 1681 } |
| 1679 va_end(argList); | 1682 va_end(argList); |
| 1680 m_KeyLen = count * sizeof(FX_DWORD); | 1683 m_KeyLen = count * sizeof(FX_DWORD); |
| 1681 } | 1684 } |
| OLD | NEW |