Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: core/src/fxge/android/fpf_skiafontmgr.cpp

Issue 1476173003: Android: look for OTF files as well as TTF and TTC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/include/fxcrt/fx_ext.h" 7 #include "core/include/fxcrt/fx_ext.h"
8 #include "fx_fpf.h" 8 #include "fx_fpf.h"
9 9
10 #if _FX_OS_ == _FX_ANDROID_ 10 #if _FX_OS_ == _FX_ANDROID_
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 CFX_ByteString filename; 415 CFX_ByteString filename;
416 FX_BOOL bFolder = FALSE; 416 FX_BOOL bFolder = FALSE;
417 while (FX_GetNextFile(handle, filename, bFolder)) { 417 while (FX_GetNextFile(handle, filename, bFolder)) {
418 if (bFolder) { 418 if (bFolder) {
419 if (filename == FX_BSTRC(".") || filename == FX_BSTRC("..")) { 419 if (filename == FX_BSTRC(".") || filename == FX_BSTRC("..")) {
420 continue; 420 continue;
421 } 421 }
422 } else { 422 } else {
423 CFX_ByteString ext = filename.Right(4); 423 CFX_ByteString ext = filename.Right(4);
424 ext.MakeLower(); 424 ext.MakeLower();
425 if (ext != FX_BSTRC(".ttf") && ext != FX_BSTRC(".ttc")) { 425 if (ext != FX_BSTRC(".ttf") && ext != FX_BSTRC(".ttc") &&
426 ext != FX_BSTRC(".otf")) {
426 continue; 427 continue;
427 } 428 }
428 } 429 }
429 CFX_ByteString fullpath = path; 430 CFX_ByteString fullpath = path;
430 fullpath += "/"; 431 fullpath += "/";
431 fullpath += filename; 432 fullpath += filename;
432 if (bFolder) { 433 if (bFolder) {
433 ScanPath(fullpath); 434 ScanPath(fullpath);
434 } else { 435 } else {
435 ScanFile(fullpath); 436 ScanFile(fullpath);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 } 523 }
523 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) { 524 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) {
524 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; 525 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC;
525 } 526 }
526 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); 527 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2);
527 pFontDesc->m_iFaceIndex = face->face_index; 528 pFontDesc->m_iFaceIndex = face->face_index;
528 pFontDesc->m_iGlyphNum = face->num_glyphs; 529 pFontDesc->m_iGlyphNum = face->num_glyphs;
529 } 530 }
530 void CFPF_SkiaFontMgr::OutputSystemFonts() {} 531 void CFPF_SkiaFontMgr::OutputSystemFonts() {}
531 #endif 532 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698