Microsoft KB Archive/52007

Word 5.00: Remapping Fonts for RTF Conversion

PSS ID Number: Q52007 Article last modified on 09-26-1995

5.00 5.50 6.00

MS-DOS

Summary:

In Word versions 5.00 and 5.50, you can create your own font-mapping tables to override some or all of the built-in font conversions provided by the RTF conversion utility. The tables are two ASCII files: RTF-PCW.DAT, to map RTF fonts to Word font numbers; and PCW-RTF.DAT, to map Word font numbers to RTF fonts. The files must be in the same directory as the document or the conversion utility.

You can create an ASCII file in Word by choosing Transfer Save and selecting the “Text-only-with-line-breaks” option.

More Information:

The entries in the file will map Word font numbers to and from RTF fonts. The names of fonts are not case sensitive, but the lines in the tables must run in ascending order by the first character of each line (a-z, 0-9). Comments may be inserted in the file with a pound “#” character, either at the beginning of a line or after the font mapping entry.

RTF-PCW.DAT
To map RTF fonts to Word format, you can create the file RTF-PCW.DAT. Each line of the file must be in the following format:

FontName;WordFontNumber

The following is an example:

courier;8 timesroman;16

The first line in this example changes all RTF characters in Courier to Word characters in font 8 (Helvetica). The second line converts all RTF characters in Times Roman to Word characters in font 16 (Roman a).

A list of all Word font numbers and what they mean appears in the font table near the top of every RTF file. For more information about Word’s font number system, see pages 251-253 in “Printer Information for Microsoft Word.”

PCW-RTF.DAT
To map Word font numbers to RTF fonts and font families, you can create the file PCW-RTF.DAT. Each line of the file must be in the following format (brackets indicate an optional item):

WordFontNumber;FontName[,FontFamily]

The following is an example:

8;courier,modern 16;timesroman,roman

The first line in this example changes all Word characters in font 8 (Helvetica) into RTF characters in Courier. The second line converts all Word characters in font 16 (Roman a) to RTF characters in Times Roman.

KBCategory: kbinterop KBSubCategory: Additional reference words: textconv ============================================================================= Copyright Microsoft Corporation 1995.