Hi Livecode Android devs.
Apologies if you've heard this all before - I posted a similar question on the mailing list.
I can't seem to resolve a problem of getting custom fonts to display in a Livecode native browser control in Android. I'm basically dynamically creating, writing, and loading an HTML file. This file contains CSS which should style the text - but it doesn't - it defaults to standard system fonts (it works fine in iOS) . I have tried all sorts of methods to get it displaying but to no avail.
Question is: does anyone have a simple example stack of this working as it should so I can see where I'm going wrong?
Kind regards, Paul.
Custom fonts in Android native browser control...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 44
- Joined: Wed Feb 13, 2013 3:38 pm
- Location: Glasgow, Scotland
- Contact:
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Custom fonts in Android native browser control...
Hi Paul,
Just using the normal Android browser (I don't even know what it's called... google browser?) do your fonts show up?
Yes, try removing LC from the equation first, it might be an Android thing.
Simon
Just using the normal Android browser (I don't even know what it's called... google browser?) do your fonts show up?
Yes, try removing LC from the equation first, it might be an Android thing.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 44
- Joined: Wed Feb 13, 2013 3:38 pm
- Location: Glasgow, Scotland
- Contact:
Re: Custom fonts in Android native browser control...
Hi.
Thanks for getting back. If I view custom styled web pages in an Android browser (not LC control) everything is fine. I haven't tried loading the HTML file I created locally into a browser in Android though.
Another dimension to this problem - I have the fonts copied into the package for compilation because they are used int the UI (fields, buttons). These elements all display fine. Just not in an Android browser control. As I say, fonts appear fine in iOS browser and UI.
Just curious if anyone had a simple stack with a custom font in some HTML loaded to a browser control...
Thanks for getting back. If I view custom styled web pages in an Android browser (not LC control) everything is fine. I haven't tried loading the HTML file I created locally into a browser in Android though.
Another dimension to this problem - I have the fonts copied into the package for compilation because they are used int the UI (fields, buttons). These elements all display fine. Just not in an Android browser control. As I say, fonts appear fine in iOS browser and UI.
Just curious if anyone had a simple stack with a custom font in some HTML loaded to a browser control...
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Custom fonts in Android native browser control...
I'm just guessing, but since LiveCode calls on the OS to draw native controls it would make sense that the OS can't see the fonts that are defined inside your app package.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com