| 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 "../../public/fpdf_sysfontinfo.h" | 7 #include "../../public/fpdf_sysfontinfo.h" |
| 8 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
| 9 #include "../include/pdfwindow/PWL_FontMap.h" | 9 #include "../include/pdfwindow/PWL_FontMap.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override | 23 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override |
| 24 { | 24 { |
| 25 if (m_pInfo->EnumFonts) { | 25 if (m_pInfo->EnumFonts) { |
| 26 m_pInfo->EnumFonts(m_pInfo, pMapper); | 26 m_pInfo->EnumFonts(m_pInfo, pMapper); |
| 27 return TRUE; | 27 return TRUE; |
| 28 } | 28 } |
| 29 return FALSE; | 29 return FALSE; |
| 30 } | 30 } |
| 31 | 31 |
| 32 » virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact) override | 32 » virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact) override |
| 33 { | 33 { |
| 34 if (m_pInfo->MapFont) | 34 if (m_pInfo->MapFont) |
| 35 return m_pInfo->MapFont(m_pInfo, weight, bItalic, charse
t, pitch_family, family, &bExact); | 35 return m_pInfo->MapFont(m_pInfo, weight, bItalic, charse
t, pitch_family, family, &bExact); |
| 36 return NULL; | 36 return NULL; |
| 37 } | 37 } |
| 38 | 38 |
| 39 » virtual void*» » GetFont(FX_LPCSTR family) override | 39 » virtual void*» » GetFont(const FX_CHAR* family) override |
| 40 { | 40 { |
| 41 if (m_pInfo->GetFont) | 41 if (m_pInfo->GetFont) |
| 42 return m_pInfo->GetFont(m_pInfo, family); | 42 return m_pInfo->GetFont(m_pInfo, family); |
| 43 return NULL; | 43 return NULL; |
| 44 } | 44 } |
| 45 | 45 |
| 46 » virtual FX_DWORD» GetFontData(void* hFont, FX_DWORD table, FX_LPBY
TE buffer, FX_DWORD size) override | 46 » virtual FX_DWORD» GetFontData(void* hFont, FX_DWORD table, uint8_t
* buffer, FX_DWORD size) override |
| 47 { | 47 { |
| 48 if (m_pInfo->GetFontData) | 48 if (m_pInfo->GetFontData) |
| 49 return m_pInfo->GetFontData(m_pInfo, hFont, table, buffe
r, size); | 49 return m_pInfo->GetFontData(m_pInfo, hFont, table, buffe
r, size); |
| 50 return 0; | 50 return 0; |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name)
override | 53 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name)
override |
| 54 { | 54 { |
| 55 if (m_pInfo->GetFaceName == NULL) return FALSE; | 55 if (m_pInfo->GetFaceName == NULL) return FALSE; |
| 56 FX_DWORD size = m_pInfo->GetFaceName(m_pInfo, hFont, NULL, 0); | 56 FX_DWORD size = m_pInfo->GetFaceName(m_pInfo, hFont, NULL, 0); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 pFontInfoExt->GetFaceName = DefaultGetFaceName; | 163 pFontInfoExt->GetFaceName = DefaultGetFaceName; |
| 164 pFontInfoExt->GetFont = DefaultGetFont; | 164 pFontInfoExt->GetFont = DefaultGetFont; |
| 165 pFontInfoExt->GetFontCharset = DefaultGetFontCharset; | 165 pFontInfoExt->GetFontCharset = DefaultGetFontCharset; |
| 166 pFontInfoExt->GetFontData = DefaultGetFontData; | 166 pFontInfoExt->GetFontData = DefaultGetFontData; |
| 167 pFontInfoExt->MapFont = DefaultMapFont; | 167 pFontInfoExt->MapFont = DefaultMapFont; |
| 168 pFontInfoExt->Release = DefaultRelease; | 168 pFontInfoExt->Release = DefaultRelease; |
| 169 pFontInfoExt->version = 1; | 169 pFontInfoExt->version = 1; |
| 170 pFontInfoExt->m_pFontInfo = pFontInfo; | 170 pFontInfoExt->m_pFontInfo = pFontInfo; |
| 171 return pFontInfoExt; | 171 return pFontInfoExt; |
| 172 } | 172 } |
| OLD | NEW |