Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

trouble with fallback fonts

More
IP: 37.183.44.177 8 years 3 weeks ago #14074 by support
Replied by support on topic trouble with fallback fonts
You already confirmed that the Radaee Reader is properly rendering files.
We've no information about your project and customization so it's not possible for us to understand what's going wrong with your modified code.
Have you double checked your asset and raw folder?
Are you distributing all the files like camp, map, etc?

An option could be to hire us for professional service, share your project and make us fix it.
More
IP: 97.115.135.13 8 years 3 weeks ago #14075 by arlomedia
I have two similar apps that use the Radaee library. Today I realized that all the user reports were from just one of the apps. I usually test with the other one, but I tested with this one and was finally able to see what my users are seeing. This is making a little more sense now. With this app on an Android 5 device, only embedded fonts appear, while on an Android 8 device, substitute fonts appear. With the other app, all fonts appear on both devices, the way it used to work before I upgraded the library. So it does seem that something is wrong with the included fonts just in one of my apps. However, I haven't been able to find what's different about them.

"Have you double checked your asset and raw folder?"

Yes, both apps have the same library version and the same raw files. I deleted the raw files from the problem app and copied them from the good app just to make sure, but that made no difference. I also looked inside the generated APK and the font files were there. As a test, I tried deleting all the raw files and then building the app, but it wouldn't build because the load_truetype_font() commands couldn't find the resources. So it seems like they are getting built into the app.

"Are you distributing all the files like camp, map, etc?"

I think I'm distributing all the files included in the ViewLib download. I compared the ViewLib folder in my two projects and they both have the same number of files. Is there a particular file I should check?

I'm attaching a screen shot showing my two apps side by side. The raw folders are the same. I also diffed the Global.java files, and they are the same except my license code. What other files or settings control whether the fonts are included in the app?

Regarding app customizations, these should also be the same between the two apps, and they involve adding some additional page turning controls in files like PDFLayoutView and PDFLayout. I don't think these customizations would affect the rendering of the fonts.
More
IP: 97.115.135.13 8 years 2 weeks ago #14077 by arlomedia
Can anyone help with this? I feel like I'm close to solving it, but I don't know how to tell why the provided fonts aren't available in one of my two apps.
More
IP: 111.196.245.2 8 years 2 weeks ago #14078 by radaee
Replied by radaee on topic trouble with fallback fonts
Hi, can you supply codes for Global.Init()?
i think you may load fonts from system, not from assets
More
IP: 97.115.135.13 8 years 2 weeks ago #14080 by arlomedia
I'm attaching my Global.java file here. (I removed my license code.)
More
IP: 111.196.245.2 8 years 2 weeks ago #14081 by radaee
Replied by radaee on topic trouble with fallback fonts
the attached screenshot is too small.
if the app have no permission to access sdcard(external storage).
fonts can't extract to sdcard, and will load fonts failed.

more codes may help you:
Global.java there is codes:
String face_name = null;
int face_first = 0;
int face_count = getFaceCount();
while (face_first < face_count)
{
face_name = getFaceName(face_first);
//Log.d("
Fonts
", "----face name = " + face_name);
if (face_name != null) break;
face_first++;
}

modify: "//Log.d(...);"
to: "Log.e(...);"
this way, you can see all fonts loaded, under Android 5, which can't display unembed fonts.
Time to create page: 0.388 seconds
Powered by Kunena Forum