| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 if (pCache == NULL) { | 196 if (pCache == NULL) { |
| 197 pCache = CFX_GEModule::Get()->GetFontCache(); | 197 pCache = CFX_GEModule::Get()->GetFontCache(); |
| 198 } | 198 } |
| 199 CFX_FaceCache* pFaceCache = pCache->GetCachedFace(pFont); | 199 CFX_FaceCache* pFaceCache = pCache->GetCachedFace(pFont); |
| 200 FX_FONTCACHE_DEFINE(pCache, pFont); | 200 FX_FONTCACHE_DEFINE(pCache, pFont); |
| 201 FXTEXT_GLYPHPOS* pGlyphAndPos = FX_Alloc(FXTEXT_GLYPHPOS, nChars); | 201 FXTEXT_GLYPHPOS* pGlyphAndPos = FX_Alloc(FXTEXT_GLYPHPOS, nChars); |
| 202 if (!pGlyphAndPos) { | |
| 203 return FALSE; | |
| 204 } | |
| 205 int iChar; | 202 int iChar; |
| 206 deviceCtm = char2device; | 203 deviceCtm = char2device; |
| 207 CFX_AffineMatrix matrixCTM = GetCTM(); | 204 CFX_AffineMatrix matrixCTM = GetCTM(); |
| 208 FX_FLOAT scale_x = FXSYS_fabs(matrixCTM.a); | 205 FX_FLOAT scale_x = FXSYS_fabs(matrixCTM.a); |
| 209 FX_FLOAT scale_y = FXSYS_fabs(matrixCTM.d); | 206 FX_FLOAT scale_y = FXSYS_fabs(matrixCTM.d); |
| 210 deviceCtm.Concat(scale_x, 0, 0, scale_y, 0, 0); | 207 deviceCtm.Concat(scale_x, 0, 0, scale_y, 0, 0); |
| 211 text2Device.Concat(scale_x, 0, 0, scale_y, 0, 0); | 208 text2Device.Concat(scale_x, 0, 0, scale_y, 0, 0); |
| 212 for (iChar = 0; iChar < nChars; iChar ++) { | 209 for (iChar = 0; iChar < nChars; iChar ++) { |
| 213 FXTEXT_GLYPHPOS& glyph = pGlyphAndPos[iChar]; | 210 FXTEXT_GLYPHPOS& glyph = pGlyphAndPos[iChar]; |
| 214 const FXTEXT_CHARPOS& charpos = pCharPos[iChar]; | 211 const FXTEXT_CHARPOS& charpos = pCharPos[iChar]; |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1694 { | 1691 { |
| 1695 va_list argList; | 1692 va_list argList; |
| 1696 va_start(argList, count); | 1693 va_start(argList, count); |
| 1697 for (int i = 0; i < count; i ++) { | 1694 for (int i = 0; i < count; i ++) { |
| 1698 int p = va_arg(argList, int); | 1695 int p = va_arg(argList, int); |
| 1699 ((FX_DWORD*)m_Key)[i] = p; | 1696 ((FX_DWORD*)m_Key)[i] = p; |
| 1700 } | 1697 } |
| 1701 va_end(argList); | 1698 va_end(argList); |
| 1702 m_KeyLen = count * sizeof(FX_DWORD); | 1699 m_KeyLen = count * sizeof(FX_DWORD); |
| 1703 } | 1700 } |
| OLD | NEW |