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.

AppGameKit Classic Chat / Enable unicode font set?

Author
Message
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 19th Apr 2019 11:48 Edited at: 19th Apr 2019 12:00
How do I enable unicode font for all language of the world in AppGameKit?

I have set: UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts

It end up looking like a bunch of white square.

Any help appreciated!

This page suggest it does support full utf-8: https://store.steampowered.com/news/posts/?appids=325180&enddate=1482238723

Why is it not working for me?

Attachments

Login to view attachments
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 19th Apr 2019 15:56
Do anyone still read the classic forum?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 19th Apr 2019 16:00
Quote: "Do anyone still read the classic forum?"

yes

but the default fonts look fine to me
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 20th Apr 2019 05:38 Edited at: 20th Apr 2019 06:51
I have attach a picture, why is my unicode character appearing like this?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Apr 2019 06:13 Edited at: 20th Apr 2019 06:17
if your trying to print a special character you need to
string Chr( unicodevalue )
it wont work if you place the special character in a string command a$="(specialcharacter")
as any basic language you use converts that to a character null which by the looks of it is what
you are seeing

this should work
result$="mystrings Unicode value " + str(unicodevalue) + " is"+ str(chr(Unicodevalue))+" ……….")
print (result$)
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 20th Apr 2019 06:50
That is dumb... what if I need to prase a http data that is default to unicode?
And how do I even get the int code from a character like the following?

// ---
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
createtext(1, "个傻眼了")
SetTextSize(1, 50)
do
//Print( ScreenFPS() )
Sync()
loop
//---

main.agc:22: error: "str" does not accept the parameters (String): createtext(1, str("个傻眼了"))

No doubt that will not work...
Is there no way to natively display internationally language?
Do I need to add in a 50mb ttf file for every single language?
They are like 1.9gb in total...
Does it not use windows or os build in language unicode?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Apr 2019 07:13 Edited at: 20th Apr 2019 07:15
the ttf files for each language are very small and not 50mb. the ones i have are around 1mb
and if agk was to add every single font available there wouldnt be one phone that could store the program
due to the increased size after compilation

try this https://forum.thegamecreators.com/thread/217927
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 20th Apr 2019 07:53 Edited at: 20th Apr 2019 08:03
you need to use a unicode font:

Attachments

Login to view attachments
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 20th Apr 2019 08:09
I am doing that now.
The default: SetTextFont(1, 0), Actually support language like russian, but language like japanese and chinese actually fail...
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 20th Apr 2019 08:51
GetClipboardText() Does not copy over unicode?
Anyone having this issue?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 20th Apr 2019 09:04
this is my first time playing with UTF-8 but i expect you'll need to find fonts that cover all the regions you want to include. i saw that there are over 110k symbols but the most that i saw a font cover was ~58k (i think the ms arial font i used had ~38k).

Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 20th Apr 2019 09:14 Edited at: 20th Apr 2019 09:25
The clipboard function just return 63 for unicode code.
However, if you use set, it will return fine?
But copy from elsewhere, it return only 63.

Testing it out with notepad, it copy to notepad fine?

Copy from notepad with utf-8, fail!
Copy from notepad with unicode, fail!

Have I found an actual bug?
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 20th Apr 2019 19:11 Edited at: 20th Apr 2019 19:17
I use unicode in one of my map maker programs . I used good old cut and paste . Windows 10 has Character Map. exe . , or do you mean printing to paper ?

If AA=1 then print(" ◄ LEFT"): If AA=2 then print(" ▼ DOWN")

Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 21st Apr 2019 04:43 Edited at: 21st Apr 2019 04:45
I mean, even if I turn it to byte, using asc then chr, it still return 63.

Left it by 1 and the int for this character is 63.

Copy from anywhere, even from a notepad .txt on your desktop.
It will always return code 63 for any utf-8 or unicode text.
unicode is always 4 byte or a register for a single character.

I tried memblock, it did not work.

Preset the setclipboard with the unicode character on file and save as utf-8 in the main.agc file, complie it and run, it will be acquire properlly using getclipboard.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Apr 2019 05:57
Quote: "GetClipboardText() Does not copy over unicode?"

Definitely an issue. I don't know why it hasn't been addressed by TGC
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 21st Apr 2019 08:19
if someone could confirm this finding, please let me know.
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 21st Apr 2019 08:19
if someone could confirm this finding, please let me know.
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 21st Apr 2019 14:25


I have never used GetClipboardText() . I use the functions from Character Map. exe to select and copy into my program . Try it .


Attachments

Login to view attachments
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 22nd Apr 2019 02:37
That is impossible, there is no way to get someone else to use another program just to use this program.

Login to post a reply

Server time is: 2024-11-22 21:13:54
Your offset time is: 2024-11-22 21:13:54