Announcement

Collapse
No announcement yet.

Better font size

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Better font size

    Does anyone know how to create a font
    so a DOS program can be displayed about
    (8 x 15) or a little less wide.
    This would make it possible for DOS
    programs to look full screen, but be in
    a Window. This allows the task bar
    to be visible and Windows programs will
    quit minimizing the DOS program.
    (8 x 14) is too wide and a little short.
    (9 x 15) is too wide, the height is great.
    How long is an idea? Write it down.

  • #2
    Mike --

    What screen resolution are you using?

    An 8x14 font is 8 pixels wide, so an 80-column console would be 640 pixels wide. A 9x15 font is 9 pixels wide, so an 80-column console would be 720 pixels wide. It is possible to find a font size that fills the screen exactly (from left to right) in all standard Windows screen resolutions except 1024x768. 1024 divided by 80 is 12.8 so you'd need a font that was 12.8 pixels wide, and there is no such thing.

    640x480 - use 8-by-something fonts
    800x600 - use 10-by-something fonts
    1024x768 - use 12- or 13-by-something for an approximate fit
    1280x1024 - use 16-by-something fonts

    The basic answer to your question is that there is no such thing as a font that is between 8 and 9 pixels wide. Windows can only create fonts that have integer dimensions. (And I'm not just talking about console fonts... that's true of all Windows fonts.)

    All of the above assumes that the Task Bar is located at the bottom or top of the desktop. If the Task Bar is on the right or left, all bets are off.

    As you know, my company's CWC program -- part of Console Tools -- can automatically use the largest console font that does not over-fill the screen, using the screen resolution and the Task Bar location at runtime.

    -- Eric


    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>

    "Not my circus, not my monkeys."

    Comment


    • #3
      Oops... I must have misread your question. 8x14 is too wide??? Your Task Bar must be on the left or right, right?

      If I'm not mistaken, if you specify the TrueType fonts you can use an 8x16 font. Would that do it? If selecting the font size with the Properties Menu doesn't work, try CWC. It allows the selection of many different font sizes that can't be specified "manually".

      -- Eric

      ------------------
      Perfect Sync: Perfect Sync Development Tools
      Email: mailto:[email protected][email protected]</A>



      [This message has been edited by Eric Pearson (edited May 22, 2000).]
      "Not my circus, not my monkeys."

      Comment


      • #4
        I use 640 x 480 for development and have
        the task bar on the bottom.
        I guess I'm looking for a 8 x 15 font.
        It would also be nice to be able to
        adjust the font automatically based
        upon the users screen resolution.
        If I send out a demo in 9 x 15 and
        the user is running at 640 x 480 it
        doesn't look right and there is no
        8 x 15 font.

        How about an adjustable font size routine
        based upon resolution and and a 8 x 15
        font in case running at 640 x 480.

        When running at 8 x 14 True Type the characters
        look funny at 640 x 480 though they fit on
        the screen. They look stretched out and the
        highlighting of characters looks bad.
        The best looking screen at all resolutions
        appears to be 5 x 12, but of course it is
        too small unless run on a big monitor.




        ------------------
        How long is an idea? Write it down.

        Comment


        • #5
          > It would also be nice to be able to
          > adjust the font automatically based
          > upon the users screen resolution.

          The only way to do that is with CWC's MAX option. It is not possible for a DOS or console application to adjust its own console font programmatically, so CWC is used to automatically create a console with the desired font type and font size, and then it automatically launches the "target" app in that console.

          > I guess I'm looking for a 8 x 15 font.

          Here is the way console fonts are sized vertically:

          On Windows 98, NT4, and 2000, take the TrueType width and divide it by 0.60. For example, a font that is 8 pixels wide would produce a value of 13.3333333...

          That means that TrueType fonts that are 8x13 and 8x14 are available. Only the smaller of the two can be selected with the console Properties menu. If you use CWC you can explicitly select either size, or specify "MAX" and CWC will alway uses the larger of the two sizes.

          On Windows 95 computers, the TrueType formula is much more complex. Generally speaking, the aspect ratio is around 0.54 (i.e. the font is slightly taller) and two vertical sizes are not always available.

          The bitmap (or "raster") fonts are even more complex. Please consult the Console Tools Help File under "CWC" for a complete list, but most of the standard non-TrueType fonts are significantly shorter than the TrueType fonts of the same width.

          CWC allows you to select more than twice as many bitmap/raster font sizes as the Properties menu. Hmmm... You may be able to use CWC to specify an 8x16 bitmap/raster font, since 16 is a "multiple" of a standard height (8) and multiples often work. Have you tried it?

          Finally, yes it would be possible for you to design and install a custom font that was 8x15 but it would not be easy. Here is the URL...

          http://support.microsoft.com/support.../Q105/2/99.asp

          If you create a font, you will be able to select it with CWC. But that's not the end of the problem because some people use a two-row Task Bar (like me) and some use a no-row ("auto-hide") Task Bar so... How tall does the font need to be? Another option is to add rows to the console to change its vertical size, but then what do you do with the extra rows?

          The only "final answer" would be to write a PB/DLL app that checks all of the possible variables -- resolution, task bar location and mode, row count, and so on -- and creates a custom CWC configuration file at runtime. Then CWC could create exactly the console you need to cover all possible circumstances.

          -- Eric

          P.S. The new version of CWC -- coming soon -- works with both console and DOS applications. Previous versions worked only with console apps.

          ------------------
          Perfect Sync: Perfect Sync Development Tools
          Email: mailto:[email protected][email protected]</A>



          [This message has been edited by Eric Pearson (edited May 22, 2000).]
          "Not my circus, not my monkeys."

          Comment


          • #6
            Eric,
            The new CWC with MAX for a DOS application
            will do it. Look forward to using it.
            Thank you,
            Mike


            ------------------
            How long is an idea? Write it down.

            Comment

            Working...
            X