Hi,
I'm just starting a multimedia presentation program that is right up Blitz's alley. I'm taking 3D content from Autodesk Inventor (ultra-high end parametric modelling software) and converting the models into something Blitz can use (It's a c# project, makes a OLE link to Inventor and reads out the vertex information). The multimedia stuff is for interactive manuals of our equipment.
The manuals must be translated into all sorts of languages (an occupational hazard being a global company), so Unicode is a must.
I was heading down the Dark Basic path, but stopped dead with Unicode. Blitz 3D doesn't seem to do the double-byte thing, either (willing to be proved wrong on that, though). BlitzMax does do the unicode shuffle, much to my surprise.
I've written a little test program, to print some Arabic:
Graphics 640,480
Local font:TImageFont=LoadImageFont("c:\windows\fonts\cour.ttf",24)
SetImageFont font
text$=""
Local unicode:Short[8]
Local nextChar:Short
For i=6 To 0 Step -1
ReadData nextChar
unicode[i]=nextChar
Next
text$=string.FromShorts(unicode,7)
While Not KeyHit(KEY_ESCAPE)
Cls
DrawText text$,100,100
Flip
Wend
' A line of Arabic text
DefData $0625,$0646,$0643,$0644,$064a,$0632,$064a
(sorry if the formatting is smashed; first time poster to the forums)
Arabic is indeed being printed - but all the characters are in the final form!
So... has anyone succesfully printed a fancy double-byte character to the screen before, using BlitzMax? Or, am I doing something spectacularly stupid here? I followed the DrawText command right down; it processes text one character at a time, instead of handing off to the OS for printing. So I'm guessing there might be another form of DrawText which will process a string in it's entirety.
Can anyone give me a pointer or two as to what I'm doing wrong - or, if soemone from BRL is reading, can I keep developing my application, with a proper Unicode update just 'round the corner?
Kind regards,
Neil
I'm just starting a multimedia presentation program that is right up Blitz's alley. I'm taking 3D content from Autodesk Inventor (ultra-high end parametric modelling software) and converting the models into something Blitz can use (It's a c# project, makes a OLE link to Inventor and reads out the vertex information). The multimedia stuff is for interactive manuals of our equipment.
The manuals must be translated into all sorts of languages (an occupational hazard being a global company), so Unicode is a must.
I was heading down the Dark Basic path, but stopped dead with Unicode. Blitz 3D doesn't seem to do the double-byte thing, either (willing to be proved wrong on that, though). BlitzMax does do the unicode shuffle, much to my surprise.
I've written a little test program, to print some Arabic:
Graphics 640,480
Local font:TImageFont=LoadImageFont("c:\windows\fonts\cour.ttf",24)
SetImageFont font
text$=""
Local unicode:Short[8]
Local nextChar:Short
For i=6 To 0 Step -1
ReadData nextChar
unicode[i]=nextChar
Next
text$=string.FromShorts(unicode,7)
While Not KeyHit(KEY_ESCAPE)
Cls
DrawText text$,100,100
Flip
Wend
' A line of Arabic text
DefData $0625,$0646,$0643,$0644,$064a,$0632,$064a
(sorry if the formatting is smashed; first time poster to the forums)
Arabic is indeed being printed - but all the characters are in the final form!
So... has anyone succesfully printed a fancy double-byte character to the screen before, using BlitzMax? Or, am I doing something spectacularly stupid here? I followed the DrawText command right down; it processes text one character at a time, instead of handing off to the OS for printing. So I'm guessing there might be another form of DrawText which will process a string in it's entirety.
Can anyone give me a pointer or two as to what I'm doing wrong - or, if soemone from BRL is reading, can I keep developing my application, with a proper Unicode update just 'round the corner?
Kind regards,
Neil

