Jump to content

Fonts in Console Window


jaclaz

Recommended Posts

I think that one of the "less clear" things in the "Windows business" are Fonts.

The information about them is on half of the internet, but often (read ALWAYS) it is not clear.

Take this (nice BTW :thumbup ) page for example:

http://www.mydigitallife.info/2008/11/20/h...command-prompt/

Before adding more fonts to command prompts, there are few criteria that must be fulfilled:

  • The font must be a fixed-pitch font.
  • The font can’t be an italic font or have a negative A or C space.
  • The font must be FF_MODERN for TrueType fonts.
  • The font must be OEM_CHARSET for non TrueType font.

And this one:

http://windowsitpro.com/article/articleid/...le-windows.html

The font must be a non-italic, fixed-pitch font, and it can’t have a negative A or C space. If it’s a True Type font, it must be FF_MODERN; if it isn’t a TrueType font, it must be OEM_CHARSET.

Evidently more or less copy/paste from:

http://support.microsoft.com/kb/247815/en-us

And the questions are:

  1. is there a program that can go through a Fonts directory and point out these characteristics of the fonts?
  2. is there any FREEWARE program that can change the charactristics of, say, a fixed pitch font but NOT FF_MODERN to FF_MODERN or a "converter" kind of app?
  3. if yes, where is it?

Also, can please someone explain what the heck is a "negative A or C space"? :blink:

jaclaz

As a Side note:

Fonts that have these characteristics:

White Rabbit:

http://www.dafont.com/white-rabbit.font

Found on:

http://www.mydigitallife.info/2008/11/20/h...command-prompt/

Consolas

Vista or 7 or Power Point 2007 Viewer:

http://labnol.blogspot.com/2007/03/downloa...ts-legally.html

DejaVu Sans Mono

http://dejavu-fonts.org/wiki/index.php?title=Download

Droid Sans Mono

http://damieng.com/blog/2007/11/14/droid-s...eat-coding-font

Found on:

http://blog.wolffmyren.com/2009/02/26/nece...command-window/

Edited by jaclaz
Link to comment
Share on other sites


Thanks. :)

Found something "in the right direction":

http://www.codeproject.com/KB/system/FontEnumerator.aspx

but NOT really "it". :(

This is almost it (Excel VBA):

http://www.pcreview.co.uk/forums/thread-3794133-1.php

http://www.pcreview.co.uk/forums/showpost.php?p=13163743&postcount=7

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

  • 1 year later...

You're slowly building a list of what a lot of people call "programmer's fonts"

  • The font must be a fixed-pitch font.
  • The font can’t be an italic font or have a negative A or C space.
  • The font must be FF_MODERN for TrueType fonts.
  • The font must be OEM_CHARSET for non TrueType font.

You can get all of that information in the NEWTEXTMETRIC struct. You get this information by calling EnumFontFamiliesEx, which returns data using a EnumFontFamExProc callback. That callback will either get a NEWTEXTMETRICEX struct (which contains the NEWTEXTMETRIC struct) if it's a TTF, or otherwise an old TEXTMETRIC struct which contains most of the infos.

Also, can please someone explain what the heck is a "negative A or C space"? :blink:

Is that a yes/no answer? ;) Here it really means the NTM_NONNEGATIVE_AC bit is set. Or that the space is NOT set to a negative amount ever, while being displayed at any particular size, which would normally be used to maintain proper kerning with some specific surrounding letters e.g. VA where the bottom of the A is located well under the V, instead of having that large empty oblique space between both (see the attached png, using Helvetica Neue LT Pro as-is on top with its standard negative spacing, and on the bottom using manual kerning to get rid of the said negative space to illustrate the effect)

It's just a matter of writing a small font "enumerator" which will check for some bits being set or not in the returned struct, and when they match then display the font's name. It should be pretty straightforward.

HTH

post-24596-0-34455300-1317176882_thumb.p

Link to comment
Share on other sites

It's just a matter of writing a small font "enumerator" which will check for some bits being set or not in the returned struct, and when they match then display the font's name. It should be pretty straightforward.

Yep. :)

By any chance are you volunteering for it?

Maybe modifying the already posted source code and compiling it to show the 4 characteristics mentioned?

http://www.codeproject.com/KB/system/FontEnumerator.aspx

Thanks for the A C negative space explanation, I do appreciate it. :), though Grofluigi already pointed me to the right info:

http://www.warpspeed.com.au/cgi-bin/inf2html.cmd?..%5Chtml%5Cbook%5CToolkt40%5CGPI4.INF+80

a-space, b-space, c-space - The a-space is the distance from the left of the character frame to the left edge of the character. The b-space is the width of the character. The c-space is the distance from the right edge of the character to the right of the character frame. Negative values of a and c allow adjacent character frames to overlap. See also character increment, and space default values.

jaclaz

Link to comment
Share on other sites

By any chance are you volunteering for it?

It did come across my mind but I'm currently very busy (and sleep deprived). If nobody has by next weekend (and that I don't forget about this) then I'll probably write something quick.

Maybe modifying the already posted source code and compiling it to show the 4 characteristics mentioned?

http://www.codeproject.com/KB/system/FontEnumerator.aspx

I had missed that (only seen the VBA stuff). I can't say I'm a huge fan of C++ & MFC (way too much work and complexity for very little benefit). I'll have to look sometime.

though Grofluigi already pointed me to the right info:

Sorry about that. I hadn't followed that link. It sounded a page like generic vocabulary about general terms which I already know, being into typography and working with this kind of stuff in InDesign & Photoshop.

Link to comment
Share on other sites

(and that I don't forget about this)

I think this can be avoided by yours truly :whistle:;).....

:angel

Obviously NO actual timeline or deadline, you have all the time of the world, this thread has been languishing for 1 1/2 year, no actual need ofr anything "fast". :thumbup

jaclaz

Link to comment
Share on other sites

  • 11 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...