[Gambas-user] Sdl Font

Benoît Minisini g4mba5 at gmail.com
Wed Jan 9 16:51:45 CET 2019


Le 07/01/2019 à 19:26, T Lee Davidson a écrit :
> As I understand that, Fabien, "Font!MyFont" would be alternate syntax to "Font["MyFont"]. I have tried both ways and still get
> error, "Incorrect font size".
> 
> Another look at the code clued me in to how the font name should be specified, ie. with a font size: Font["MyFont,16"]
> 
> 
> I have been testing with the SDL application that is created by the IDE via the "New project..." dialog.
> 
> To Main(), I added: Font.Load("/usr/share/fonts/truetype/DejaVuSans.ttf")
> And in differing locations within the Window_Draw() event, I added: Draw.Font = Font["DejaVuSans,16"]
> 
> The application now SegFaults.
> 
> 
> ___
> Lee
> 
> 

It works here. Please provide your project and a way to reproduce the crash.

By the way, I will add a default font size to Font[], so that you can 
write directly Font["DejaVuSans"] without having to specify a font size 
(required by the TTF library. I don't know why exactly, maybe for the 
hinter).

Regards,

-- 
Benoît Minisini


More information about the User mailing list