trouble with fallback fonts - Page 2 - RadaeePDF.com - Results from #6
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF

TOPIC: trouble with fallback fonts

trouble with fallback fonts 2 months 2 weeks ago #14074

  • support
  • support's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
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.

Please Log in or Create an account to join the conversation.

trouble with fallback fonts 2 months 2 weeks ago #14075

  • arlomedia
  • arlomedia's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 43
  • Thank you received: 1
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.
Attachments:

Please Log in or Create an account to join the conversation.

trouble with fallback fonts 2 months 1 week ago #14077

  • arlomedia
  • arlomedia's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 43
  • Thank you received: 1
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.

Please Log in or Create an account to join the conversation.

trouble with fallback fonts 2 months 1 week ago #14078

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
Hi, can you supply codes for Global.Init()?
i think you may load fonts from system, not from assets

Please Log in or Create an account to join the conversation.

trouble with fallback fonts 2 months 1 week ago #14080

  • arlomedia
  • arlomedia's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 43
  • Thank you received: 1
I'm attaching my Global.java file here. (I removed my license code.)
Attachments:

Please Log in or Create an account to join the conversation.

trouble with fallback fonts 2 months 1 week ago #14081

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
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.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum