How to compile or use 16bit strings?

Previous topic - Next topic

spacefractal

Hi Gernot.

Im seen there is a lots of code using 16 bit strings, but why is that not enabled at all?

Today im just got japanse translated to Genius Greedy Mouse, but after working all the day, im simply just give up, due 8 bit strings, which is too short to use. Unicode is also important today, but actuelly should only require that for Strings etc, because im can STILL use a bitmap font for Japanse, because its only some letters used and not all. But 255 chars was to short and im dont want various workaround.

But im do see there is a lots of UNICODE support in the source code , is that ever enabled? or can im use 16 bit string variables (which only needed in few cases).

All im need is 16bit string support with ASC as well LEN functions. That would been a start.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

While 16 bit strings is Nice to have, I'm thinks the main issue with the uf8 akin liked string that did wrong, might have to to the Chr(0) char, where TRIM() not remove the extra one correctly and confuse when write a mid string...... hopefully I'm can workaround tomorrow or Sunday.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

Use utf8. The chr(0) represents the end of a string. The main problem is the display of the characters(font). I have code for parsing utf8. I'll send you. A full unicode font bitmap would be too big.

MrTAToad

Might it be worth using the SDL_tff system ?

spacefractal

#4
I'm Allready have UTF8 to Unicode (from blitzmax code) but would been much easier to use wide strings when required. Eventuelly as a extra type. Howover I'm could also have wrote my own class for that and used it. I'm would still use my own font system, as long bitmap font is required.

Im did do got it to work. Also I'm also don't need full Unicode either. So I'm was only asked for Unicode support for strings, and then implemeting the font system your self.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

bigsofty

I'll add my 10p... Single C header, almost no dependencies, PD license, for TTF support.

https://github.com/nothings/stb/blob/master/stb_truetype.h
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

spacefractal

#6
I'm also did a little tool to extract tff to bitmap in blitzmax as well. I'm got finally it working, even I'm still want to see tff or a open type font format for a clean writing. eventuelly as a add on.

Soon I'm also get Korea and Russia support.....
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrTAToad

No-one using my TTF to Bitmap program ?  :'(

spacefractal

im did my own this time in blitzmax, its was just quite simple, because im needed to find all letters its used and only use those, and not all. Otherwise the font bitmap would been too big.

Im also used this one in CatchOut, which also my own:
http://www.glbasic.com/forum/index.php?topic=9981.0

Im would also just perfer TTF directly without doing bitmap font. bitmap was never really designed to use with unicode or scaling.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/