Page 2 of 2
Re: FontRequest and GetAttribute
Posted: Tue Feb 18, 2020 4:12 pm
by jPV
Juan Carlos wrote: ↑Tue Feb 18, 2020 10:48 am
No os this, I ask the Font with FontResquest.
Like this then?
Code: Select all
t = FontRequest("Select a font")
If t.name
OpenFont(1, t.name, t.size)
DebugPrint(GetAttribute(#FONT, 1, #ATTRFONTAA))
CloseFont(1)
EndIf
Re: FontRequest and GetAttribute
Posted: Wed Feb 19, 2020 11:46 am
by Juan Carlos
Thank you very much for your help jPV you are the best.
The good code for the font is with this:
Code: Select all
If t.name
OpenFont(1, t.name, t.size) ;Here we get the number of Font for get the attribute great idea.
Alias=GetAttribute(#FONT, 1, #ATTRFONTAA)
If Alias=True Then SetFontStyle(@ANTIALIAS)
endIf
And yes with this mixture of you code and mine, when you open a TrueType font you can set the antialysing and when is an Amiga font the code open the font usually.
Thank you, friend.