 |

07-27-2003, 09:49 PM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
How to smoothen fonts ?
|
I am having some problems when I print out using printer object.
I have added an attachment to below.
The fonts are not smooth. It appears very jaggered at the edges. The letter 'A' looks horrible. Is there anyway to smoothen the edges of the fonts?
|
|

07-27-2003, 11:16 PM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
|
To elaborate further, I tried to input text on label controls and printed it out. On screen it appears jaggered but when it is printed out, the fonts are very smooth.
The method I used is to make a screencapture of the fonts before I sent to print. Maybe this is the reason the fonts is so jaggered? Anyway for me to prevent the fonts from looking this way before I sent it for print?
|
|

07-27-2003, 11:46 PM
|
 |
Junior Contributor
|
|
Join Date: Oct 2002
Location: The Moon - Yes! Its true
Posts: 222
|
|
|
pixels, the problem is pixels, font sizes (11,12,14,16,ect) are values that tell the computer how may pixles to fit to the display grid (note only with SOME fonts others use these numbers to grab a line from their definitions)
if u use a number NOT on the normal list then the computer has to impravise (or if you capture form screen it is a bit map and wont be nice and clean - try to resize a bmp file, see what i mean?)
to fix this make SURE u dont use print screen (try form.print) or else try usiong standard print keywords to print control captions...
does this help?
|
__________________
"...You would know zat another word for an iconographer would be 'photographer'? From the old word photus in Latation, vhich means-'
'To prance around like a pillock ordering everyone about as if you owned the place?..."
|

07-28-2003, 12:32 AM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
I am not using printscreen. This is what I am using:
Set rPicture = hDCToPicture(hDC, lpRect.Left + 30, lpRect.Top + 100, 730, 145)
Printer.PaintPicture rPicture, Printer.CurrentX, Printer.CurrentY
Since the pixels is giving problem, what should I do?
Resizing the bmp is out of the question, since I need it to be of a fixed size.
Quote: Originally Posted by diamond_panther pixels, the problem is pixels, font sizes (11,12,14,16,ect) are values that tell the computer how may pixles to fit to the display grid (note only with SOME fonts others use these numbers to grab a line from their definitions)
if u use a number NOT on the normal list then the computer has to impravise (or if you capture form screen it is a bit map and wont be nice and clean - try to resize a bmp file, see what i mean?)
to fix this make SURE u dont use print screen (try form.print) or else try usiong standard print keywords to print control captions...
does this help?
|
|

07-28-2003, 01:25 AM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
|
The strangest part is that when I tried using printform, the fonts are very smooth! (but I cannot use printform since it cannot print A4 size)
|
|

07-28-2003, 02:37 AM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
|

07-28-2003, 03:56 AM
|
 |
Sinecure Expert
Super Moderator * Guru *
|
|
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 7,714
|
|
Quote: Originally Posted by pylc Please advice......
I don't know if it will work for your application, but the best way to get
exactly what you want on a printer is to print/write/draw directly to
the printer object.
i.e.
printer.font = "whatever you font is...."
printer.fontsize = 24
printer.line (0,0)-(24000,56000),vbRed,bf
printer.CurrentX = 5000
printer.CurrentY = 1000
printer.Print "USA"
....etc
printer.Enddoc
You can change the printer.ScaleWidth and ScaleHeight to make
addressing the paper in X,Y more convienient.
|
|

07-28-2003, 06:38 PM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
I can try doing this....but I need to print the form layout as well. These sticker designs are dynamic. Based on the database read in, the wordings and color of the stickers will change correspondingly. I can print the letters, but what about the design? I have some label controls which I need to draw in as well.
I attached a sample to illustrate the output I require. Basically the only problem now is that the wordings are very rough. Please advice! Thanks!
Quote: Originally Posted by passel
Quote: Originally Posted by pylc Please advice......
I don't know if it will work for your application, but the best way to get
exactly what you want on a printer is to print/write/draw directly to
the printer object.
i.e.
printer.font = "whatever you font is...."
printer.fontsize = 24
printer.line (0,0)-(24000,56000),vbRed,bf
printer.CurrentX = 5000
printer.CurrentY = 1000
printer.Print "USA"
....etc
printer.Enddoc
You can change the printer.ScaleWidth and ScaleHeight to make
addressing the paper in X,Y more convienient.
|
|

