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; |
} |
} |