SHX fonts, commonly used in CAD applications, are compiled from SHP fonts. SHP fonts define character shapes for non-standard or extended ASCII characters (0 to 255 decimal, or 0x0000 to 0x00FF in hexadecimal).
However, CAD applications often encounter text strings containing characters outside this range. In such cases, the application substitutes these "out-of-range" characters with alternative shapes for proper display.
For example, consider the text string "fڑ©haŒ". In decimal form, this translates to "102 1681 169 104 97 8204 338". Characters 1681 (ڑ), 8204 (), and 338 (Œ) are outside the standard SHP font range ( 0 to 255 for most SHX fonts).
Here's the key point: CAD applications like AutoCAD, Microstation, and BricsCAD remap these out-of-range characters to different shapes within the font's capabilities. In this example, they might be remapped to characters 154 (9A), 157 (9D), and 140 (8C) respectively.
So, whether you input the original string "fڑ©haŒ" or the string with remapped characters "fšª™aŒ" (using the decimal equivalents after remapping), the displayed output in the CAD application will be identical (as shown in the figure below).
Question:
How do CAD applications perform this remapping of out-of-range characters in SHX fonts? Is it folding, remapping, or a different process? Does the SHP to SHX compilation process play any role in handling out-of-range characters?
