This commit is contained in:
kunfei 2022-01-27 19:32:24 +08:00
parent 3feeeb8d5b
commit 9c6949186c

View File

@ -456,6 +456,7 @@ interface JsExtensions {
*/
fun queryTTF(str: String?): QueryTTF? {
str ?: return null
try {
val key = md5Encode16(str)
var qTTF = CacheManager.getQueryTTF(key)
if (qTTF != null) return qTTF
@ -478,6 +479,10 @@ interface JsExtensions {
qTTF = QueryTTF(font)
CacheManager.put(key, qTTF)
return qTTF
} catch (e: Exception) {
Timber.e(e, "获取字体处理类出错")
throw e
}
}
/**