Knowledge Base and examples

Knowledge Base - Wrong non latin fonts rendering on Android 5.x

Google removed DroidSansFallback font from their devices (checked on Nexus 5, Nexus 7, Nexus 9) running Android 5.x.
That font is adopted as default rendering font when a PDF file isn't properly embedding the used font.

The more affected rendering feature is when PDF file include Japanese, Chinese, Korean and other non Latin charset.

If you need to render such kind of document and can't embed all the needed fonts within the PDF files themselves, you should include DroidSansFallback font as raw resources in your own project (name it ViewLib\res\raw\droidsansfallback).

After that you should add this code in Init method of Global.java, between fontfileListStart(); and fontfileListEnd();
Replace:
  fontfileListAdd("/system/fonts/DroidSansFallback.ttf");
with:
  load_truetype_font(res, R.raw.droidsansfallbacknew File(files, "droidsansfallback.ttf"));


You could download a copy of DroidSansFallback font from here https://code.google.com/p/galaxy-nexus-khmer/downloads/list. It's licensed under Apache 2.0.

Applies To

RadaeePDF SDK for Android

Details

Created : 2015-06-08 12:58:22, Last Modified : 2017-02-27 13:54:46