| 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 "fpdfsdk/include/fsdk_mgr.h" | 7 #include "fpdfsdk/include/fsdk_mgr.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 return FALSE; | 179 return FALSE; |
| 180 | 180 |
| 181 CFX_FontMapper* pFontMapper = pFontMgr->GetBuiltinMapper(); | 181 CFX_FontMapper* pFontMapper = pFontMgr->GetBuiltinMapper(); |
| 182 if (!pFontMapper) | 182 if (!pFontMapper) |
| 183 return FALSE; | 183 return FALSE; |
| 184 | 184 |
| 185 if (pFontMapper->m_InstalledTTFonts.empty()) | 185 if (pFontMapper->m_InstalledTTFonts.empty()) |
| 186 pFontMapper->LoadInstalledFonts(); | 186 pFontMapper->LoadInstalledFonts(); |
| 187 | 187 |
| 188 for (const auto& font : pFontMapper->m_InstalledTTFonts) { | 188 for (const auto& font : pFontMapper->m_InstalledTTFonts) { |
| 189 if (font.Compare(sFontFaceName)) | 189 if (font.Compare(sFontFaceName.AsByteStringC())) |
| 190 return TRUE; | 190 return TRUE; |
| 191 } | 191 } |
| 192 | 192 |
| 193 return FALSE; | 193 return FALSE; |
| 194 } | 194 } |
| 195 | 195 |
| 196 CPDF_Font* CFX_SystemHandler::AddNativeTrueTypeFontToPDF( | 196 CPDF_Font* CFX_SystemHandler::AddNativeTrueTypeFontToPDF( |
| 197 CPDF_Document* pDoc, | 197 CPDF_Document* pDoc, |
| 198 CFX_ByteString sFontFaceName, | 198 CFX_ByteString sFontFaceName, |
| 199 uint8_t nCharset) { | 199 uint8_t nCharset) { |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); | 1199 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); |
| 1200 if (!pFocusAnnot) | 1200 if (!pFocusAnnot) |
| 1201 return nullptr; | 1201 return nullptr; |
| 1202 | 1202 |
| 1203 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { | 1203 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { |
| 1204 if (pAnnot == pFocusAnnot) | 1204 if (pAnnot == pFocusAnnot) |
| 1205 return pAnnot; | 1205 return pAnnot; |
| 1206 } | 1206 } |
| 1207 return nullptr; | 1207 return nullptr; |
| 1208 } | 1208 } |
| OLD | NEW |