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

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

Issue 294353002: Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters represe… (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Patch Set after rebase Created 6 years, 7 months 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 | « core/src/fxcrt/fx_basic_coords.cpp ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('j') | 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 "fx_fpf.h" 7 #include "fx_fpf.h"
8 #if _FX_OS_ == _FX_ANDROID_ 8 #if _FX_OS_ == _FX_ANDROID_
9 #define FPF_SKIAMATCHWEIGHT_NAME1 62 9 #define FPF_SKIAMATCHWEIGHT_NAME1 62
10 #define FPF_SKIAMATCHWEIGHT_NAME2 60 10 #define FPF_SKIAMATCHWEIGHT_NAME2 60
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 void CFPF_SkiaFontMgr::LoadPrivateFont(FX_BSTR bsFileName) 276 void CFPF_SkiaFontMgr::LoadPrivateFont(FX_BSTR bsFileName)
277 { 277 {
278 } 278 }
279 void CFPF_SkiaFontMgr::LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer) 279 void CFPF_SkiaFontMgr::LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer)
280 { 280 {
281 } 281 }
282 IFPF_Font* CFPF_SkiaFontMgr::CreateFont(FX_BSTR bsFamilyname, FX_BYTE uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch) 282 IFPF_Font* CFPF_SkiaFontMgr::CreateFont(FX_BSTR bsFamilyname, FX_BYTE uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch)
283 { 283 {
284 FX_DWORD dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset); 284 FX_DWORD dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset);
285 IFPF_Font *pFont = NULL; 285 IFPF_Font *pFont = NULL;
286 if (m_FamilyFonts.Lookup((void*)dwHash, (void*&)pFont)) { 286 if (m_FamilyFonts.Lookup((void*)(FX_UINTPTR)dwHash, (void*&)pFont)) {
287 if (pFont) { 287 if (pFont) {
288 return pFont->Retain(); 288 return pFont->Retain();
289 } 289 }
290 } 290 }
291 FX_DWORD dwFaceName = FPF_SKIANormalizeFontName(bsFamilyname); 291 FX_DWORD dwFaceName = FPF_SKIANormalizeFontName(bsFamilyname);
292 FX_DWORD dwSubst = FPF_SkiaGetSubstFont(dwFaceName); 292 FX_DWORD dwSubst = FPF_SkiaGetSubstFont(dwFaceName);
293 FX_DWORD dwSubstSans = FPF_SkiaGetSansFont(dwFaceName); 293 FX_DWORD dwSubstSans = FPF_SkiaGetSansFont(dwFaceName);
294 FX_BOOL bMaybeSymbol = FPF_SkiaMaybeSymbol(bsFamilyname); 294 FX_BOOL bMaybeSymbol = FPF_SkiaMaybeSymbol(bsFamilyname);
295 if (uCharset != FXFONT_ARABIC_CHARSET && FPF_SkiaMaybeArabic(bsFamilyname)) { 295 if (uCharset != FXFONT_ARABIC_CHARSET && FPF_SkiaMaybeArabic(bsFamilyname)) {
296 uCharset = FXFONT_ARABIC_CHARSET; 296 uCharset = FXFONT_ARABIC_CHARSET;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 if (nExpectVal <= nFind) { 348 if (nExpectVal <= nFind) {
349 nItem = i; 349 nItem = i;
350 break; 350 break;
351 } 351 }
352 } 352 }
353 if (nItem > -1) { 353 if (nItem > -1) {
354 CFPF_SkiaFontDescriptor *pFontDes = (CFPF_SkiaFontDescriptor*)m_FontFace s.ElementAt(nItem); 354 CFPF_SkiaFontDescriptor *pFontDes = (CFPF_SkiaFontDescriptor*)m_FontFace s.ElementAt(nItem);
355 CFPF_SkiaFont *pFont = FX_NEW CFPF_SkiaFont; 355 CFPF_SkiaFont *pFont = FX_NEW CFPF_SkiaFont;
356 if (pFont) { 356 if (pFont) {
357 if (pFont->InitFont(this, pFontDes, bsFamilyname, dwStyle, uCharset) ) { 357 if (pFont->InitFont(this, pFontDes, bsFamilyname, dwStyle, uCharset) ) {
358 m_FamilyFonts.SetAt((void*)dwHash, (void*)pFont); 358 m_FamilyFonts.SetAt((void*)(FX_UINTPTR)dwHash, (void*)pFont);
359 return pFont->Retain(); 359 return pFont->Retain();
360 } 360 }
361 pFont->Release(); 361 pFont->Release();
362 pFont = NULL; 362 pFont = NULL;
363 } 363 }
364 return pFont; 364 return pFont;
365 } 365 }
366 return NULL; 366 return NULL;
367 } 367 }
368 FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead *pFileRead, FX_INT32 iFaceI ndex) 368 FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead *pFileRead, FX_INT32 iFaceI ndex)
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; 552 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC;
553 } 553 }
554 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); 554 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2);
555 pFontDesc->m_iFaceIndex = face->face_index; 555 pFontDesc->m_iFaceIndex = face->face_index;
556 pFontDesc->m_iGlyphNum = face->num_glyphs; 556 pFontDesc->m_iGlyphNum = face->num_glyphs;
557 } 557 }
558 void CFPF_SkiaFontMgr::OutputSystemFonts() 558 void CFPF_SkiaFontMgr::OutputSystemFonts()
559 { 559 {
560 } 560 }
561 #endif 561 #endif
OLDNEW
« no previous file with comments | « core/src/fxcrt/fx_basic_coords.cpp ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698