our company uses Rhino for milling and turning. We use a lot of fonts, so it would be nice if you could see the font in the text window. You have to click on each font individually to see what it looks like. This option would save a lot of time.
The second point would be single-line fonts. We had to insert single-line fonts, which cause difficulties during the post-process. Since Rhino doesn’t have any single-line fonts at all, it would be nice to have some that work with the program.
There aren’t a whole lot of single line fonts out there and apparently it is pretty tough to detect single line fonts heuristically by looking at individual glyphs. For this reason we currently have a simple list of fonts. If you are working on a new single line font, let’s chat and we can see how we can better support you.
It’s quite an eye opener to see how much code there is to deal with fonts…
Can we start the chat by agreeing some terminology?
If a font is made up of filled area(s) in empty space then a boundary path between fill and emptiness is a contour. A contour has direction and that direction dictates which side is fill. The standards for Truetype, Postscript etc fonts require that contours are closed - i.e. fill is always contained. However it is possible to install a font with unclosed contours in Windows.
In the code there are references to Single Stroke fonts, Double Stroke fonts and Perimeter Stroke fonts. Could you explain what each of these are? My uneducated assumption would be that:
Single Stroke fonts might be those with unclosed contours or those with contours closed with an automatic closure line from end point to start point,
Double Stroke fonts would have closed contours where closure is obtained by reversing the path back over itself to the start so there is no room for fill, and
Perimeter Stroke fonts are normal Truetype, Postscript etc fonts with closed contours always allowing space for fill.
Wouldn’t it be great if googlefonts would include single line fonts and make them searchable via “category” or “property”? Maybe it would then be possible to integrate them into rhino via an api?
I know, it is very unlikely to succeed in the near future, but why not contact google webfont devs and ask them if they might consider this. add some single line fonts to their catalog and give them their own category or property.
Double Stroke fonts (in Rhino) are almost like you described. There could be missing segments, but they would overlay explicit included segments.
Normal behavior for TrueType, etc is to automatically close contours when they are not explicitly closed. Lots of standard commercial TT fonts have glyphs with unclosed contours.
Single Stroke fonts are ones intended to be rendered without automatically closing contours. If you do close the contours, the picture looks wrong
In Rhino, when you ask to allow single stroke fonts, we don’t close open contours.
This is what you get with TextObject with Arial if Engraving Font is checked.
That’s also what you would get for text rendering if we added Arial to the list of known Single Stroke fonts.
Most contours have a gap that is closed by default.
The only benefit I can see over single stroke fonts is that they display correctly in windows controls which single stroke fonts don’t.
I guess they may be easier to make with commercial font making software
it is open source, and has a rather comprehensive set of characters. I have tried to point the authors to this page for it to work well in rhino but to no avail, it seems unfortunately the project has gone a bit dead.
I think it is a great candidate to be included in Rhino’s coding though if possible. Please let me know if there’s anything I can do to help with this.