| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/fxge/ge/cfx_folderfontinfo.h" | 7 #include "core/fxge/ge/cfx_folderfontinfo.h" |
| 8 | 8 |
| 9 #include "core/fxge/include/cfx_fontmapper.h" | 9 #include "core/fxge/include/cfx_fontmapper.h" |
| 10 #include "core/fxge/include/fx_font.h" | 10 #include "core/fxge/include/fx_font.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 uint32_t GetCharset(int charset) { | 58 uint32_t GetCharset(int charset) { |
| 59 switch (charset) { | 59 switch (charset) { |
| 60 case FXFONT_SHIFTJIS_CHARSET: | 60 case FXFONT_SHIFTJIS_CHARSET: |
| 61 return CHARSET_FLAG_SHIFTJIS; | 61 return CHARSET_FLAG_SHIFTJIS; |
| 62 case FXFONT_GB2312_CHARSET: | 62 case FXFONT_GB2312_CHARSET: |
| 63 return CHARSET_FLAG_GB; | 63 return CHARSET_FLAG_GB; |
| 64 case FXFONT_CHINESEBIG5_CHARSET: | 64 case FXFONT_CHINESEBIG5_CHARSET: |
| 65 return CHARSET_FLAG_BIG5; | 65 return CHARSET_FLAG_BIG5; |
| 66 case FXFONT_HANGEUL_CHARSET: | 66 case FXFONT_HANGUL_CHARSET: |
| 67 return CHARSET_FLAG_KOREAN; | 67 return CHARSET_FLAG_KOREAN; |
| 68 case FXFONT_SYMBOL_CHARSET: | 68 case FXFONT_SYMBOL_CHARSET: |
| 69 return CHARSET_FLAG_SYMBOL; | 69 return CHARSET_FLAG_SYMBOL; |
| 70 case FXFONT_ANSI_CHARSET: | 70 case FXFONT_ANSI_CHARSET: |
| 71 return CHARSET_FLAG_ANSI; | 71 return CHARSET_FLAG_ANSI; |
| 72 default: | 72 default: |
| 73 break; | 73 break; |
| 74 } | 74 } |
| 75 return 0; | 75 return 0; |
| 76 } | 76 } |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 if (codepages & (1 << 18)) { | 233 if (codepages & (1 << 18)) { |
| 234 m_pMapper->AddInstalledFont(facename, FXFONT_GB2312_CHARSET); | 234 m_pMapper->AddInstalledFont(facename, FXFONT_GB2312_CHARSET); |
| 235 pInfo->m_Charsets |= CHARSET_FLAG_GB; | 235 pInfo->m_Charsets |= CHARSET_FLAG_GB; |
| 236 } | 236 } |
| 237 if (codepages & (1 << 20)) { | 237 if (codepages & (1 << 20)) { |
| 238 m_pMapper->AddInstalledFont(facename, FXFONT_CHINESEBIG5_CHARSET); | 238 m_pMapper->AddInstalledFont(facename, FXFONT_CHINESEBIG5_CHARSET); |
| 239 pInfo->m_Charsets |= CHARSET_FLAG_BIG5; | 239 pInfo->m_Charsets |= CHARSET_FLAG_BIG5; |
| 240 } | 240 } |
| 241 if ((codepages & (1 << 19)) || (codepages & (1 << 21))) { | 241 if ((codepages & (1 << 19)) || (codepages & (1 << 21))) { |
| 242 m_pMapper->AddInstalledFont(facename, FXFONT_HANGEUL_CHARSET); | 242 m_pMapper->AddInstalledFont(facename, FXFONT_HANGUL_CHARSET); |
| 243 pInfo->m_Charsets |= CHARSET_FLAG_KOREAN; | 243 pInfo->m_Charsets |= CHARSET_FLAG_KOREAN; |
| 244 } | 244 } |
| 245 if (codepages & (1 << 31)) { | 245 if (codepages & (1 << 31)) { |
| 246 m_pMapper->AddInstalledFont(facename, FXFONT_SYMBOL_CHARSET); | 246 m_pMapper->AddInstalledFont(facename, FXFONT_SYMBOL_CHARSET); |
| 247 pInfo->m_Charsets |= CHARSET_FLAG_SYMBOL; | 247 pInfo->m_Charsets |= CHARSET_FLAG_SYMBOL; |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 m_pMapper->AddInstalledFont(facename, FXFONT_ANSI_CHARSET); | 250 m_pMapper->AddInstalledFont(facename, FXFONT_ANSI_CHARSET); |
| 251 pInfo->m_Charsets |= CHARSET_FLAG_ANSI; | 251 pInfo->m_Charsets |= CHARSET_FLAG_ANSI; |
| 252 pInfo->m_Styles = 0; | 252 pInfo->m_Styles = 0; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 if (!hFont) | 368 if (!hFont) |
| 369 return FALSE; | 369 return FALSE; |
| 370 CFX_FontFaceInfo* pFont = (CFX_FontFaceInfo*)hFont; | 370 CFX_FontFaceInfo* pFont = (CFX_FontFaceInfo*)hFont; |
| 371 name = pFont->m_FaceName; | 371 name = pFont->m_FaceName; |
| 372 return TRUE; | 372 return TRUE; |
| 373 } | 373 } |
| 374 | 374 |
| 375 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) { | 375 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) { |
| 376 return FALSE; | 376 return FALSE; |
| 377 } | 377 } |
| OLD | NEW |