AutoXchange 2020 Technical Documentation

Font Mapping

Font Mapping

AutoXChange 2020 allows the user to define mapping for fonts using a configuration file. This mapping file can be used for both SHX and TrueType fonts.

The user can map fonts using the “ax_font_map.txt” file. The format is very simple. Each font is listed as a separate line listing the Font Name, the symbol “==>” and then the new font. For instance, “WeirdFont.TTF==>Arial”.

The Font Mapping file can also be used to specify fonts that should be stroked out. This is not the default operation, so the Stroked Fonts section must be delineated with “[stroke]". The Font Map section is the default, but can also be designated with “[map]". Any fonts defined in the Stroke section will be stroked out (turned into lines and arcs instead of staying as text). This will increase the file size but will ensure that the text looks exactly the same as in the original CAD system. This can be very important using SHX fonts. The font file must be present to allow successful font stroking. Otherwise the font will be stroked but using a default font - not the original type face. This may result in a lot of unknown characters that are output as ? and the rest of the font will most likely look wrong.

Sample Font Mapping File
[map]
WeirdFont.TTF==>Arial
WhatFont.SHX==>TimesRoman
[stroke]
Dingbat.SHX

Missing Fonts

AutoXChange produces a listing of fonts that are used in the drawing but are not found on the system or mapped already. This font list is added to the “ax_unmapped_fonts.txt” file in the same directory as the executable. Since the file is just appended to, fonts that were discovered to be unmapped in previous invocations of AutoXChange will still be present in the Unmapped Font file.

Basically AutoXChange reads the Unmapped Font file at the beginning on operation. For each font used in the new drawing it tests to see if it is present on the current system. If it is not found, then it checks the Font Mapping file to see if it is mapped to a font on the current system. If the font is still not found it checks to see if the font is on the Unmapped Font list. If not, the font is added to the Unmapped Font list. At the end of execution it writes out the new “ax_unmapped_fonts.txt” including all the old fonts (that are still not found) and the new fonts that were not found.

Last updated on 21 Apr 2020
Published on 21 Apr 2020