| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" | 9 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" |
| 10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 if (csFontName == "ZapfDingbats") | 407 if (csFontName == "ZapfDingbats") |
| 408 return pDocument->AddStandardFont(csFontName.c_str(), nullptr); | 408 return pDocument->AddStandardFont(csFontName.c_str(), nullptr); |
| 409 | 409 |
| 410 CPDF_FontEncoding encoding(PDFFONT_ENCODING_WINANSI); | 410 CPDF_FontEncoding encoding(PDFFONT_ENCODING_WINANSI); |
| 411 return pDocument->AddStandardFont(csFontName.c_str(), &encoding); | 411 return pDocument->AddStandardFont(csFontName.c_str(), &encoding); |
| 412 } | 412 } |
| 413 | 413 |
| 414 CFX_ByteString CPDF_InterForm::GetNativeFont(uint8_t charSet, void* pLogFont) { | 414 CFX_ByteString CPDF_InterForm::GetNativeFont(uint8_t charSet, void* pLogFont) { |
| 415 CFX_ByteString csFontName; | 415 CFX_ByteString csFontName; |
| 416 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 416 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 417 LOGFONTA lf; | 417 LOGFONTA lf = {}; |
| 418 FX_BOOL bRet; | 418 FX_BOOL bRet; |
| 419 if (charSet == ANSI_CHARSET) { | 419 if (charSet == ANSI_CHARSET) { |
| 420 csFontName = "Helvetica"; | 420 csFontName = "Helvetica"; |
| 421 return csFontName; | 421 return csFontName; |
| 422 } | 422 } |
| 423 bRet = FALSE; | 423 bRet = FALSE; |
| 424 if (charSet == SHIFTJIS_CHARSET) { | 424 if (charSet == SHIFTJIS_CHARSET) { |
| 425 bRet = RetrieveSpecificFont(charSet, DEFAULT_PITCH | FF_DONTCARE, | 425 bRet = RetrieveSpecificFont(charSet, DEFAULT_PITCH | FF_DONTCARE, |
| 426 "MS Mincho", lf); | 426 "MS Mincho", lf); |
| 427 } else if (charSet == GB2312_CHARSET) { | 427 } else if (charSet == GB2312_CHARSET) { |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 FDF_ImportField(pField, L"", bNotify); | 1201 FDF_ImportField(pField, L"", bNotify); |
| 1202 } | 1202 } |
| 1203 if (bNotify && m_pFormNotify) { | 1203 if (bNotify && m_pFormNotify) { |
| 1204 m_pFormNotify->AfterFormImportData(this); | 1204 m_pFormNotify->AfterFormImportData(this); |
| 1205 } | 1205 } |
| 1206 return TRUE; | 1206 return TRUE; |
| 1207 } | 1207 } |
| 1208 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { | 1208 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { |
| 1209 m_pFormNotify = (CPDF_FormNotify*)pNotify; | 1209 m_pFormNotify = (CPDF_FormNotify*)pNotify; |
| 1210 } | 1210 } |
| OLD | NEW |