07-28-2003, 08:47 PM
|
 |
Ultimate Contributor
* Expert *
|
|
Join Date: Jun 2003
Location: New York, NY
Posts: 1,929
|
|
Quote: Originally Posted by pylc I am not using printscreen. This is what I am using:
Set rPicture = hDCToPicture(hDC, lpRect.Left + 30, lpRect.Top + 100, 730, 145)
Printer.PaintPicture rPicture, Printer.CurrentX, Printer.CurrentY
Since the pixels is giving problem, what should I do?
Resizing the bmp is out of the question, since I need it to be of a fixed size.
Technically, you are using print screen - you're taking a bitmap from display memory and sending it to the printer. The jaggedness comes from a difference of display resolutions - your screen shows you 96 DPI, and your printer is probably 300 or 600 (or more) DPI, so the jaggedness shows up 3x or 6x (or more) on your printer than on your screen.
I haven't worked with printing much myself, but I think the best way to do it is to use a printer object, as passel suggests.
|
|

07-28-2003, 09:18 PM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
I am willing to try this approach. But how do I print the label controls in my background?
Quote: Originally Posted by blindwig
Quote: Originally Posted by pylc I am not using printscreen. This is what I am using:
Set rPicture = hDCToPicture(hDC, lpRect.Left + 30, lpRect.Top + 100, 730, 145)
Printer.PaintPicture rPicture, Printer.CurrentX, Printer.CurrentY
Since the pixels is giving problem, what should I do?
Resizing the bmp is out of the question, since I need it to be of a fixed size.
Technically, you are using print screen - you're taking a bitmap from display memory and sending it to the printer. The jaggedness comes from a difference of display resolutions - your screen shows you 96 DPI, and your printer is probably 300 or 600 (or more) DPI, so the jaggedness shows up 3x or 6x (or more) on your printer than on your screen.
I haven't worked with printing much myself, but I think the best way to do it is to use a printer object, as passel suggests.
|
|

07-29-2003, 09:39 PM
|
 |
Sinecure Expert
Super Moderator * Guru *
|
|
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 7,714
|
|
Quote: Originally Posted by pylc I am willing to try this approach. But how do I print the label controls in my background?
Quote: Originally Posted by blindwig
Quote: Originally Posted by pylc I am not using printscreen. This is what I am using:
Set rPicture = hDCToPicture(hDC, lpRect.Left + 30, lpRect.Top + 100, 730, 145)
Printer.PaintPicture rPicture, Printer.CurrentX, Printer.CurrentY
Since the pixels is giving problem, what should I do?
Resizing the bmp is out of the question, since I need it to be of a fixed size.
Technically, you are using print screen - you're taking a bitmap from display memory and sending it to the printer. The jaggedness comes from a difference of display resolutions - your screen shows you 96 DPI, and your printer is probably 300 or 600 (or more) DPI, so the jaggedness shows up 3x or 6x (or more) on your printer than on your screen.
I haven't worked with printing much myself, but I think the best way to do it is to use a printer object, as passel suggests.
Not to leave you hanging, but when it comes to an alternative to printform (in order to get controls, buttons, labels,....) I haven't found
a real solution yet. I tried several things sometime back, but could
never get a large, smooth image. For my part, is was an investigation of
curiosity, so I didn't have to solve it, and never did.
' That's why I had the caveat "I don't know if it will work for your
application...", in my first post. Some others are drawing to picture
boxes, or printing on the form, and for those cases, going straight to
the printer, instead of using printform makes since. Since your picture,
only showed Text on Colored backgrounds, I thought that if there wasn't more to it than that, you could just print and draw to the printer.
Sorry I couldn't be helpful.
|
|

