Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Fonts in Console Window

- - - - -

  • Please log in to reply
8 replies to this topic

#1
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,390 posts
  • OS:none specified
  • Country: Country Flag
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.mydigital...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....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.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.mydigital...command-prompt/

Consolas
Vista or 7 or Power Point 2007 Viewer:
http://labnol.blogsp...ts-legally.html

DejaVu Sans Mono
http://dejavu-fonts....?title=Download

Droid Sans Mono
http://damieng.com/b...eat-coding-font

Found on:
http://blog.wolffmyr...command-window/

Edited by jaclaz, 15 February 2010 - 09:54 AM.



How to remove advertisement from MSFN

#2
GrofLuigi

GrofLuigi

    GroupPolicy Tattoo Artist

  • Member
  • PipPipPipPipPipPip
  • 1,357 posts
  • OS:none specified
  • Country: Country Flag

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
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,390 posts
  • OS:none specified
  • Country: Country Flag
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

Edited by jaclaz, 22 February 2010 - 09:08 AM.


#4
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,390 posts
  • OS:none specified
  • Country: Country Flag
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

Edited by jaclaz, 27 September 2011 - 12:49 PM.


#5
CoffeeFiend

CoffeeFiend

    Coffee Aficionado

  • Super Moderator
  • 5,399 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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

Attached Files


Coffee: \ˈkȯ-fē, ˈkä-\. noun. Heaven in a cup. Life's only treasure. The meaning of life. Kaffee ist wunderbar. C8H10N4O2 FTW.

#6
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,390 posts
  • OS:none specified
  • Country: Country Flag

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...t40\GPI4.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

#7
CoffeeFiend

CoffeeFiend

    Coffee Aficionado

  • Super Moderator
  • 5,399 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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

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.
Coffee: \ˈkȯ-fē, ˈkä-\. noun. Heaven in a cup. Life's only treasure. The meaning of life. Kaffee ist wunderbar. C8H10N4O2 FTW.

#8
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,390 posts
  • OS:none specified
  • Country: Country Flag

(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
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,390 posts
  • OS:none specified
  • Country: Country Flag
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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN