- Posts: 10
- Thank you received: 0
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
Wrong font displayed in document.
- LingvistonTheOne
- Topic Author
- Offline
- New Member
-
Less
More
IP: 192.168.0.71
12 years 4 months ago #6125
by LingvistonTheOne
Wrong font displayed in document. was created by LingvistonTheOne
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)?
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)?
IP: 192.168.0.158
12 years 4 months ago #6128
by nermeen
Replied by nermeen on topic Wrong font displayed in document.
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..
If the font is already embedded, can you send us the pdf to test it..
- LingvistonTheOne
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 10
- Thank you received: 0
IP: 192.168.0.71
12 years 4 months ago - 12 years 4 months ago #6129
by LingvistonTheOne
Replied by LingvistonTheOne on topic Wrong font displayed in document.
Sure, can you give me email?
And by the way maybe I can change the default font for rendering by myself?
And by the way maybe I can change the default font for rendering by myself?
Last edit: 12 years 4 months ago by chetberry.
IP: 192.168.0.158
12 years 4 months ago #6130
by nermeen
Replied by nermeen on topic Wrong font displayed in document.
[email protected]
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);
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);
- LingvistonTheOne
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 10
- Thank you received: 0
IP: 192.168.0.71
12 years 4 months ago #6136
by LingvistonTheOne
Replied by LingvistonTheOne on topic Wrong font displayed in document.
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.
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.
IP: 192.168.0.71
12 years 4 months ago - 12 years 4 months ago #6140
by radaee
Replied by radaee on topic Wrong font displayed in document.
"/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
you shall: extract PR.ttf to sandbox, and then load it from sandbox.
just do like "rdf013" in assets
Last edit: 12 years 4 months ago by .
Time to create page: 0.429 seconds