[5.10b5] Text shifted in Gadgets

Mac OSX specific forum
Niffo
Enthusiast
Enthusiast
Posts: 504
Joined: Tue Jan 31, 2006 9:43 am
Location: France

[5.10b5] Text shifted in Gadgets

Post 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
Niffo
User avatar
michel51
Enthusiast
Enthusiast
Posts: 290
Joined: Mon Nov 21, 2005 10:21 pm
Location: Germany

Re: [5.10b5] Text shifted in Gadgets

Post 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 ??
michel51

Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [5.10b5] Text shifted in Gadgets

Post 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.
Post Reply