[Gambas-user] gb3: changing the active font
    Kevin Fishburne 
    kevinfishburne at ...1887...
       
    Thu Nov  3 20:06:22 CET 2011
    
    
  
On 11/03/2011 01:14 AM, Fabien Bodard wrote:
> Have you tried :
>
> Draw.Font = Draw.Font.Load("/home/kevinfishburne/Desktop/Sanctimonia,
>
> because draw.font.load normally not assignate a font to draw.font but
> just return an object handle to a font object
>
Nice, that actually works.
What's odd is that after some period of time it still halts with the 
error "gb.sdl error: Couldn't open 
/usr/local/share/gambas3/gb.sdl/DejaVuSans.ttf in Render 834". I checked 
the value of Draw.Font after the crash and it reports the Name property 
as being "DejaVuSans.ttf", even though I've only been setting it to 
"Avatar.ttf". I changed the line to this:
If Draw.Font.Name <> "Avatar.ttf" Then Draw.Font = 
Draw.Font.Load("/home/kevinfishburne/Desktop/Sanctimonia, 
Server/Images/Font/Avatar.ttf")
and it still crashes. Somehow Draw.Font.Name is being reset to 
"DejaVuSans.ttf". I searched the entire project for "Draw.Font" and 
nothing else is modifying it. Sounds like a bug. I'm using revision 4229.
-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271
    
    
More information about the User
mailing list