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

Unified Diff: core/fxge/android/fpf_skiafontmgr.cpp

Issue 2101723002: Fix a regression from commit f3e6851. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/android/fpf_skiafontmgr.cpp
diff --git a/core/fxge/android/fpf_skiafontmgr.cpp b/core/fxge/android/fpf_skiafontmgr.cpp
index fb5b686a87c752c6f3e5170694f8d998ed43a36c..0a1317ec0fbe020281af25dfb20920613b2dcf4e 100644
--- a/core/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/fxge/android/fpf_skiafontmgr.cpp
@@ -306,19 +306,19 @@ CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname,
if (uCharset == FXFONT_DEFAULT_CHARSET || bMaybeSymbol) {
if (nFind > nMax && bMatchedName) {
nMax = nFind;
- nItem = it - m_FontFaces.rbegin();
+ nItem = m_FontFaces.rend() - it - 1;
olsen 2016/06/28 00:53:18 This will work, but it is prone to the same type o
Lei Zhang 2016/06/28 01:11:26 Done.
}
} else if (FPF_SkiaIsCJK(uCharset)) {
if (bMatchedName || pFontDes->m_iGlyphNum > nGlyphNum) {
- nItem = it - m_FontFaces.rbegin();
+ nItem = m_FontFaces.rend() - it - 1;
nGlyphNum = pFontDes->m_iGlyphNum;
}
} else if (nFind > nMax) {
nMax = nFind;
- nItem = it - m_FontFaces.rbegin();
+ nItem = m_FontFaces.rend() - it - 1;
}
if (nExpectVal <= nFind) {
- nItem = it - m_FontFaces.rbegin();
+ nItem = m_FontFaces.rend() - it - 1;
break;
}
}
« 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