| 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 | 8 |
| 9 #include "../../../include/fxge/fx_ge.h" | 9 #include "../../../include/fxge/fx_ge.h" |
| 10 #include "../../../include/fxge/fx_freetype.h" | 10 #include "../../../include/fxge/fx_freetype.h" |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 return CFX_ByteString(); | 530 return CFX_ByteString(); |
| 531 } | 531 } |
| 532 buffer.ReleaseBuffer(size); | 532 buffer.ReleaseBuffer(size); |
| 533 return buffer; | 533 return buffer; |
| 534 } | 534 } |
| 535 } | 535 } |
| 536 return CFX_ByteString(); | 536 return CFX_ByteString(); |
| 537 } | 537 } |
| 538 CFX_ByteString CFX_FontMapper::GetPSNameFromTT(void* hFont) { | 538 CFX_ByteString CFX_FontMapper::GetPSNameFromTT(void* hFont) { |
| 539 if (m_pFontInfo == NULL) { | 539 if (m_pFontInfo == NULL) { |
| 540 CFX_ByteString(); | 540 return CFX_ByteString(); |
| 541 } | 541 } |
| 542 CFX_ByteString result; | 542 CFX_ByteString result; |
| 543 FX_DWORD size = m_pFontInfo->GetFontData(hFont, 0x6e616d65, NULL, 0); | 543 FX_DWORD size = m_pFontInfo->GetFontData(hFont, 0x6e616d65, NULL, 0); |
| 544 if (size) { | 544 if (size) { |
| 545 uint8_t* buffer = FX_Alloc(uint8_t, size); | 545 uint8_t* buffer = FX_Alloc(uint8_t, size); |
| 546 m_pFontInfo->GetFontData(hFont, 0x6e616d65, buffer, size); | 546 m_pFontInfo->GetFontData(hFont, 0x6e616d65, buffer, size); |
| 547 result = GetNameFromTT(buffer, 6); | 547 result = GetNameFromTT(buffer, 6); |
| 548 FX_Free(buffer); | 548 FX_Free(buffer); |
| 549 } | 549 } |
| 550 return result; | 550 return result; |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 if (hFont == NULL) { | 1464 if (hFont == NULL) { |
| 1465 return FALSE; | 1465 return FALSE; |
| 1466 } | 1466 } |
| 1467 CFX_FontFaceInfo* pFont = (CFX_FontFaceInfo*)hFont; | 1467 CFX_FontFaceInfo* pFont = (CFX_FontFaceInfo*)hFont; |
| 1468 name = pFont->m_FaceName; | 1468 name = pFont->m_FaceName; |
| 1469 return TRUE; | 1469 return TRUE; |
| 1470 } | 1470 } |
| 1471 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) { | 1471 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) { |
| 1472 return FALSE; | 1472 return FALSE; |
| 1473 } | 1473 } |
| OLD | NEW |