07-29-2003, 09:47 PM
|
 |
Sinecure Expert
Super Moderator * Guru *
|
|
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 7,714
|
|
Quote: Originally Posted by passel
Quote: Originally Posted by pylc I am willing to try this approach. But how do I print the label controls in my background?
Not to leave you hanging, but when it comes to an alternative to printform (in order to get controls, buttons, labels,....) I haven't found
a real solution yet. I tried several things sometime back, but could
never get a large, smooth image. For my part, is was an investigation of
curiosity, so I didn't have to solve it, and never did.
' That's why I had the caveat "I don't know if it will work for your
application...", in my first post. Some others are drawing to picture
boxes, or printing on the form, and for those cases, going straight to
the printer, instead of using printform makes since. Since your picture,
only showed Text on Colored backgrounds, I thought that if there wasn't more to it than that, you could just print and draw to the printer.
Sorry I couldn't be helpful.
There is a link to an commercial .ocx that claims to address this issue.
They have a free trial. You can check it out and see if it's worth it for
your situation.
http://www.componentgarden.com/vp_printform.htm
|
|

07-29-2003, 10:01 PM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
|
Sigh....Never expect its so hard to do a simple printing. Basically, my boss wants to print A4 size and want smooth fonts. Fonts must be 90 degrees rotated as well.
Printform cannot be used for the A4 since I need to duplicate a template image on the entire A4. Print object dont have the anti liasing capability althought it can print A4. sigh......
I thought I got the whole thing worked out, never thought I would be stuck with the anti liasing of the fonts. Althought printform seems to support anti liasing, it does not have the flexibility to print a specific area. Passel, thanks anyway.
|
|

07-29-2003, 10:03 PM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
|
I have tried the program you have indicated in the link before. It can do A4 printing, but the quality is very lousy. Does not address the issue of anti liasing.
|
|

07-29-2003, 10:36 PM
|
 |
Google Hound
Retired Moderator * Guru *
|
|
Join Date: Nov 2001
Location: Arizona, USA
Posts: 12,378
|
|
|
What are the specific controls you are trying to print?
|
__________________
Lou
"I have my standards. They may be low, but I have them!" ~ Bette Middler
"It's a book about a Spanish guy called Manual. You should read it." ~ Dilbert
"To understand recursion, you must first understand recursion." ~ unknown
|

07-29-2003, 11:32 PM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
1 Frame with labels and picturebox controls in it. The labels display letters while picturebox controls display 90 degress rotated letters.
All these have been done as shown in the attachment in the 1st post. The only problem is the printing is not smooth...
I convert the picture into image so that I can print out. This is a segment of the code I used:
'picturebox control is in the frame
rpicture cuts out the entire frame for print
Set frmMain.Picture12.Picture = frmMain.Picture12.Image
'cut out the viewport required for printing
Set rPicture = hDCToPicture(hDC, lpRect.Left + 30, lpRect.Top + 100, 730, 145)
Printer.PaintPicture rPicture, Printer.CurrentX, Printer.CurrentY
After that, I got all the jaggered letterings....
However when I used printform, the letterings for the lables are very smooth! Only the letterings for the picturebox controls are rough. Maybe because they are images?
Quote: Originally Posted by loquin What are the specific controls you are trying to print?
|
|

07-30-2003, 06:39 PM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
Problem! still awaiting your expertise!
Hi all, I am still stuck with this problem. How do I resolve it?
Quote: Originally Posted by pylc 1 Frame with labels and picturebox controls in it. The labels display letters while picturebox controls display 90 degress rotated letters.
All these have been done as shown in the attachment in the 1st post. The only problem is the printing is not smooth...
I convert the picture into image so that I can print out. This is a segment of the code I used:
'picturebox control is in the frame
rpicture cuts out the entire frame for print
Set frmMain.Picture12.Picture = frmMain.Picture12.Image
'cut out the viewport required for printing
Set rPicture = hDCToPicture(hDC, lpRect.Left + 30, lpRect.Top + 100, 730, 145)
Printer.PaintPicture rPicture, Printer.CurrentX, Printer.CurrentY
After that, I got all the jaggered letterings....
However when I used printform, the letterings for the lables are very smooth! Only the letterings for the picturebox controls are rough. Maybe because they are images?
Quote: Originally Posted by loquin What are the specific controls you are trying to print?
|
|

07-30-2003, 06:54 PM
|
 |
Sinecure Expert
Super Moderator * Guru *
|
|
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 7,714
|
|
Quote: Originally Posted by pylc Hi all, I am still stuck with this problem. How do I resolve it?
Quote: Originally Posted by pylc 1 Frame with labels and picturebox controls in it. The labels display letters while picturebox controls display 90 degress rotated letters.
All these have been done as shown in the attachment in the 1st post. The only problem is the printing is not smooth...
I convert the picture into image so that I can print out. This is a segment of the code I used:
'picturebox control is in the frame
rpicture cuts out the entire frame for print
Set frmMain.Picture12.Picture = frmMain.Picture12.Image
'cut out the viewport required for printing
Set rPicture = hDCToPicture(hDC, lpRect.Left + 30, lpRect.Top + 100, 730, 145)
Printer.PaintPicture rPicture, Printer.CurrentX, Printer.CurrentY
After that, I got all the jaggered letterings....
However when I used printform, the letterings for the lables are very smooth! Only the letterings for the picturebox controls are rough. Maybe because they are images?
Quote: Originally Posted by loquin What are the specific controls you are trying to print?
Can you zip up the font file and a form with some code in it that displays
what you are trying to print. I wouldn't mine playing with it, if I get the
time. Since you can print and draw directly to the printer with high
quality, it might be easy enough to design with that capablity in mind,
and emulate the form, not actually copy the form, for print out.
' It may be just a matter of thinking of a different paradigm, rather than
focusing on reproducing the form.
|
|

08-01-2003, 02:54 AM
|
|
Regular
|
|
Join Date: May 2003
Posts: 92
|
|
Problem resolved using patch!
Hi Passel. I am unable to smoothen the fonts using any anti-aliasing method. However I did bypass the problem by drawing all the controls from scratch using code ONLY. Then I do the printing using API. Right now I am able to get very smooth printout ! So I guess I wont need to bother you on this issue 
Thanks all for trying your best to help!
Quote: Originally Posted by passel
Quote: Originally Posted by pylc Hi all, I am still stuck with this problem. How do I resolve it?
Quote: Originally Posted by pylc 1 Frame with labels and picturebox controls in it. The labels display letters while picturebox controls display 90 degress rotated letters.
All these have been done as shown in the attachment in the 1st post. The only problem is the printing is not smooth...
I convert the picture into image so that I can print out. This is a segment of the code I used:
'picturebox control is in the frame
rpicture cuts out the entire frame for print
Set frmMain.Picture12.Picture = frmMain.Picture12.Image
'cut out the viewport required for printing
Set rPicture = hDCToPicture(hDC, lpRect.Left + 30, lpRect.Top + 100, 730, 145)
Printer.PaintPicture rPicture, Printer.CurrentX, Printer.CurrentY
After that, I got all the jaggered letterings....
However when I used printform, the letterings for the lables are very smooth! Only the letterings for the picturebox controls are rough. Maybe because they are images?
Quote: Originally Posted by loquin What are the specific controls you are trying to print?
Can you zip up the font file and a form with some code in it that displays
what you are trying to print. I wouldn't mine playing with it, if I get the
time. Since you can print and draw directly to the printer with high
quality, it might be easy enough to design with that capablity in mind,
and emulate the form, not actually copy the form, for print out.
' It may be just a matter of thinking of a different paradigm, rather than
focusing on reproducing the form.
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|