Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / LoadFont function Help

Author
Message
darzon
14
Years of Service
User Offline
Joined: 23rd Oct 2010
Location: Italy
Posted: 6th Jan 2017 17:11
Hi,
I don't know how use on AppGameKit 2 LoadFont function.
I Want to write a simple text with Arial Truetype font
where i can find complete example code ?
thank you
damothegreat
User Banned
Posted: 6th Jan 2017 22:33 Edited at: 29th Jan 2017 20:30
darzon
14
Years of Service
User Offline
Joined: 23rd Oct 2010
Location: Italy
Posted: 7th Jan 2017 09:07
thank you very much Damo for the code.
Now I need antother help about images png with transparences.

I create it but when I run the program, On PC i see it , on Android I see a red X instead of the image.
Can you say me how is the correct mode to create a png ?
I use gimp
it must be 32 bit depth ? 16 bit ?
or there is anothe software can i use to crete it ?

thank you very much
damothegreat
User Banned
Posted: 7th Jan 2017 10:16 Edited at: 29th Jan 2017 20:30
darzon
14
Years of Service
User Offline
Joined: 23rd Oct 2010
Location: Italy
Posted: 7th Jan 2017 10:49
thank you very much
I will check the path and case sensitive. I will Know you about.

Instead about Loadfont
I have paste your code and create a simple project.
the code is :

SetVirtualResolution( 1280, 800 )
font=loadfont("Script MT Bold")
logo=CreateText("My Font App")
SetTextFont ( logo , font )
SettextSize(font,80)

do
Sync()
loop

When Run on PC is all Ok , but when I Broadcast on tablet Andoid the font is not the same (it seems to be the default pc font MS Sans Serif that is not a ttf font)
you can see the image I attach.
Can you help me to resolve this ?
thanks in advance.

Attachments

Login to view attachments
damothegreat
User Banned
Posted: 7th Jan 2017 11:12 Edited at: 29th Jan 2017 20:30
darzon
14
Years of Service
User Offline
Joined: 23rd Oct 2010
Location: Italy
Posted: 7th Jan 2017 12:22
Hi damo,
I tried to copy the font in media folder but
nothing change
thank you for all other tips you can give me

thank in advance


damothegreat
User Banned
Posted: 7th Jan 2017 12:23 Edited at: 29th Jan 2017 20:30
damothegreat
User Banned
Posted: 7th Jan 2017 13:12 Edited at: 29th Jan 2017 20:31
damothegreat
User Banned
Posted: 7th Jan 2017 13:30 Edited at: 29th Jan 2017 20:31
darzon
14
Years of Service
User Offline
Joined: 23rd Oct 2010
Location: Italy
Posted: 7th Jan 2017 14:02
thank you very very much Damo
You saved me
bye

Login to post a reply

Server time is: 2024-11-22 09:39:09
Your offset time is: 2024-11-22 09:39:09