| language
Information, tips and tutorials for ZTree file manager
Selecting a custom font for ZTreeWin
ZTreeWin is a console application and requires a Monospace fontZTreeWin v1 uses the OEM character set? ZTreeWin v2 uses Unicode.
The Help file "3.12 Shortcut Setup" describes how to set font type and size.
Unfortunately there are few choices of font.
Win98 et al only allow a choice between Bitmap & TrueType in various font sizes.
W2K & XP allow Raster or Lucida Console, despite the fact that at least one other "Courier New" is already installed.
Microsoft explains how to add fonts
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont
Examples:-
"0"="Lucida Console"
"00"="Courier New"
"000"="Andale Mono"
"0000"="Consolas"
"00000"="DejaVu Sans Mono"
| Add a String Value | |||
| Name=00 | The name needs to be incremented with "0" for each additional font | ||
| Data="Font Name" | |||
Examples:-
"0"="Lucida Console"
"00"="Courier New"
"000"="Andale Mono"
"0000"="Consolas"
"00000"="DejaVu Sans Mono"
Another trick is to use Font linking to allow characters that are missing from one font to be found in another, it can be used with the method above.
There are some issues with this method
o. Performance can be affected when using the linked fonts.
o. Glyphs in some fonts are of different sizes i.e. the ones for south east Asia languages, this can cause alignment issues.
see the following
Microsoft Globalization page
Tip Font linking
Double-width Asian glyphs in Western consoles
Font resource site
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink
| Add a Multi-String Value | |||
| Name=Lucida Console | Assuming that you are going to use Lucida Console as the ZTree font | ||
| Data= | |||
| Cour.TTF, Courier New | |||
| LucidaTypewriterRegular.TTF,Lucida Sans Typewriter | |||
| MSGothic.TTC,MS Gothic | |||
| SimSun.TTC,NSimSun | |||
| Gulim.TTC,GulimChe | |||
| Consola.TTF,Consolas | |||
If you want to try others the Microsoft article includes Necessary Criteria for Fonts to Be Available
- The font must be a fixed-pitch font.
- The font cannot be an italic font.
- The font cannot have a negative A or C space.
- If it is a TrueType font, it must be FF_MODERN.
- If it is not a TrueType font, it must be OEM_CHARSET.
ZTreeWin also has some additional requirements; The Box Characters ? ? ? ? etc are required, and characters 00-1F (04 ? for tagged files, 18 ?, 19 ?, 1A ? and 12 (up down arrow)).
Character Map/Advanced View (Character Set DOS: United States - or whatever) shows characters supported (unfortunately not 00-1F)
Find this in Start/Programs/Accessories/System Tools/Character Map or %SystemRoot%\System32\charmap.exe
This will show that Consolas is no use, as it is missing the Box Characters.
Unfortunately Windows does not show which are fixed-pitch fonts, this can only be done by trial and error or Program to enumerate Fixed Width Fonts
An easy way to do this is to open FontTest.txt in Notepad, and try different Fonts. (This is a unicode file, and only displays CP 437.)
Font Size
When you select a TrueType font in a console application, the font size (height) is shown in pixels. (Raster fonts show width*height.)
In a Windows application the font size (height) is shown in points (~ 1/72inch).
Windows calculates the height in pixels using the following formula:-
FontHeight = PointSize * LogicalPixelsPerInch / 72
LogicalPixelsPerInch is usually 96, so a 9 point font is 12 pixels high.
Where are the fonts?
Direct links Andale MonoReviews, Information & Download links on Monospace/Fixed Width Programmer's Fonts
There are a number of Raster fonts (and information) on DOSFon
Consolas (and other ClearType fonts) are included in Microsoft Office 2007 Compatibility Pack
Consolas in Consolas Font Pack for Microsoft Visual Studio 2005 or 2008
Do not forget all the old Microsoft packages e.g. Plus! which also included fonts.
Gallery of Unicode Fonts
Contributors to this page: admin2
,
ian
,
BenKent
and
admin
.
Page last modified on Wednesday 03 of August, 2011 02:41:04 EDT by admin2.
Category: Customization
