Using System and FixedSys fonts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Buddy

    #1

    Using System and FixedSys fonts

    Hello,

    How can I use the 'System' or 'FixedSys' font in my .NET
    application using controls (TextBox, Button and ListView)?

    Thanks,
  • Buddy

    #2
    RE: Using System and FixedSys fonts

    Thanks for the reply,

    I understand that .Net does not support non-true type
    fonts (ie Screen Fonts). I should of made that clear in my
    question, but what I did to know if there are any sample
    code out there which uses GDI rather than GDI+ to draw
    text using Screen Fonts. The problem I've got is I'm doing
    a conversion into C#, the existing code uses FixedSys and
    System in almost every screen, I've already tried using
    Courier New and Lucia Console and they do not give a good
    match.

    Thanks,
    [color=blue]
    >-----Original Message-----
    >Hi, Buddy
    >
    >VS.Net can't use bitmap fonts in font objects. If you[/color]
    need a fixed space[color=blue]
    >font, your best bet would be 'Courier New'
    >
    >Thank you for choosing the MSDN Managed Newsgroups,
    >
    >John Eikanger
    >Microsoft Developer Support
    >
    >This posting is provided "AS IS" with no warranties, and[/color]
    confers no rights.[color=blue]
    >(c) 2003 Microsoft Corporation. All rights reserved.
    >--------------------
    >| Content-Class: urn:content-classes:message
    >| From: "Buddy" <Buddy@Onlinewo rk.com>
    >| Sender: "Buddy" <Buddy@Onlinewo rk.com>
    >| Subject: Using System and FixedSys fonts
    >| Date: Mon, 4 Aug 2003 03:55:31 -0700
    >| Lines: 6
    >| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
    >|
    >| Hello,
    >|
    >| How can I use the 'System' or 'FixedSys' font in[/color]
    my .NET[color=blue]
    >| application using controls (TextBox, Button and[/color]
    ListView)?[color=blue]
    >|
    >| Thanks,
    >|
    >
    >.
    >[/color]

    Comment

    • John Hornick [MSFT]

      #3
      RE: Using System and FixedSys fonts

      Hi,

      [color=blue]
      > I understand that .Net does not support non-true type
      > fonts (ie Screen Fonts). I should of made that clear in my
      > question, but what I did to know if there are any sample
      > code out there which uses GDI rather than GDI+ to draw
      > text using Screen Fonts. The problem I've got is I'm doing
      > a conversion into C#, the existing code uses FixedSys and
      > System in almost every screen, I've already tried using
      > Courier New and Lucia Console and they do not give a good
      > match.[/color]


      Your original question indicated that you wanted to have some
      of the standard controls use this font. That's not going to
      happen - those controls use System.Drawing to do their drawing,
      and are therefore limited to TT fonts.

      You could interop with GDI, provided you'll be the one calling
      TextOut() or ExtTextOut(). This means that you'll have to handle
      all the drawing for every control which you intend to use these
      fonts.

      You'd really be better off using a replacement TT font, unless
      you're up for that much effort. But if you want to do it yourself,
      you can probably find some code examples on gotdotnet.com top show
      how to draw the controls yourself, and probably how to interop too.

      Thanks,
      - John
      Microsoft Developer Support
      This posting is provided "AS IS" with no warranties, and confers no rights.
      Visit http://www.microsoft.com/security for current information on security.

      Comment

      Working...