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 | 8 |
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ | 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ |
10 #include <crtdbg.h> | 10 #include <crtdbg.h> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } else if ((lVersion & 0xFFFF0000) == TT_MAKE_TAG(0x80, 0x01, 0x00, 0x00) || | 115 } else if ((lVersion & 0xFFFF0000) == TT_MAKE_TAG(0x80, 0x01, 0x00, 0x00) || |
116 (lVersion & 0xFFFF0000) == TT_MAKE_TAG('%', '!', 0, 0)) { | 116 (lVersion & 0xFFFF0000) == TT_MAKE_TAG('%', '!', 0, 0)) { |
117 ret = TRUE; | 117 ret = TRUE; |
118 } | 118 } |
119 } | 119 } |
120 DeleteFont(hFont); | 120 DeleteFont(hFont); |
121 return ret; | 121 return ret; |
122 } | 122 } |
123 void CFX_Win32FontInfo::AddInstalledFont(const LOGFONTA* plf, | 123 void CFX_Win32FontInfo::AddInstalledFont(const LOGFONTA* plf, |
124 FX_DWORD FontType) { | 124 FX_DWORD FontType) { |
125 CFX_ByteString name(plf->lfFaceName, -1); | 125 CFX_ByteString name(plf->lfFaceName); |
126 if (name[0] == '@') { | 126 if (name[0] == '@') { |
127 return; | 127 return; |
128 } | 128 } |
129 if (name == m_LastFamily) { | 129 if (name == m_LastFamily) { |
130 m_pMapper->AddInstalledFont(name, plf->lfCharSet); | 130 m_pMapper->AddInstalledFont(name, plf->lfCharSet); |
131 return; | 131 return; |
132 } | 132 } |
133 if (!(FontType & TRUETYPE_FONTTYPE) && !(FontType & DEVICE_FONTTYPE)) { | 133 if (!(FontType & TRUETYPE_FONTTYPE) && !(FontType & DEVICE_FONTTYPE)) { |
134 return; | 134 return; |
135 } | 135 } |
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1358 SelectObject(m_hDC, m_hOldBitmap); | 1358 SelectObject(m_hDC, m_hOldBitmap); |
1359 DeleteDC(m_hDC); | 1359 DeleteDC(m_hDC); |
1360 } | 1360 } |
1361 if (m_hBitmap) { | 1361 if (m_hBitmap) { |
1362 DeleteObject(m_hBitmap); | 1362 DeleteObject(m_hBitmap); |
1363 } | 1363 } |
1364 delete GetBitmap(); | 1364 delete GetBitmap(); |
1365 } | 1365 } |
1366 | 1366 |
1367 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ | 1367 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ |
OLD | NEW |