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

TOPIC:

Issue while rendering text in Android OS 5.0 9 years 2 months ago #8434

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 692
  • Thank you received: 59
It's seems are an issue about font encoding.
Which font are you using?
May you past the font declaration from you source code?
May you past the text that should appear in that box?

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

Issue while rendering text in Android OS 5.0 9 years 2 months ago #8435

  • arcmobile.div
  • arcmobile.div's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 80
  • Thank you received: 0
i> Am using the PDFReader 3,2 and didnot set any default font.
ii>Text that should appear on the textbox: "test"
iii> If required I can set the default font , using setDefaultFont(collection, fontname, fixed) but I didnot implement that.

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

Last edit: by arcmobile.div.

Issue while rendering text in Android OS 5.0 9 years 2 months ago #8436

  • arcmobile.div
  • arcmobile.div's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 80
  • Thank you received: 0
Any update on the issue.

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

Issue while rendering text in Android OS 5.0 9 years 2 months ago #8437

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
fonts added as these codes:
		fontfileListStart();
		fontfileListAdd("/system/fonts/DroidSans.ttf");
		fontfileListAdd("/system/fonts/Roboto-Regular.ttf");
		fontfileListAdd("/system/fonts/DroidSansFallback.ttf");
and for annotation text codes:
		if (!setAnnotFont("DroidSansFallback") && face_name != null) {
			setAnnotFont(face_name);
		}
		// set text font for edit-box and combo-box editing.
		if (!setAnnotFont("DroidSansFallback") && face_name != null) {
			setAnnotFont(face_name);
		}
first u shall check "/system/fonts/DroidSansFallback.ttf" exists, and can read.
second, u can check is DroidSansFallback exists on fontlist, like codes:
		int face_first = 0;
		int face_count = getFaceCount();
		while (face_first < face_count)
		{
			face_name = getFaceName(face_first);
			face_first++;
		}
at last, if, system font can't be used for annotation, u can setAnnotFont t other font.

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

Issue while rendering text in Android OS 5.0 9 years 2 months ago #8445

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
you can include a font taken from the family Roboto (free with Apache 2.0 license even for commercial application) in your project.

You read it from assets, write to sandbox and then load from sandbox.

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

Issue while rendering text in Android OS 5.0 9 years 2 months ago #8458

  • arcmobile.div
  • arcmobile.div's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 80
  • Thank you received: 0
After adding a font from the Roboto family - "Roboto-Regular" , the text is rendered, but how to control the font size.
The default font size is large.

Kindly advice.

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

Powered by Kunena Forum