It is currently Sun May 19, 2013 1:25 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Changing style font in Scintilla gadget does not work
PostPosted: Sat May 05, 2012 5:36 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Dec 03, 2011 5:54 pm
Posts: 252
Hi,

i want to change the default style font in a Scintilla gadget, but it does not work on Fedora 16 64-bit. Instead the font style changed to italic.
Code:
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
  font.s = "Courier New"
  InitScintilla() 
CompilerElse
  font.s = "Monospace"
CompilerEndIf
OpenWindow(0, 0, 0, 400, 400, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ScintillaGadget(0, 8, 8, 384, 384, #Null)
ScintillaSendMessage(0, #SCI_STYLESETFONT, #STYLE_DEFAULT, @font)
ScintillaSendMessage(0, #SCI_SETTEXT, 0, @"This is a simple ScintillaGadget with text.")
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow

On Windows XP 32-bit the code works as expected.

Thx for your help!

Uwe

_________________
Purebasic 5.11 | Fedora 18 (32-bit)


Top
 Profile  
 
 Post subject: Re: Changing style font in Scintilla gadget does not work
PostPosted: Sun May 06, 2012 7:18 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Dec 03, 2011 5:54 pm
Posts: 252
In the meantime i found out that the font name needs an exclamation mark in front of the name, e.g. "!Monospace" instead of "Monospace". I do not know the reason but it works!

_________________
Purebasic 5.11 | Fedora 18 (32-bit)


Top
 Profile  
 
 Post subject: Re: Changing style font in Scintilla gadget does not work
PostPosted: Wed May 09, 2012 1:11 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 8867
Location: France
That's not a bug. It's scintilla on linux with GTK2 which requiers this. Gtk2 'Pango' need an "!" before the font name (else it will use GDK font).


Top
 Profile  
 
 Post subject: Re: Changing style font in Scintilla gadget does not work
PostPosted: Wed May 09, 2012 7:40 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Dec 03, 2011 5:54 pm
Posts: 252
Thx! An example for the ScintillaGadget in the "Examples" folder would be great :-)

_________________
Purebasic 5.11 | Fedora 18 (32-bit)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Exabot [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye