[Gambas-user] Sdl Font

T Lee Davidson t.lee.davidson at gmail.com
Sun Jan 6 17:51:29 CET 2019


Actually, in SDL (1), fonts are not creatable. It is instances of the Font class that are creatable.

In SDL2, from my cursory scan of the code, instances of the Font class are not creatable because an instance is created
statically. This means you do not need to create an instance in order to use Font.

I haven't tested it, but it seems to me that to change the font, you simply load a font from disk, ie:
Font.Load( Path As String [ , Name As String ] )
"Load a TTF font from the disk."

For example, I have a Philing true-type font file in a "fonts" folder. To load it, I would use:
Font.Load(User.Home &/ "fonts/philing.ttf", "Philing")


___
Lee


On 1/5/19 10:10 PM, Shane wrote:
> I see in sdl 1 that fonts are creatable but in SDL2 there not is this correct
> 
> 
> On 6/1/19 2:04 pm, Shane wrote:
>> On 04/01/2019 10:54, Shane wrote:
>> can someone show me how to change the font with SDL2
>>
>> cheers
>>
>> Shane.
>>
>> anyone ??
>>
>> how do I load a font
>>
> 
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----


More information about the User mailing list