FontRequest and GetAttribute

Find quick help here to get you started with Hollywood
User avatar
jPV
Posts: 734
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: FontRequest and GetAttribute

Post 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 
User avatar
Juan Carlos
Posts: 933
Joined: Mon Sep 06, 2010 1:02 pm

Re: FontRequest and GetAttribute

Post 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.
Post Reply