Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Monospaced font (i.e. "Terminal" font in FontDialog

Monospaced font (i.e. "Terminal" font in FontDialog

Scheduled Pinned Locked Moved C#
question
8 Posts 6 Posters 18 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ronald Boucher
    wrote on last edited by
    #1

    I've brought up the FontDialog to select the font for my custom terminal windows (3 terminal windows in 1 app). The FontDialog doesn't show this installed "Terminal" font. Can anyone give me some pointers to enable me to use this font? Thanks!

    L J T D 4 Replies Last reply
    0
    • R Ronald Boucher

      I've brought up the FontDialog to select the font for my custom terminal windows (3 terminal windows in 1 app). The FontDialog doesn't show this installed "Terminal" font. Can anyone give me some pointers to enable me to use this font? Thanks!

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Quote:

      Cascadia Code is a new monospaced font from Microsoft that provides a fresh experience for command-line applications and text editors. Cascadia Code was developed alongside Windows Terminal. This font is most recommended to be used with terminal applications and text editors such as Visual Studio and Visual Studio Code.

      [Windows Terminal Cascadia Code | Microsoft Learn](https://learn.microsoft.com/en-us/windows/terminal/cascadia-code)

      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

      1 Reply Last reply
      0
      • R Ronald Boucher

        I've brought up the FontDialog to select the font for my custom terminal windows (3 terminal windows in 1 app). The FontDialog doesn't show this installed "Terminal" font. Can anyone give me some pointers to enable me to use this font? Thanks!

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        Myself I am more curious as to the original question - why doesn't it show up. How do you know it is installed? On my Windows 10 box I looked in the C:\Windows\Fonts folder and also via the Control Panel. It is there. Also when I open Notepad I can see it there also. Presumably you are using the default ctor when you create the FontDialog(). When I look at the docs the default suggests that it should load all of the Fonts. Given that I have not tried it but could it just be somewhere else in the list?

        1 Reply Last reply
        0
        • R Ronald Boucher

          I've brought up the FontDialog to select the font for my custom terminal windows (3 terminal windows in 1 app). The FontDialog doesn't show this installed "Terminal" font. Can anyone give me some pointers to enable me to use this font? Thanks!

          T Offline
          T Offline
          trønderen
          wrote on last edited by
          #4

          'Terminal' is an old style bitmap font. Characters are drawn as white and black pixels in a fixed size rectangle, e.g. 7×11 pixels. The character size depends on the resolution (DPI) of your screen. You can identify Terminal as a bitmap font by the filename extension .fon. You will see a number of other .fon files in the Fonts directory, but note that the file name may be different from the font name, and each variation (bold, italics etc.) is in a different file. Some bitmap fonts also have different size variants. Bitmap fonts are not scalable, except by integer factors, by drawing each pixel in the character definition as a 2×2 or 3×3 block of identical pixels. In large sizes, characters look as if shaped from Lego bricks. All modern font formats (i.e. from Windows 3.1 and later) Bezier curves to describe the outline of a character. Bezier curves are continuous functions that can be scaled up and down with no resolution issues. Bitmap fonts were suitable when almost all screens were 600×800 pixels, high resolution ones were 800×1024. Today, 7×11 pixels on a smartphone display is a tiny little speck. So most software consider un-scalable fonts an outdated technology, dropping support for it. (Compare it to character encoding: Old time editors could save your text in 7-bit ASCII with even, odd or no parity. I haven't seen that option for thirty years!) Windows has APIs for enumerating all fonts, including bitmap ones, and support for them is still provided. You may use them in your own application, and you may provide a font selector displaying them as alternatives. The enumeration functions have filtering options, and if you want to further limit the options, the returned info contains a lot of properties that you may test before adding them to your font select dialog. The only significant advantage of bitmap fonts is that rendering is super fast. If you run an 8-bit embedded system with a 48×160 pixels display, and the single button cell should should last for a year, then bitmap fonts are for you. Otherwise: Probably not. It makes sense for Windows and Windows applications to drop support for them. (Windows itself still has support, but user interfaces may skip bitmap fonts, as being obsolete.)

          1 Reply Last reply
          0
          • R Ronald Boucher

            I've brought up the FontDialog to select the font for my custom terminal windows (3 terminal windows in 1 app). The FontDialog doesn't show this installed "Terminal" font. Can anyone give me some pointers to enable me to use this font? Thanks!

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            You don't want to use Terminal. It is a 40-year-old bitmap "font" that does not support Unicode and is not scalable. It's basically a bunch of bitmap images with characters at different sizes. If you try to use a size that doesn't exist, you get a scaled up or down version (done badly!) to the required size. You cannot turn the font back on as it, and all the other bitmap fonts, have been deprecated. They are still distributed with Windows for backward compatibility, but the FontDialog provided by the system (which the .NET class of the same name wraps) will not show them. Any old code that uses the old fonts has to include specific code to be able to use them. It is not the same as code used to day to use an of the scalable font types. The suggested replacement for Terminal is Consolas.

            Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
            Dave Kreskowiak

            Richard Andrew x64R J 2 Replies Last reply
            0
            • D Dave Kreskowiak

              You don't want to use Terminal. It is a 40-year-old bitmap "font" that does not support Unicode and is not scalable. It's basically a bunch of bitmap images with characters at different sizes. If you try to use a size that doesn't exist, you get a scaled up or down version (done badly!) to the required size. You cannot turn the font back on as it, and all the other bitmap fonts, have been deprecated. They are still distributed with Windows for backward compatibility, but the FontDialog provided by the system (which the .NET class of the same name wraps) will not show them. Any old code that uses the old fonts has to include specific code to be able to use them. It is not the same as code used to day to use an of the scalable font types. The suggested replacement for Terminal is Consolas.

              Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
              Dave Kreskowiak

              Richard Andrew x64R Offline
              Richard Andrew x64R Offline
              Richard Andrew x64
              wrote on last edited by
              #6

              Very interesting!

              The difficult we do right away... ...the impossible takes slightly longer.

              1 Reply Last reply
              0
              • D Dave Kreskowiak

                You don't want to use Terminal. It is a 40-year-old bitmap "font" that does not support Unicode and is not scalable. It's basically a bunch of bitmap images with characters at different sizes. If you try to use a size that doesn't exist, you get a scaled up or down version (done badly!) to the required size. You cannot turn the font back on as it, and all the other bitmap fonts, have been deprecated. They are still distributed with Windows for backward compatibility, but the FontDialog provided by the system (which the .NET class of the same name wraps) will not show them. Any old code that uses the old fonts has to include specific code to be able to use them. It is not the same as code used to day to use an of the scalable font types. The suggested replacement for Terminal is Consolas.

                Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                Dave Kreskowiak

                J Offline
                J Offline
                jschell
                wrote on last edited by
                #7

                Dave Kreskowiak wrote:

                but the FontDialog provided by the system (which the .NET class of the same name wraps) will not show them.

                That would answer the original question then.

                T 1 Reply Last reply
                0
                • J jschell

                  Dave Kreskowiak wrote:

                  but the FontDialog provided by the system (which the .NET class of the same name wraps) will not show them.

                  That would answer the original question then.

                  T Offline
                  T Offline
                  trønderen
                  wrote on last edited by
                  #8

                  Just for nitpicking: Even if the system FontDialog doesn't show 'Terminal', the OP may very well be 'enabled to use this font', as he were asking. You can't force the system FontDialog box to show it, but you can write your own FontDialog, including all the alternatives that you would like to appear.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups