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, const FX_CHAR* family, FX_BOOL& bExact) override | 32 » virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset
, int pitch_family, const FX_CHAR* family, int& iExact) 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, &iExact); |
36 return NULL; | 36 return NULL; |
37 } | 37 } |
38 | 38 |
39 virtual void* GetFont(const FX_CHAR* 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 |
(...skipping 117 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 |