TipH1407


NewDeal Hot Tip 1407

Fonts

Font Names and ID Numbers

This tip involves some technical issues and is intended for advanced users. Use this information at your own risk.

You can change the DOS filename of a NewDeal font file, no problem. NewDeal looks „inside“ the font files for the internal (menu) name and ID number, and ignores the DOS file name, except the file name extension must remain .FNT.

In version 1.x of NewDeal software, the order in which the fonts appear in the menus in NewWrite, NewDraw, and NewBanner is based on the order of the font files on your hard drive. If you copy the font files to an newly created subdirectory, the fonts will appear in the order in which you copied them. If you use a utility which sorts all the files on your hard drive in alphabetical order (like many disk defragmenter programs do), then the fonts will appear in that order, alphabetically by the DOS filename. Since the DOS filename is not the same as the internal font name, the fonts may not appear in alphabetical order by the names in the menus.

Starting in version 2.0, the font files auotmatically appear alphabetized in the font menu and font tool.

To change the menu name of a font, you need to use a disk editor. We use the disk editors in Norton Utilities or PCTools, but many others are available. Do not use a disk editor if you don’t know what you are doing… and back up, backup, backup everything before messing around with a disk editor. Mistakes made while using a disk editor can destroy the data on your drive!

Okay, warnings aside, the font ID number is two bytes in lowbyte/highbyte order: the ninth and tenth bytes in the file (bytes 08 and 09, if you count the first byte as 00). The internal font name starts at the 14th byte (0D, hex).

If you see null bytes (bytes of value 00) following the internal font name, then you can make the name longer, provided you leave at least one of these null bytes at the end of the new name.

Do NOT change the internal name or ID number of the original font files that come with the NewDeal software package. Newdeal needs to be able to find some of these fonts in order to operate properly. Also, be aware that when you change a font’s internal name or ID number, any documents previously created with that font will no longer display that font.

While we don’t recommend you remove any fonts from the \FONT directory, here’s some information about which fonts are used for what purpose. The only fonts that are absolutely required are UNIVERSI.FNT and BERKELEY.FNT. If you intend to use NewComm, then you must keep the BISON.FNT. If you intend to use NewWrite or NewDraw, you should keep ROMAN.FNT. If you intend to use the Calculator desk tool, you must keep LED.FNT. If you intend to use NewCalc or to print with NewPlanner, you must keep SANS.FNT. If you use Text File Editor, you need URW Mono in order to print.

A customer reports: „I have taken to renaming (DOS name) all my font files using the convention that is used in the NewDeal Font Packs–which is the same way that the Nimbus Font Converter names the font files that it imports–the first four letters of the internal (menu) font name followed by the font ID number in highbyte/lowbyte hexadecimal value. (The reason the font ID seems „backwards“ from the way it appears when you look inside the font file with a disk editor is because 16 bit numbers are typically stored in lowbyte/highbyte format in the PC’s memory or in files on disk. By convention, we reverse the two bytes into highbyte/lowbyte form when we discuss the number.)

„ID numbers in the range E000 to EFFF have been assigned to MicroLogic for their use. Numbers in the range D000 to DFFF have been assigned to ATech (AllType). Numbers below C000 are used by NewDeal. At this time, a safe range for us to use for our own purposes is C000 to CFFF.

„By the way, I named (DOS file names) the original 20 fonts that come with my NewDeal software slightly differently so that after sorting my fonts alphabetically, they always show up first.“

Font ID Number Standards

Early in the development of NewDeal software, some standards were set for ranges of font ID numbers. Because some ranges of numbers were assigned for use by specific font and font conversion companies that are no longer in business, these standards may eventually be revised. However, as of this writing, the existing NewDeal fonts and font conversion programs mostly conform to these standards.

Font IDs are divided first into manfacturers (or major types):

    • 0x0000 Bitmap fonts used by the system software for menus, dialogs, etc.
    • 0x1000 NimbusQ
    • 0x2000 Adobe
    • Ox3000 Bitstream
    • 0x4000 Agfa
    • 0xc000 Public
    • 0xd000 Atech
    • 0xe000 Micrologic
    • 0xf000 Printer (special text-only printer fonts used only in version 1.x)

Within each manufacturer’s range, the fonts are divided into smaller ranges by type:

    • 0x000 Serif
    • 0x100 Sans-Serif
    • 0x200 Script
    • 0x300 Ornament
    • 0x400 Symbol
    • 0x500 Mono
    • 0x600 Special
    • 0x700 Non-Portable

The idea was that the same font from different manufacturers (e.g., Adobe’s Helvetica and Bitstream’s Swiss) would have the same relative ID. That is, if you ignored the font maker, the IDs would be the same. This was to allow mapping fonts in the system if a particular font wasn’t available. In other words, if a font isn’t available, look for the equivalent from another manufacturer; if none of those are available, look for a similar font in the same font family (another serif font if the original serif font is not available).

All of the NewDeal fonts (URW Roman, Shattuck Avenue, etc.) and font packs follow the scheme. AllType uses fonts in the Atech range, but simply looks for the first unused ID within that range. Similarly, More Type uses the Micrologic range in the same way. This is not completely in keeping with the scheme, but the scheme was not yet finalized when Micrologic’s font converter went to market.

Nimbus Font Converter uses the above scheme as much as it can without knowing anything about the fonts. There isn’t anything within the font data to indicate what they look like (serif, sans serif, etc.). The plan was to have a font ID library that would look up a font name and return information about it, and the font ID for it. It would include information that would group fonts by how similar they are (e.g., similar serif types). That part of the project was never completed, so Nimbus Font Converter looks for the first available font ID in the range of Nimbus and Non-Portable.

If it isn’t obvious, the above method used by AllType, More Type, and Nimbus Font Converter has a flaw: it can produce different IDs for the same font run on different machines, and it can produce the same ID for different fonts run on different machines. It all depends on what order fonts are converted and what fonts are already on the machine.


Last Modified 18 Oct 1999 ©2000 NewDeal Inc. All rights reserved


BlankHomeBlank
Eine Seite zurück

Die Kommentarfunktion ist geschlossen.