MSFN Forum: Fonts in Console Window - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Fonts in Console Window Program to check characteristics Rate Topic: -----

#1 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 15 February 2010 - 09:42 AM

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/

Quote

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

Quote

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.micro...kb/247815/en-us

And the questions are:
  • is there a program that can go through a Fonts directory and point out these characteristics of the fonts?
  • 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?
  • 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.co...ite-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....?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/

This post has been edited by jaclaz: 15 February 2010 - 09:54 AM



#2 User is offline   GrofLuigi 

  • GroupPolicy Tattoo Artist
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,275
  • Joined: 21-April 05
  • OS:none specified
  • Country: Country Flag

Posted 15 February 2010 - 10:04 AM

View Postjaclaz, on Feb 15 2010, 04:42 PM, said:

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

Definitions of Terms Used When Describing Fonts (I hope it will come out right).

Wheee, I got to answer jaclaz a question! :thumbup

GL

#3 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 22 February 2010 - 05:13 AM

Thanks. :)

Found something "in the right direction":
http://www.codeproje...Enumerator.aspx

but NOT really "it". :(

This is almost it (Excel VBA):
http://www.pcreview....d-3794133-1.php
http://www.pcreview....743&postcount=7

jaclaz

This post has been edited by jaclaz: 22 February 2010 - 09:08 AM


#4 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 27 September 2011 - 11:24 AM

Just to keep things as together as possible.
More suitable fonts, source:
http://smallvoid.com...d-add-font.html
  • Bitstream Vera Sans Mono
  • Andale Mono


More here:
http://www.openwatco...ogrammers_Fonts


jaclaz

This post has been edited by jaclaz: 27 September 2011 - 12:49 PM


#5 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,399
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 27 September 2011 - 08:05 PM

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

View Postjaclaz, on 15 February 2010 - 09:42 AM, said:

  • 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.

View Postjaclaz, on 15 February 2010 - 09:42 AM, said:

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

Attached File(s)



#6 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 28 September 2011 - 03:06 AM

View PostCoffeeFiend, on 27 September 2011 - 08:05 PM, said:

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.codeproje...Enumerator.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...0%5CGPI4.INF+80

Quote

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

#7 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,399
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 28 September 2011 - 05:12 AM

View Postjaclaz, on 28 September 2011 - 03:06 AM, said:

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.

View Postjaclaz, on 28 September 2011 - 03:06 AM, said:

Maybe modifying the already posted source code and compiling it to show the 4 characteristics mentioned?
http://www.codeproje...Enumerator.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.

View Postjaclaz, on 28 September 2011 - 03:06 AM, said:

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.

#8 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 28 September 2011 - 05:16 AM

View PostCoffeeFiend, on 28 September 2011 - 05:12 AM, said:

(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

#9 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 28 September 2012 - 04:38 AM

Adobe released a new FREE font that is "console compliant":
http://reboot.pro/17557/
http://blogs.adobe.c...e-code-pro.html
http://sourceforge.n...ecodepro.adobe/

jaclaz

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy