Page 1 of 1
Questions about fonts
Posted: Mon Oct 08, 2007 10:15 pm
by Armoured
Hi
I need to have the same GUI look with different fonts.
GTK can automaticaly adapt all the gadget to a different font?
if answer is no what font I must use to have the same look on differents Linux?
Is possible to include a font in a program?
Thanks
Posted: Tue Oct 09, 2007 1:54 am
by walker
you can ship a font with your exe (see IncludeBinary) and use this font with
Code: Select all
SetGadgetFont(#PB_Default,FontID(myfnt))
to have the same font on each Gadget
(after extracting the font to disk and loaded with LoadFont() first)
with GTK+ you can use rc-files to achieve a change of the look of your program
Posted: Tue Oct 09, 2007 8:56 am
by Armoured
walker wrote:you can ship a font with your exe (see IncludeBinary) and use this font with
Code: Select all
SetGadgetFont(#PB_Default,FontID(myfnt))
to have the same font on each Gadget
(after extracting the font to disk and loaded with LoadFont() first)
with GTK+ you can use rc-files to achieve a change of the look of your program
Hi walker
the LoadFont() command works if the font is located in the program directory?
Posted: Tue Oct 09, 2007 10:31 am
by walker
yes, but you'll have to specify the path to the font... i.e.
Code: Select all
LoadFont(#Pb_Any,"/home/xyz/mypgm/myfont.ttf",10)
Re:
Posted: Mon Jan 18, 2016 4:56 am
by Keya
walker wrote:yes, but you'll have to specify the path to the font... i.e.
Code: Select all
LoadFont(#Pb_Any,"/home/xyz/mypgm/myfont.ttf",10)
Is that actually valid - using a filename with LoadFont() ? it's not mentioned in the helpfile, and both my tests of it failed on Win + Linux. I too am looking for a way to dynamically load font from ttf file on OSX + Linux
Do: Re: Me:
Posted: Mon Jan 18, 2016 5:02 pm
by heartbone
Keya wrote:walker wrote:yes, but you'll have to specify the path to the font... i.e.
Code: Select all
LoadFont(#Pb_Any,"/home/xyz/mypgm/myfont.ttf",10)
Is that actually valid - using a filename with LoadFont() ? it's not mentioned in the helpfile, and both my tests of it failed on Win + Linux. I too am looking for a way to dynamically load font from ttf file on OSX + Linux
http://www.purebasic.fr/english/viewtop ... 37#p471937