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

TOPIC:

text is not written correct showing squres 8 years 2 weeks ago #10491

  • gabmor
  • gabmor's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
I tried this
File file3 = new File("/system/fonts/DroidSans.ttf");
		Log.d("EaglesPDF","DroidSans exists "+file3.exists());
		if(file3.exists())
			fontfileListAdd("/system/fonts/DroidSans.ttf");
		else
			load_truetype_font(res, R.raw.droidsans, new File(files, "droidsans.ttf"));
		File file2 = new File("/system/fonts/Roboto-Regular.ttf");
		Log.d("EaglesPDF","Robot exists "+file2.exists());
		if(file2.exists())
			fontfileListAdd("/system/fonts/Roboto-Regular.ttf");
		else
			load_truetype_font(res, R.raw.roboto_regular, new File(files, "roboto_regular.ttf"));
		File file = new File("/system/fonts/DroidSansFallback.ttf");
		Log.d("EaglesPDF","DroidSansFallback exists "+file.exists());
		if(file.exists())
			fontfileListAdd("/system/fonts/DroidSansFallback.ttf");
		else
			load_truetype_font(res, R.raw.droidsansfallback, new File(files, "droidsansfallback.ttf"));

and the three logs return me true but for some reason doesn't work
so i finally tried this and work it
if (!setDefaultFont(null, "Roboto-Regular", true) && face_name != null)
		{
			if( !setDefaultFont(null, "Roboto-Regular", true) )
				setDefaultFont(null, face_name, true);
		}

if (!setAnnotFont("Roboto-Regular") && face_name != null) {
			setAnnotFont(face_name);
		}

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum