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/fpdfapi/fpdf_page.h" | 7 #include "../../../include/fpdfapi/fpdf_page.h" |
8 #include "../../../include/fpdfapi/fpdf_module.h" | 8 #include "../../../include/fpdfapi/fpdf_module.h" |
9 #include "../../../include/fpdfapi/fpdf_pageobj.h" | 9 #include "../../../include/fpdfapi/fpdf_pageobj.h" |
10 #include "font_int.h" | 10 #include "font_int.h" |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 LoadGlyphMap(); | 988 LoadGlyphMap(); |
989 if (m_pCharNames) { | 989 if (m_pCharNames) { |
990 FX_DELETE_VECTOR(m_pCharNames, CFX_ByteString, 256); | 990 FX_DELETE_VECTOR(m_pCharNames, CFX_ByteString, 256); |
991 m_pCharNames = NULL; | 991 m_pCharNames = NULL; |
992 } | 992 } |
993 if (m_Font.m_Face == NULL) { | 993 if (m_Font.m_Face == NULL) { |
994 return TRUE; | 994 return TRUE; |
995 } | 995 } |
996 if (m_Flags & PDFFONT_ALLCAP) { | 996 if (m_Flags & PDFFONT_ALLCAP) { |
997 unsigned char lowercases[] = {'a', 'z', 0xe0, 0xf6, 0xf8, 0xfd}; | 997 unsigned char lowercases[] = {'a', 'z', 0xe0, 0xf6, 0xf8, 0xfd}; |
998 for (int range = 0; range < sizeof lowercases / 2; range ++) { | 998 for (size_t range = 0; range < sizeof lowercases / 2; range ++) { |
999 for (int i = lowercases[range * 2]; i <= lowercases[range * 2 + 1];
i ++) { | 999 for (int i = lowercases[range * 2]; i <= lowercases[range * 2 + 1];
i ++) { |
1000 if (m_GlyphIndex[i] != 0xffff && m_pFontFile != NULL) { | 1000 if (m_GlyphIndex[i] != 0xffff && m_pFontFile != NULL) { |
1001 continue; | 1001 continue; |
1002 } | 1002 } |
1003 m_GlyphIndex[i] = m_GlyphIndex[i - 32]; | 1003 m_GlyphIndex[i] = m_GlyphIndex[i - 32]; |
1004 if (m_CharWidth[i - 32]) { | 1004 if (m_CharWidth[i - 32]) { |
1005 m_CharWidth[i] = m_CharWidth[i - 32]; | 1005 m_CharWidth[i] = m_CharWidth[i - 32]; |
1006 m_CharBBox[i] = m_CharBBox[i - 32]; | 1006 m_CharBBox[i] = m_CharBBox[i - 32]; |
1007 } | 1007 } |
1008 } | 1008 } |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 } | 1761 } |
1762 CPDF_Type3Char::~CPDF_Type3Char() | 1762 CPDF_Type3Char::~CPDF_Type3Char() |
1763 { | 1763 { |
1764 if (m_pForm) { | 1764 if (m_pForm) { |
1765 delete m_pForm; | 1765 delete m_pForm; |
1766 } | 1766 } |
1767 if (m_pBitmap) { | 1767 if (m_pBitmap) { |
1768 delete m_pBitmap; | 1768 delete m_pBitmap; |
1769 } | 1769 } |
1770 } | 1770 } |
OLD | NEW |