[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.drawing

Creating a Custom Font with Constant Width

Christopher Secules

11/2/2004 7:35:00 PM

Is there any way to create a Custom Font to be used with Graphics.DrawString
that has a constant width in pixels?

I'm trying to code a display for an emulator that works as much like the
original piece of equipment as possible. The spec of the original piece
states that there are two possible fonts to choose from. They are 8x20 and
6x16, both in pixels. Is there any way to find a font like this whose
character size does not change with the kearning, but remains constant?

Thanks,
Chris


4 Answers

Bob Powell

11/3/2004 1:02:00 AM

0

There are true-type fonts for every imaginable application. Monospace fonts
too.

Search for True Type fonts on the web. You might find free ones or have to
pay a fee.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdipl...

The GDI+ FAQ RSS feed: http://www.bobpowell.net/f...
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tips...
Bob's Blog: http://bobpowelldotnet.blogspot.co...






"Christopher Secules" <secules@pica.army.mil> wrote in message
news:e6bu9LRwEHA.3084@TK2MSFTNGP10.phx.gbl...
> Is there any way to create a Custom Font to be used with
Graphics.DrawString
> that has a constant width in pixels?
>
> I'm trying to code a display for an emulator that works as much like the
> original piece of equipment as possible. The spec of the original piece
> states that there are two possible fonts to choose from. They are 8x20
and
> 6x16, both in pixels. Is there any way to find a font like this whose
> character size does not change with the kearning, but remains constant?
>
> Thanks,
> Chris
>
>


Frank Hileman

11/3/2004 4:04:00 PM

0

Hello Chris,

The FontFamily.GenericMonspace static property will return a FontFamily you
can use to construct a Font that has a fixed width per character. I see no
property on FontFamily indicating which are monospace.

Regards,
Frank Hileman

check out VG.net: www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor

"Christopher Secules" <secules@pica.army.mil> wrote in message
news:e6bu9LRwEHA.3084@TK2MSFTNGP10.phx.gbl...
> Is there any way to create a Custom Font to be used with
> Graphics.DrawString
> that has a constant width in pixels?
>
> I'm trying to code a display for an emulator that works as much like the
> original piece of equipment as possible. The spec of the original piece
> states that there are two possible fonts to choose from. They are 8x20
> and
> 6x16, both in pixels. Is there any way to find a font like this whose
> character size does not change with the kearning, but remains constant?
>
> Thanks,
> Chris
>
>


Bob Powell

11/3/2004 5:20:00 PM

0

Hmm, I interpreted the OP request as how to create a TTY emulator style
font.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdipl...

The GDI+ FAQ RSS feed: http://www.bobpowell.net/f...
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tips...
Bob's Blog: http://bobpowelldotnet.blogspot.co...






"Frank Hileman" <frankhil@no.spamming.prodigesoftware.com> wrote in message
news:%23FzV76bwEHA.2012@TK2MSFTNGP15.phx.gbl...
> Hello Chris,
>
> The FontFamily.GenericMonspace static property will return a FontFamily
you
> can use to construct a Font that has a fixed width per character. I see no
> property on FontFamily indicating which are monospace.
>
> Regards,
> Frank Hileman
>
> check out VG.net: www.vgdotnet.com
> Animated vector graphics system
> Integrated Visual Studio .NET graphics editor
>
> "Christopher Secules" <secules@pica.army.mil> wrote in message
> news:e6bu9LRwEHA.3084@TK2MSFTNGP10.phx.gbl...
> > Is there any way to create a Custom Font to be used with
> > Graphics.DrawString
> > that has a constant width in pixels?
> >
> > I'm trying to code a display for an emulator that works as much like the
> > original piece of equipment as possible. The spec of the original piece
> > states that there are two possible fonts to choose from. They are 8x20
> > and
> > 6x16, both in pixels. Is there any way to find a font like this whose
> > character size does not change with the kearning, but remains constant?
> >
> > Thanks,
> > Chris
> >
> >
>
>


Frank Hileman

11/3/2004 8:47:00 PM

0

You are probably right - Frank
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:evjj9lcwEHA.536@TK2MSFTNGP11.phx.gbl...
> Hmm, I interpreted the OP request as how to create a TTY emulator style
> font.