How load "Sans" font with specified size? All text in my app is too big. Also some special characters is broken, because is not used Sans font.
I use Ubuntu and font requester display only some fonts without "Sans". But in system setup "Sans" exist and is used.
Hyperlink gadget - when I click on adress, nothing happens. It's normal?
Font Sans, size, Hyperlink gadget
OK, but RunProgram("http://site.com") nothing do. In windows it's ok.
On Linux, you are going to need to call a browser first. for example:rotacak wrote:OK, but RunProgram("http://site.com") nothing do. In windows it's ok.
Gnome:
Code: Select all
RunProgram("nautilus","http://www.purebasic.com")Code: Select all
RunProgram("konqueror","http://www.purebasic.com")-Beach
Here is an example of how I set them. I could not figure out how to make a font underlined for your hyperlink gadget though. Still looks link-like to me...rotacak wrote:Thanx, this work OK.
And what font size? How change font size in gadgets?
Code: Select all
#PB_Font_Bold = 1
#PB_Font_Italic = 2
#PB_Font_Bold_Italic = 3
SansFont = LoadFont(#PB_Any,"sans",13,#PB_Font_Bold)
ArialFont = LoadFont(#PB_Any,"arial",8,#PB_Font_Italic)
HyperFont = LoadFont(#PB_Any,"sans",8,#PB_Font_Bold_Italic)
If SansFont = #FALSE Or ArialFont = #FALSE Or HyperFont = #FALSE
MessageRequester("Error","Could not load system font")
End
EndIff
If OpenWindow(0,174,8,170,110,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Font Test")
If CreateGadgetList(WindowID(0))
TextGadget(1,10,10,150,25,"This text should be in Arial...")
UseFont(ArialFont)
SetGadgetFont(1,FontID())
ButtonGadget(2,10,40,150,30,"Button")
UseFont(SansFont)
SetGadgetFont(2,FontID())
HyperLinkGadget(3,10,75,150,28,"www.PureBasic.com",RGB(0,0,255))
UseFont(HyperFont)
SetGadgetFont(3,FontID())
EndIf
EndIf
Repeat : Until WaitWindowEvent() = #PB_EventCloseWindow
-Beach
The sample above was compiled using Ubuntu 5.10 and with the GTK2 sub system. What distro are you using?rotacak wrote:This not work. Can't load font. Your sample picture looks like from Ubuntu, but I don't know how this can be done.
I try other way, described somewhere here in forum. Load font like horrible name name-font-size-bla-bla.....
This on linux work ok, but no in GTK2
-Beach


