GLBasic forum

Main forum => GLBasic - en => Topic started by: spacefractal on 2016-Sep-23

Title: How to compile or use 16bit strings?
Post by: spacefractal on 2016-Sep-23
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.
Title: Re: How to compile or use 16bit strings?
Post by: spacefractal on 2016-Sep-23
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.
Title: Re: How to compile or use 16bit strings?
Post by: Kitty Hello on 2016-Sep-24
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.
Title: Re: How to compile or use 16bit strings?
Post by: MrTAToad on 2016-Sep-24
Might it be worth using the SDL_tff system ?
Title: Re: How to compile or use 16bit strings?
Post by: spacefractal on 2016-Sep-24
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.
Title: Re: How to compile or use 16bit strings?
Post by: bigsofty on 2016-Sep-25
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
Title: Re: How to compile or use 16bit strings?
Post by: spacefractal on 2016-Sep-25
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.....
Title: Re: How to compile or use 16bit strings?
Post by: MrTAToad on 2016-Sep-25
No-one using my TTF to Bitmap program ?  :'(
Title: Re: How to compile or use 16bit strings?
Post by: spacefractal on 2016-Sep-25
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.