ZTree.com  | ZEN  | About...  

 Index   Back

[Wiki] h_ZtreeWinFont   [Wiki]

By: Laurent Duchastel     Montréal, Québec  
Date: Dec 08,2018 at 12:43
In Response to: [Wiki] Laurent, Is it Possible to get files from closed ztwiki? (Laurent Duchastel)

> > h_ZTreeWinFont
> Not found yet (might be somewhere in MySQL dump. I keep looking)

Extracted from MySQL dump

'Selecting a custom font for ZTreeWin', 17606, 'ZTreeWin is a console application and requires a [http://en.wikipedia.org/wiki/Monospace_font|Monospace font].
ZTreeWin v1 uses the ((h_oem_ansi_codepages|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 [http://support.microsoft.com/kb/247815|how to add fonts] by changing the following registry key (needs a reboot):
^HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Console\\TrueTypeFont

||Add a String Value|
|Name=00|The name needs to be incremented with "0" for each additional font|
|Data="Font Name"| ||
"0"="Lucida Console"
"00"="Courier New"
"000"="Andale Mono"
"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
[http://msdn.microsoft.com/en-us/goglobal/bb688134.aspx|Microsoft Globalization page]
[http://www.ztw3.com/forum/forum_entry.php?id=106203|Tip Font linking]
[http://www.ztw3.com/forum/forum_entry.php?id=106405|Double-width Asian glyphs in Western consoles]
[http://www.wazu.jp/|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|
| 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.^
Unfortunately this is not much help, unless you are writing a program. [http://www.lowing.org/fonts/tools/enumfixedfonts.exe|Program to enumerate Fixed Width Fonts]
ZTreeWin also has some additional requirements; The Box Characters ~np~? ? ? ?~/np~ etc are required, and characters 00-1F (04~np~ ?~/np~ for tagged files, ~np~18 ?, 19 ?, 1A ? and 12~/np~ (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 ~np~%SystemRoot%\\System32\\charmap.exe~/np~''''
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 [http://www.lowing.org/fonts/tools/enumfixedfonts.exe|Program to enumerate Fixed Width Fonts]
An easy way to do this is to open [http://www.ztwiki.com/tiki-download_file.php?fileId=29|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 [http://downloads.sourceforge.net/corefonts/andale32.exe|Andale Mono] [http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/ttf-bitstream-vera-1.10.zip|Bitstream Vera Sans Mono] [http://dejavu.sourceforge.net/wiki/index.php/Download|DejaVu Sans Mono] (if these don''t work try:-)
Reviews, Information & Download links on [http://www.lowing.org/fonts|Monospace/Fixed Width Programmer''s Fonts]
There are a number of Raster fonts (and information) on [http://www.uwe-sieber.de/dosfon_e.html|DOSFon]
Consolas (and other ClearType fonts) are included in [http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en|Microsoft Office 2007 Compatibility Pack]
Consolas in [http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&displaylang=en|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.
[http://www.wazu.jp/index.html|Gallery of Unicode Fonts] contains a large number of fonts, organised by Language. Monospace fonts are not identified, but you may find some which may be useful e.g. ''''Courier MonoThai''''',

Laurent Duchastel

Thread locked

Messages in this Thread

95,065 Postings in 11,983 Threads, 350 registered users, 128 users online (1 registered, 127 guests)
Index | Admin contact |   Forum Time: Aug 3, 2020 - 11:08 pm EDT  |  Hits:32,810,781  (33,982 Today )
RSS Feed