Solved

Anti Alias'ed fonts

Posted on 1998-06-03
8
282 Views
Last Modified: 2013-12-02
Could Anyone Help me with drawing Anti-Aliasing Fonts
and Gradient Fills on A 'label' control in VB5 PE?

I REEEEEEEELLLLY need this for a Character Generator program
so pls pls pls pls reply.
0
Comment
Question by:KEWL
  • 4
  • 4
8 Comments
 
LVL 1

Author Comment

by:KEWL
Comment Utility
ANSWER ME DAMMIT!!!!!!!


please...
0
 
LVL 1

Expert Comment

by:EvanL
Comment Utility
You won't be able to use screen fonts and make them anti aliased unless the user has MS Screen Smoothing installed.  The only thing you can do on a machine where it is NOT installed, is to display the font as a graphic.  A label control would have its caption set with the text and font, but would not appear anti aliased without the utility from MS.  
0
 
LVL 1

Expert Comment

by:EvanL
Comment Utility
Oh yeah... the gradiant fills..  You can do that with various objects in VB5, but not label controls to the best of my knowledge.  There are tons of bits of available code on the web to do the gradiant fills.

Here's the one I use and like best:

Sub Gradient(TheObject As Object, Redval&, Greenval&, Blueval&)

'TheObject can be any object that supports the Line method (like forms and pictures).
'Redval, Greenval, and Blueval are the Red, Green, and Blue starting values from 0 to 255.

Dim Step%, Reps%, FillTop%, FillLeft%, FillRight%, FillBottom%, HColor$

'This will create 63 steps in the gradient. This looks smooth on 16-bit and 24-bit color.
'You can change this, but be careful. You can do some strange-looking stuff with it...
Step = (TheObject.Height / 63)
   
FillLeft = 0
FillRight = TheObject.Width
FillBottom = FillTop + Step

'If you changed the number of steps, change the number of reps to match it.
'If you don't, the gradient will look all funny.
For Reps = 1 To 63
    TheObject.Line (FillLeft, FillTop)-(FillRight, FillBottom), RGB(Redval, Greenval, Blueval), BF
    'This decreases the RGB values to darken the color.
    'Lower the value for "squished" gradients. Raise it for incomplete gradients.
    'Also, if you change the number of steps, you will need to change this number.
    Redval = Redval - 4
    Greenval = Greenval - 4
    Blueval = Blueval - 4
    'This prevents the RGB values from becoming negative, which causes a runtime error.
    If Redval <= 0 Then Redval = 0
    If Greenval <= 0 Then Greenval = 0
    If Blueval <= 0 Then Blueval = 0
    FillTop = FillBottom
    FillBottom = FillTop + Step
Next
End Sub


I didn't submit this as an answer, because I'm not entirely sure from your question if this was what you were after..  If it is, you can let me submit this as the answer.  K?

Thanks,

EvanL
0
 
LVL 1

Author Comment

by:KEWL
Comment Utility
Where do I get MS Screen Smoothing From?

and Does ne1 know what VB5 uses instead of 'print' to print text onto objects the way vb4 does?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Accepted Solution

by:
EvanL earned 200 total points
Comment Utility
Get the free font smoother from:

http://www.microsoft.com/truetype/grayscal/smoother.htm

I suppose you could include this with your program, but you should read the licencing agreement first to make sure.  On Windows 95, anti-aliased screen fonts is an option, not a default.  Don't know what you mean by your last question.  Please rephrase..
0
 
LVL 1

Author Comment

by:KEWL
Comment Utility
Just Chekin the site out... brb
0
 
LVL 1

Author Comment

by:KEWL
Comment Utility
Not xactly what I wanted, but good enough
0
 
LVL 1

Expert Comment

by:EvanL
Comment Utility
The other thing you could try (don't know how well it would work), is to try to use text in jpg, gif, or bmp pictures.  That way, you can antialias the text, and it would appear smooth on anyone's computer.  

Didn't know if you saw, but you go to your Display Properties in the Win95 Control Panel > Plus! to adjust the new features that that download gave you.  


0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now