Page 1 of 1

[5.10b5] Text shifted in Gadgets

Posted: Wed Jan 30, 2013 10:56 am
by Niffo
Compared to Carbon, Text is shifted in Gadgets. Is it the same problem than http://www.purebasic.fr/english/viewtop ... 24&t=53089 ?

Code: Select all

OpenWindow(0, 100, 100, 300, 200, "Test")
TextGadget(0, 10, 10, 200, 30, "Test", #PB_Text_Center | #PB_Text_Border)
ComboBoxGadget(1, 10, 50, 200, 30)
AddGadgetItem(1, -1, "Test")
SetGadgetState(1, 0)
LoadFont(0, "Arial Unicode MS", 21)
SetGadgetFont(0, FontID(0))
SetGadgetFont(1, FontID(0))

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow

Re: [5.10b5] Text shifted in Gadgets

Posted: Wed Jan 30, 2013 11:43 pm
by michel51
I agree - with the font "Arial Unicode MS".
Try the font "Arial" and the text will be written perfectly.

I think, it's a bug, maybe with unicode ??

Re: [5.10b5] Text shifted in Gadgets

Posted: Sat Feb 02, 2013 2:00 pm
by Fred
The problem here is we jus apply the font to the control, we don't do the drawing at all. And as it does work with Arial, I don't think we can fix it, it sounds like a glitch in Cocoa toolkit.