jit.gl.text2d and unicode

danieleghisi's icon

Hi!

It seems to me that jit.gl.text2d does not display a large number of (existing) unicode characters. For instance, if I try to have the text "Sħe sat" displayed with font Georgia, the "ħ" letter (though existing: a simple message box displays it properly) is replaced by a square.

Does anybody have a clue?

Thanks,
Daniele

danieleghisi's icon

...has anybody else had this issue?...

kugelschreiber's icon

what kind of font do you use ?
what os you are using ?

not every unicode font has all characters build in.
if you are on windows try the font Arial Unicode MS.

danieleghisi's icon

As I originally wrote, I'm using Georgia font, but the issue is common to many other font. I'm on Mac OS X 10.6.8. I'm very sure that the font has the Unicode ħ character built in, cause I can see it in any other application (or directly using PopChar, for instance).

danieleghisi's icon

(and moreover I can perfectly see it in a ordinary message box, whose font is set to Georgia...)

matmat's icon

hi
may be post a patch ...
How do you write the text to "jit.gl.text2d"?
via matrix, via messages ?

danieleghisi's icon

Hi matmat. Below you have an example, with text sent via messages.
I suppose I can't send via matrix either, since all the examples I have found in the doc use char matrices (not enough for full unicode depth...)

Any advice is really welcome...

Max Patch
Copy patch and select New From Clipboard in Max.

Daniele

kugelschreiber's icon

hi danieleghisi,

seems that there is a bug in jit.gl.text2d.
perhaps it is better to use jit.mgraphics.

it seems to display your text correct.

Max Patch
Copy patch and select New From Clipboard in Max.

best,
kugelschreiber