Android custom font is created wrong -


the user can choose between different fonts in app.

the typeface created in code:

public static typeface gettypeface(context context, string assetpath) {     synchronized (cache) {         if (!cache.containskey(assetpath)) {             try {                 typeface typeface = typeface.createfromasset(                         context.getassets(), assetpath);                 cache.put(assetpath, typeface);             } catch (exception e) {                 return null;             }         }         return cache.get(assetpath);     } } 

the typeface created without error in android >5.0 typeface wrong...

when use app android 4.4.2 os created correct.

the font creates trouble one:

http://www.dafont.com/julius-thyssen.font

any ideas how handle this?


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -