[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

RE: Print using Printer Fonts in c# app

cmarchal

11/1/2004 4:21:00 PM

The GDI+ library used by the .NET framework will only use TrueType and
OpenType fonts. It does not allow you to access printer fonts. What
usually happends is that you specify the name of the printer font but the
GDI+ library will use a default TrueType font.

In order to access the printer font, you will need to bypass the .NET
framework drawing libraries (i.e. GDI+) and use GDI.

When you come to print, you can get use the Graphics.GetHdc method to get
handle you can use with GDI. You then use GDI routines to select the
printer font and draw the character for the symbol you need to print. You
then call Graphics.ReleaseHdc to continue with the rest of the printing in
.NET.

Chris Marchal
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.