Fonts for mobile devices

Get help using Construct 2

Post » Tue May 15, 2012 4:34 pm

Hi all,

I'm still fairly new to construct 2, and was wondering if someone may be able to offer a little advice.

I've been looking for a way to include customised fonts within an app for mobile devices. I have read articles indicating the use of web fonts, but if I understand correctly these are hosted online. Is there a way fonts can be embedded within an app, allowing them to be accessed even when the user is not online?

Any advice you can offer would be greatly appreciated.

Thanks.
B
32
S
6
G
7
Posts: 489
Reputation: 8,217

Post » Tue May 15, 2012 8:52 pm

I'm pretty sure the game is cached, meaning you won't have to download these fonts again. I could be wrong... @Ashley?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed May 16, 2012 10:11 am

Hi @sqiddster,

Thanks for the reply. I'm really impressed by the strong community atmosphere amongst Construct users. Its very helpful for all of us noobs to know there's a place where we can find some answers.

Thanks for your answer, very useful to know. This does lead to another question however, something you may be able to clear up.

As I understand it, all game data for Construct 2 is saved in the cache. However many people still carry out regular house-keeping / maintenance on their systems, including clearing cached data. Obviously if users are unaware of the way Construct data is saved, this could present a real problem for them.

Do you know if there's another, more secure way to store game data within the users system?

Thanks again for the advice.

PS tried AirScape, and it's great fun to play!
B
32
S
6
G
7
Posts: 489
Reputation: 8,217

Post » Wed May 16, 2012 11:14 am

This is an interesting question when applied to mobile devices, especially when you are considering directcanvas/cocoonjs.
I have to say, however, I don't know much about these things.
Glad you enjoyed my game ;)

I'm sure someone on here will know about this...
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed May 16, 2012 12:04 pm

Web Fonts are not actually cached in the offline.appcache file... it's something I've been meaning to fix, but it's a little complicated. If you manually put the URL to the webfont in the offline.appcache file it might work. It's a known problem though.

@Blacksmith - there are actually different storages involved in the browser, it's not all just one big cache. It goes something like this:
Ordinary document cache: stores HTML of recently visited pages, and cleared when the user hits 'clear cache'.
App Cache: stores files for Construct 2 games so the next time you play it loads instantly. *Not* cleared by pressing 'clear cache' - in fact there is no obvious way for the user to remove this at all.
WebStorage: stores data from the WebStorage object. *Not* cleared by pressing 'clear cache', like App Cache it's difficult for the user to manipulate. It's also commonly limited to 5-10mb.

The main problem is usually just the fact it's locally stored - so if you switch browser or computer, you can't get your data. The best way to solve that is store it server-side and use the AJAX object to communicate with the server.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Wed May 16, 2012 12:28 pm

Hi @Ashley,

Many thanks for the useful information; that certainly helps to make things clearer.
B
32
S
6
G
7
Posts: 489
Reputation: 8,217


Return to How do I....?

Who is online

Users browsing this forum: austinblackbelt, Matthew de, Skebab, spcsmrf, Yahoo [Bot] and 6 guests