Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC:

Wrong font displayed in document. 9 years 11 months ago #6125

  • LingvistonTheOne
  • LingvistonTheOne's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
Hello Radaee team!
We've bought reader license for uor application which must be released in the end of this week. During testing we've found out that there's at least one document where incorrect font is displyed. We need to get this issue fixed very soon. How can we contact with you for support (cause this definitly looks like a bug)?
The topic has been locked.

Wrong font displayed in document. 9 years 11 months ago #6128

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
This usually happens when the font is not embedded in the pdf, the SDK uses a default font to show the content,
If the font is already embedded, can you send us the pdf to test it..
The topic has been locked.

Wrong font displayed in document. 9 years 11 months ago #6129

  • LingvistonTheOne
  • LingvistonTheOne's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
Sure, can you give me email?
And by the way maybe I can change the default font for rendering by myself?
Last edit: by chetberry.
The topic has been locked.

Wrong font displayed in document. 9 years 11 months ago #6130

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
This email address is being protected from spambots. You need JavaScript enabled to view it.

for font check:
www.androidpdf.mobi/forum/Android-develo...-multiple-fonts#2903

put the fonts which used in PDF in assets folder, then import them in Global.Init function by this code:
load_std_font( "rdf013", assets, files );
...

then:
fontfileListAdd(fonts_path + fontfilename);

setDefaultFont(null, "DroidSans", true);
The topic has been locked.

Wrong font displayed in document. 9 years 11 months ago #6136

  • LingvistonTheOne
  • LingvistonTheOne's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
I've found out using Adobe Reader that problematic page has not embedded font Palatino-Roman. I've downloaded it from here font.downloadatoz.com/download,55787,pal...-th-for-windows.html (even if I need to pay for it I prefer first to check that it works) and added to assets folder as PR.ttf. And here's the code I added to Global.Init() function:

fontfileListStart();
// esisting code
fontfileListAdd("/system/fonts/DroidSans.ttf");
fontfileListAdd("/system/fonts/Roboto-Regular.ttf");
fontfileListAdd("/system/fonts/DroidSansFallback.ttf");
// added code
fontfileListAdd("/assets/PR.ttf");
fontfileListEnd();

setDefaultFont(null, "Palatino-Roman", true);
But it doesn't help me. Looks like I'm doing something wrong like using wrong font or declaring wrong fontfamily. I've already sent you the problematic page so maybe you can point at the mistake.
The topic has been locked.

Wrong font displayed in document. 9 years 11 months ago #6140

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
"/assets/PR.ttf" is a wrong path.
you shall: extract PR.ttf to sandbox, and then load it from sandbox.
just do like "rdf013" in assets
Last edit: by .
The topic has been locked.
  • Page:
  • 1
  • 2
Powered by Kunena Forum