LibGDX get fonts saved on desktop/android - libgdx

Hello I would like to know how I can use the fonts saved on an android device or on desktop.
Also how to get the default font used by the platform.
I have some basic knowlege about the file module but never tried to acces data from the device it self.

Related

How to view a pdf file in the browser,when clicking on a link

I have developed an application using HTML 5. To make the application compatible with the mobile devices I have used cordova/phonegap.
Now the problem is that, the PDf files which is there inside the application is only getting downloaded, when clicked on the link. I need to get it opened in the browser, when clicked on the link. It works fine with the PC. But not with the mobile devices.
I stored the link to a variable and passed that variable to google. Now using some sort of services from google, the link is getting opened in the browser.
I tried installing inAppbrowser plugin also.
window.open(Furl, '_system', 'location=yes');
This was the line of code used, where Furl is the name of the variable, into which, the url address of the pdf file is passed.
This line of code works fine, when url address of a webpage is passed to the variable. But not with the pdf files.
Apart from that idea, is there any other solution for this problem?
Can someone help me out with this problem?
-Thank you
As stated already on a comment, it is possible on modern browser since they have in-built PDF viewer. This isn't the case for Android or iOS currently. What you could do is to convert the PDF to PNG image and then show that. There is a PDF2PNG plugin available for this purpose. Also, if you only need to support iOS 6 & 7, you can take a look at the PDF Viewer plugin.

Google Khmer font shows only the square boxes

I try to create a WebApp with Phonegap.
When I write Khmer (កើត​អាប់​ស) it works in Firefox and Chrome. But when I create the App (apk) my Smartphone only shows square boxes. But why?
I use this special font from Google
https://www.google.com/fonts/specimen/Khmer
Any ideas to fix this problem?
Details are available here which outline how to resolve the issue:
http://osify.com/2012/02/install-khmer-font-on-galaxy-s2-without-rooting-system/
To apply for Android 2.3.x:
Enable “unknown sources” installation (via Setting->Application)
Install Khmer.apk
Change font style
Settings > Display > Screen display > Font style
Choose Khmer
Restart the phone
Testing: Go to this website page: http://khnews.info/testing.html
To write Khmer, download Khmer keyboard from Android Market: Phum Keyboard or MultiLing Keyboard
9) To enable input keyboard:
Settings > Languages and keyboard > Select input method
Choose: Phum Keyboard (in my case)
After you should be able to see everything in Khmer even though the rendering is not fine, you can type Khmer Unicode as well.
Further details: http://adkhmer.com/index.php?option=com_content&view=article&id=19:install-khmer-unicode-for-android-without-root&catid=6:android&Itemid=18
FlipFont is a great technology from Monotype Imaging and it is using
in android phone of Samsung. The technology allows creating
application for adding more fonts into android phone beside the fonts
were shipped in system of the phone already.
Unfortunately, from Android 4.0 (ICS) and earlier version, FlipFont
doesn't work with web browser, but it still find some more useful for
Khmer, especially in Galaxy Note II with Android 4.1.1 (Jelly Bean)
for browsing song title, video name in Khmer in youtube and chat with
friend via facebook messenger.
I would like to note that it works with facebook messenger found on
Play Store only, it doens't work with facebook application yet. For
facebook application on Google Play Store, we also can chat in Khmer,
but we can’t read the feed post on the wall yet.
In Android 4.1.1, Khmer rendering work perfectly in all part of
Android OS, but there are not font in system yet. So if you install
Khmer.apk in Galaxy Note II, you can read and write Khmer in many
applications without root the device.
Otherwise, if I were coding a webpage and trying to get the font to display on someone's phone .. If modiX is correct I would use FontForge or any other font editor to import the glyphs from the original font into a new font file and reassign the glyphs to a unicode range within the limits of Android's range.
It seems Android does not support those UTF8 ranges, however you could root the device to get the necessary character set on the device.
I found an app that claims to do the same without root: https://play.google.com/store/apps/details?id=com.blogspot.androidsanctum.kui
There are also direct APK installers on the web.

Run single page HTML and JavaScript page offline in iPad 1 safari

I am coaching my son's flag football team this winter and I'd like to make a little one pager app with jquery which will display and animate for the team some plays during huddles. I have been researching this quite a bit and it seems there is no way for safari to load local files. Some have suggested using goodreader, the app, but according to their manual they use a simplified browser rather than safari.
Not sure what else to try. The iPad is wifi only using ios5.
Safari is not capable of loading local files.
You have a few different options. You can:
Upload the file to Dropbox, and use it's offline mode to view it.
Use a native / hybrid container (like Appcelerator, PhoneGap, etc)
to bundle your HTML/Javascript into a "native" app.
No Safari can not load local files. You can't run local applications from there. What you can do is develop an actual app for your iphone using dreamweaver/jQuery. You could make pre-recorded videos and play them on your iPad as well. Goodreader, from what I can tell, is for reading local PDFs, which has nothing to do with apps... (but I don't really know)
This page should give you a general idea of using JQuery (mobile) to develop and actual app:
http://jquerymobile.com/
Edit: I just thought of a simpler approach that should work. Open a drop-box account at dropbox.com and put the website/Jquery in the public folder. Get the URL for the public folder and use that. Open the website on your iPad and then don't close the window. Even when the network connections stops it should still work.
I ended up using HTML5 built in APPCACHE: http://www.html5rocks.com/en/tutorials/appcache/beginner/
We went undefeated BTW :)

Ipad / iphone accesing image locally with safari / chrome

Is there any file path or way to access the images store/save on ipads/iphones? What I want to do is build a presentation wich will run over safari/chrome and access the images locally, with this the presentations will work with/without internet connection. Is any other approach to make this presentation work with or without internet?
something like this would be great
<img src="ipad://pic.jpg" />
Ps. I know Ipad/iphone hasn't have an file manager.
As far as I know you cannot access photos from the browser. This might have changed with more recent updates but I doubt it. You can use something like PhoneGap to make a native app in HTML5 that has access to system components like photos.

How to make an HTML5 that does not require the blackberry browser component?

I used the latest and greatest jQuery Mobile (RC1) to develop an app for the client. I used the latest Webworks version from RIM and packaged the app in a Cod file.
The app works great if accessed through the web browser ETC however when I installed the actual generated JAD/Cod files onto a blackberry device, performance was horrible even with minimum number of jQuery libraries.
Since I have Googled this everywhere and it is apparent that one cannot have a meaningful app experience if Webworks is used, I want to be able to just create something that just places the app icon on the phone. Once clicked, it open the browser and takes the user to the web server where the HTML files are parked.
Is this possible?
You can do that, with a very simple Java-application.
The following code:
Browser.getDefaultSession().displayPage("http://www.yourserver.com");
It will open browser and open page: http://www.yourserver.com
Browser class javadoc is here: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/blackberry/api/browser/Browser.html