| 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.h> | 7 #include <limits.h> |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" | 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" |
| 10 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" | 10 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 CPDF_Array* pWidths = new CPDF_Array; | 347 CPDF_Array* pWidths = new CPDF_Array; |
| 348 for (int i = 0; i < 224; i++) { | 348 for (int i = 0; i < 224; i++) { |
| 349 pWidths->AddInteger(char_widths[i]); | 349 pWidths->AddInteger(char_widths[i]); |
| 350 } | 350 } |
| 351 pBaseDict->SetAt("Widths", pWidths); | 351 pBaseDict->SetAt("Widths", pWidths); |
| 352 } else { | 352 } else { |
| 353 flags |= PDFFONT_NONSYMBOLIC; | 353 flags |= PDFFONT_NONSYMBOLIC; |
| 354 pFontDict = new CPDF_Dictionary; | 354 pFontDict = new CPDF_Dictionary; |
| 355 CFX_ByteString cmap; | 355 CFX_ByteString cmap; |
| 356 CFX_ByteString ordering; | 356 CFX_ByteString ordering; |
| 357 int supplement; | 357 int supplement = 0; |
| 358 CPDF_Array* pWidthArray = new CPDF_Array; | 358 CPDF_Array* pWidthArray = new CPDF_Array; |
| 359 switch (pLogFont->lfCharSet) { | 359 switch (pLogFont->lfCharSet) { |
| 360 case CHINESEBIG5_CHARSET: | 360 case CHINESEBIG5_CHARSET: |
| 361 cmap = bVert ? "ETenms-B5-V" : "ETenms-B5-H"; | 361 cmap = bVert ? "ETenms-B5-V" : "ETenms-B5-H"; |
| 362 ordering = "CNS1"; | 362 ordering = "CNS1"; |
| 363 supplement = 4; | 363 supplement = 4; |
| 364 pWidthArray->AddInteger(1); | 364 pWidthArray->AddInteger(1); |
| 365 _InsertWidthArray(hDC, 0x20, 0x7e, pWidthArray); | 365 _InsertWidthArray(hDC, 0x20, 0x7e, pWidthArray); |
| 366 break; | 366 break; |
| 367 case GB2312_CHARSET: | 367 case GB2312_CHARSET: |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict, | 1150 void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict, |
| 1151 const CFX_ByteStringC& name) { | 1151 const CFX_ByteStringC& name) { |
| 1152 if (pPageDict->KeyExist(name)) { | 1152 if (pPageDict->KeyExist(name)) { |
| 1153 return; | 1153 return; |
| 1154 } | 1154 } |
| 1155 CPDF_Object* pObj = FPDFAPI_GetPageAttr(pPageDict, name); | 1155 CPDF_Object* pObj = FPDFAPI_GetPageAttr(pPageDict, name); |
| 1156 if (pObj) { | 1156 if (pObj) { |
| 1157 pPageDict->SetAt(name, pObj->Clone()); | 1157 pPageDict->SetAt(name, pObj->Clone()); |
| 1158 } | 1158 } |
| 1159 } | 1159 } |
| OLD | NEW |