[General Questions and Answers] mukundzg:
I am using Coolreader as an epubviewer, and it is working fine till kitkat, but when i installed the same in Lollypop, chinese characters are showing as '?'. I went through the Sourcecode of the coolreader application and got this page

I cannot post that link here but i will post the code here

private boolean applyDefaultFont(Properties props, String propName, String defFontFace) {

String currentValue = props.getProperty(propName);

boolean changed = false;

if (currentValue == null) {

currentValue = defFontFace;

changed = true;

}

if (!isValidFontFace(currentValue)) {

if (isValidFontFace("Droid Sans"))

currentValue = "Droid Sans";

else if (isValidFontFace("Roboto"))

currentValue = "Roboto";

else if (isValidFontFace("Droid Serif"))

currentValue = "Droid Serif";

else if (isValidFontFace("Arial"))

currentValue = "Arial";

else if (isValidFontFace("Times New Roman"))

currentValue = "Times New Roman";

else if (isValidFontFace("Droid Sans Fallback"))

currentValue = "Droid Sans Fallback";

else {

String[] fontFaces = Engine.getFontFaceList();

if (fontFaces != null)

currentValue = fontFaces[0];

}

changed = true;

}

if (changed)

props.setProperty(propName, currentValue);

return changed;

}

public boolean fixFontSettings(Properties props) {

boolean res = false;

res = applyDefaultFont(props, ReaderView.PROP_FONT_FACE, DeviceInfo.DEF_FONT_FACE) || res;

res = applyDefaultFont(props, ReaderView.PROP_STATUS_FONT_FACE, DeviceInfo.DEF_FONT_FACE) || res;

res = applyDefaultFont(props, ReaderView.PROP_FALLBACK_FONT_FACE, "Droid Sans Fallback") || res;

return res;

}

in line 1403 to 1444' I found something related to fonts, they have hard coded 5 fonts and below they have set '"Droid Sans Fallback " as default fallback font. I inspected /system/fonts in my emulator working in 5.1 and found out even if there is "Droid Sans Fallback" and other fonts are there only these fonts are coming in the applications font selector

fonts in /systems/fonts in 5.1

cosmic gothic SC

comming soon

cutive mono

Dancing script

Droid sans mono

motoyalmaru

nanumgothic

noto sans myanmar

noto sans myanmar UI

noto serif

roboto

Roboto condensed

fonts 4.4.4 in systems/fonts

Droid Naskh Shift Alt

Droid Sans Fallback

Droid sans mono

droid serif

Motoyalmaru

NamumGothic

Padauk book

Roboto

Roboto Condensed

Now see my observations, in 4.4.4, I tried all the fonts and in all the fonts the chinese characters are loading correctly

In 5.1.0 I tried all the available fonts but chinese characters are not loading in any of it, always ?

Then i took a copy of Droid Sans Fallback from 4.4.4 and pasted it in system/fonts in 5.1 then the droid sans fallback font appeard in font list of Coolreader, before , even though it exixted in system/fonts of 5.1, it was not appearing in the fonts list of coolreader. Then i selected it and i could see chinese characters.

My question is in 4.4.4 all the fonts are loading chinese, but in 5.1.0, even though there are more fonts in the list none are loading chinese, So it must be something else which is causing the problem.

I tired another reader called fb reader and it is showing chinese the funny part is that it has got ont 3 fonts in its fontslist, Droid sans, droid serif and droid mono.

I almost created an app using cool reader and the same thing is haunting me please help

Is lollypop no compactable with chinese in epub reader

:crying::crying: