Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 VB6 Font usage

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
maxhamner Posted - Nov 11 2004 : 08:20:27 AM
Here is the font I use to load fonts for my apps without installing them. Not very special, but handy. I use this instead of making bitmaps of fonts so I can draw text in any size/color in my programs, and even do 'drop shadows' by drawing the font twice (black with offset, normal without offset), and other effects.

The nice part is that DX7 can use them once they (fonts) are added. The calcwidth, calcheight functions make it easy to mange where you will draw the text to center it, handle wrapping etc.

If you have a 'box" where you draw messages you can use "calctextwidth" on each word, and if it doesn't go outside the box use the Directdraw function "drawtext" with the last parameter set to true to append the last draw... makes for a super easy word wrap that works in ANY font/size.

Download Attachment: Font.bas
13.31 KB
2   L A T E S T    R E P L I E S    (Newest First)
CoBreaker Posted - Nov 12 2004 : 07:48:41 AM
this is very interesting, but! can u help? lol i mean:

• what u mean by fontname? its the file name or font name?
• does i need to add the extension? (TTF)
• how can that be drawn on the form?? i mean i can print it but the font is the default only the size changes when use the size of the fontmod.calctextwidth...
Eric Coleman Posted - Nov 11 2004 : 08:32:11 AM
That's an interesting method you use for calculating the text's width and height.

VBGamer © Go To Top Of Page
This page was generated in 0.07 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.