[Gambas-user] Sdl Font
Fabien Bodard
gambas.fr at gmail.com
Mon Jan 7 07:29:30 CET 2019
Font.Load (fontpath, "MyFont")
Draw.Font = Font!MyFont
Print Draw.Font.Size
... if I understand well Font act like Picture
Le lun. 7 janv. 2019 00:58, T Lee Davidson <t.lee.davidson at gmail.com> a
écrit :
> According to the wiki, Font acts like a read-only static array. And,
> according to [0], we should be able to use ...
>
> [Code]
> Dim hFont As Font
> hFont = Font[Null]
> [/Code]
>
> ... to have the default font returned.
>
> But, when I do that (even with the name of a TTF font I've loaded), I get,
> "Incorrect font size".
>
> The Font methods aren't exposed unless a variable is declared as type Font.
> But then if I try, "Print hFont.Name", I get, "Null object".
>
> Honestly, I don't know how Font is supposed to be used.
>
>
> ___
> Lee
>
> [0] http://gambaswiki.org/wiki/comp/gb.sdl2/font/_get
> P.S. Try to ensure you "Reply to List".
>
>
> On 1/5/19 10:10 PM, Shane wrote:
> > yes that is how i have tried to use it but the font doesn't change so it
> seems there might be a bug can someone else give this a try
> >
> > cheers Shane
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190107/a8a6c4c3/attachment.html>
More information about the User
mailing list