Chromium Code Reviews| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "core/include/fxge/fx_freetype.h" | 9 #include "core/include/fxge/fx_freetype.h" |
| 10 #include "core/include/fxge/fx_ge.h" | 10 #include "core/include/fxge/fx_ge.h" |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1045 } | 1045 } |
| 1046 } | 1046 } |
| 1047 } else { | 1047 } else { |
| 1048 italic_angle = 0; | 1048 italic_angle = 0; |
| 1049 weight = | 1049 weight = |
| 1050 nStyle & FX_FONT_STYLE_BoldBold | 1050 nStyle & FX_FONT_STYLE_BoldBold |
| 1051 ? 900 | 1051 ? 900 |
| 1052 : (nStyle & FX_FONT_STYLE_Bold ? FXFONT_FW_BOLD : FXFONT_FW_NORMAL); | 1052 : (nStyle & FX_FONT_STYLE_Bold ? FXFONT_FW_BOLD : FXFONT_FW_NORMAL); |
| 1053 } | 1053 } |
| 1054 if (!match.IsEmpty() || iBaseFont < 12) { | 1054 if (!match.IsEmpty() || iBaseFont < 12) { |
| 1055 pSubstFont->m_SubstFlags |= FXFONT_SUBST_EXACT; | |
|
jun_fang
2015/12/06 11:37:57
FXFONT_SUBST_EXACT should be set at line 1083 afte
Tom Sepez
2015/12/07 23:54:27
Acknowledged.
| |
| 1056 if (!match.IsEmpty()) { | 1055 if (!match.IsEmpty()) { |
| 1057 family = match; | 1056 family = match; |
| 1058 } | 1057 } |
| 1059 if (iBaseFont < 12) { | 1058 if (iBaseFont < 12) { |
| 1060 if (nStyle && !(iBaseFont % 4)) { | 1059 if (nStyle && !(iBaseFont % 4)) { |
| 1061 if ((nStyle & 0x3) == 1) { | 1060 if ((nStyle & 0x3) == 1) { |
| 1062 iBaseFont += 1; | 1061 iBaseFont += 1; |
| 1063 } | 1062 } |
| 1064 if ((nStyle & 0x3) == 2) { | 1063 if ((nStyle & 0x3) == 2) { |
| 1065 iBaseFont += 3; | 1064 iBaseFont += 3; |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1491 int PDF_GetStandardFontName(CFX_ByteString* name) { | 1490 int PDF_GetStandardFontName(CFX_ByteString* name) { |
| 1492 AltFontName* found = static_cast<AltFontName*>( | 1491 AltFontName* found = static_cast<AltFontName*>( |
| 1493 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), | 1492 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), |
| 1494 sizeof(AltFontName), CompareString)); | 1493 sizeof(AltFontName), CompareString)); |
| 1495 if (!found) | 1494 if (!found) |
| 1496 return -1; | 1495 return -1; |
| 1497 | 1496 |
| 1498 *name = g_Base14FontNames[found->m_Index]; | 1497 *name = g_Base14FontNames[found->m_Index]; |
| 1499 return found->m_Index; | 1498 return found->m_Index; |
| 1500 } | 1499 } |
| OLD | NEW |