| 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/pdfwindow/PDFWindow.h" | 7 #include "../../include/pdfwindow/PDFWindow.h" |
| 8 #include "../../include/pdfwindow/PWL_Wnd.h" | 8 #include "../../include/pdfwindow/PWL_Wnd.h" |
| 9 #include "../../include/pdfwindow/PWL_FontMap.h" | 9 #include "../../include/pdfwindow/PWL_FontMap.h" |
| 10 | 10 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 return nCharset; | 501 return nCharset; |
| 502 } | 502 } |
| 503 | 503 |
| 504 const CPWL_FontMap::CharsetFontMap CPWL_FontMap::defaultTTFMap[] = { | 504 const CPWL_FontMap::CharsetFontMap CPWL_FontMap::defaultTTFMap[] = { |
| 505 { ANSI_CHARSET, "Helvetica" }, | 505 { ANSI_CHARSET, "Helvetica" }, |
| 506 { GB2312_CHARSET, "SimSun" }, | 506 { GB2312_CHARSET, "SimSun" }, |
| 507 { CHINESEBIG5_CHARSET, "MingLiU" }, | 507 { CHINESEBIG5_CHARSET, "MingLiU" }, |
| 508 { SHIFTJIS_CHARSET, "MS Gothic" }, | 508 { SHIFTJIS_CHARSET, "MS Gothic" }, |
| 509 { HANGUL_CHARSET, "Batang" }, | 509 { HANGUL_CHARSET, "Batang" }, |
| 510 { RUSSIAN_CHARSET, "Arial" }, | 510 { RUSSIAN_CHARSET, "Arial" }, |
| 511 #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || _FXM_PLATFORM_ == _FXM_PLATFORM_AP
PLE_ |
| 512 { EASTEUROPE_CHARSET, "Arial" }, |
| 513 #else |
| 511 { EASTEUROPE_CHARSET, "Tahoma" }, | 514 { EASTEUROPE_CHARSET, "Tahoma" }, |
| 515 #endif |
| 512 { ARABIC_CHARSET, "Arial" }, | 516 { ARABIC_CHARSET, "Arial" }, |
| 513 { -1, NULL } | 517 { -1, NULL } |
| 514 }; | 518 }; |
| 515 | 519 |
| 516 CFX_ByteString CPWL_FontMap::GetDefaultFontByCharset(FX_INT32 nCharset) | 520 CFX_ByteString CPWL_FontMap::GetDefaultFontByCharset(FX_INT32 nCharset) |
| 517 { | 521 { |
| 518 int i = 0; | 522 int i = 0; |
| 519 while (defaultTTFMap[i].charset != -1) { | 523 while (defaultTTFMap[i].charset != -1) { |
| 520 if (nCharset == defaultTTFMap[i].charset) | 524 if (nCharset == defaultTTFMap[i].charset) |
| 521 return defaultTTFMap[i].fontname; | 525 return defaultTTFMap[i].fontname; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 } | 596 } |
| 593 | 597 |
| 594 CPWL_DocFontMap::~CPWL_DocFontMap() | 598 CPWL_DocFontMap::~CPWL_DocFontMap() |
| 595 { | 599 { |
| 596 } | 600 } |
| 597 | 601 |
| 598 CPDF_Document* CPWL_DocFontMap::GetDocument() | 602 CPDF_Document* CPWL_DocFontMap::GetDocument() |
| 599 { | 603 { |
| 600 return m_pAttachedDoc; | 604 return m_pAttachedDoc; |
| 601 } | 605 } |
| OLD | NEW |