| 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/cttfontdesc.h" | 7 #include "core/fxge/ge/cttfontdesc.h" |
| 8 | 8 |
| 9 #include "core/fxge/include/fx_freetype.h" | 9 #include "core/fxge/fx_freetype.h" |
| 10 | 10 |
| 11 CTTFontDesc::~CTTFontDesc() { | 11 CTTFontDesc::~CTTFontDesc() { |
| 12 if (m_Type == 1) { | 12 if (m_Type == 1) { |
| 13 if (m_SingleFace.m_pFace) | 13 if (m_SingleFace.m_pFace) |
| 14 FXFT_Done_Face(m_SingleFace.m_pFace); | 14 FXFT_Done_Face(m_SingleFace.m_pFace); |
| 15 } else if (m_Type == 2) { | 15 } else if (m_Type == 2) { |
| 16 for (int i = 0; i < 16; i++) { | 16 for (int i = 0; i < 16; i++) { |
| 17 if (m_TTCFace.m_pFaces[i]) | 17 if (m_TTCFace.m_pFaces[i]) |
| 18 FXFT_Done_Face(m_TTCFace.m_pFaces[i]); | 18 FXFT_Done_Face(m_TTCFace.m_pFaces[i]); |
| 19 } | 19 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 if (i == 16) | 34 if (i == 16) |
| 35 return -1; | 35 return -1; |
| 36 } | 36 } |
| 37 m_RefCount--; | 37 m_RefCount--; |
| 38 if (m_RefCount) | 38 if (m_RefCount) |
| 39 return m_RefCount; | 39 return m_RefCount; |
| 40 delete this; | 40 delete this; |
| 41 return 0; | 41 return 0; |
| 42 } | 42 } |
| OLD | NEW |