Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SHX font specification and the license of the font files

Tags:

fonts

cad

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?

like image 448
상빈이 Avatar asked Oct 25 '25 22:10

상빈이


2 Answers

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.

like image 86
Ben Zuill-Smith Avatar answered Oct 27 '25 12:10

Ben Zuill-Smith


These are AutoCAD-86 shapes 1.0 file format fonts.


Strictly speaking in the US fonts and typesets have weird copyright law. The copyright of a font is because a font itself is a program which contains different bezier curves the nodes of which were chosen with intelligent operators who could have chose other ones but didn't. However, typeface which is the mere rendering of the text on screen is not able to be copyrighted. So you get a particularly weird situation where you could render a large print of a typeface, do potrace (or whatever) on that text to make your own positions for your own bezier curves and that would not be copyrighted.

The same will hold true for the SHX files, they can be seen as programs of various nodes of specific positions which are themselves the result of intelligent work and thus subject to copyright under the same logic that Adobe v. Southern Software was decided. You could likely either strip the copyright from the original software by rendering it and using something like an automatic potrace to recreate glyphs which correctly fit the text or if your conversion algorithm creates SHX files based on the typeface itself, you wouldn't have to worry about the licensing.

As to the original question, no you cannot directly use Adobe owned SHX fonts within your program without incurring the wrath of the copyright gods. They are licensed for use by Adobe not redistribution. Also, note you cannot safely just dump the nodes positions from the SHX fonts and be safe either. The copyright is on the node position and the actual binary of the format itself.

If you somehow wrote code that would convert from a rendered typeface to SHX files or even TTF, you're good. Most font licenses tend to say you can render the glyphs but them limit how you can distribute the materials and what you do with the font without paying more money.

like image 29
Tatarize Avatar answered Oct 27 '25 11:10

Tatarize



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!