Search code examples
fontscad

SHX font specification and the license of the font files


I'm trying to implement a simple plot viewer that only can draw lines. Drawing the shapes like a triangle or rectangle was easy to implement but the font was not. I've found there are line fonts for AutoCAD which are compiled as .shx font file. About the .shx font files, I have two questions.

1. Is the spec for the .shx file is opened?

I think it is different from the .shx file of ESRI. I've parsed the file based on the spec from https://en.wikipedia.org/wiki/Shapefile, but the file code on the first byte was not 0x0000270a. I couldn't find the spec for the .shx font file but I've seen many other CAD programs using .shx font file so I think it would be somewhere.

Of course, I can detour the problem by converting the .shx file into .shp file, which is easily interpreted. I have a tool for decompiling. But it will make my program less flexible so I want use .shx font file directly if possible.

2. Which kind of licenses the fonts installed with AutoCAD belongs?

There are many default .shx fonts installed with AutoCAD like 'chineset.shx' or 'gbcbig.shx'. I expected there is a strict license for the default font but I'm not sure and I couldn't find any information for the license of the fonts. Is there a problem if I use the fonts for my program and publish the program with it?


Solution

  • I too have been searching for these answers. Today I finally found some useful info on the .shp format that can compile down to shx. See the AutoCAD help article here The information is too details and extensive to post here. I still don't know of a shp -> shx compile program besides full AutoCAD.

    It is difficult to find information on this because searches tend to come up with GIS shapefile information which does not appear to be the same thing. Feel free to edit this answer with more info.