Glyph oddities

Looking closer to fonts, I found some oddity in CMUSerif-Roman which I couldn't explain. Some curves were cut. Apparently they were only cut at the left and not the right.


Javascript Editor

The problem was specific to the roman style, the italic style was fine.

Javascript Editor

I extracted the path from the o letter. On the left, the filled circle is the outer path of the o, the line is connecting all points of the TrueType file. The line seems correct. What is strange is that the circle is tangential to the line except in one point, the starting point, which creates the oddity.

Javascript Editor

After some research I found myself on https://stackoverflow.com/questions/3465809/how-to-interpret-a-freetype-glyph-outline-when-the-first-point-on-the-contour-is: Where quadratic points occur next to each other, an on-curve control point is interpolated between them. And there is another convention, that if a closed path starts with a quadratic point, the last point of the path is examined, and if it is quadratic, an on-curve point is interpolated between them, and the path is taken to start with that on-curve point; if the last point is not a quadratic control point, it is itself used for the start point.

So we need to rewrite rpnTTF and try again. Refresh the page, run first this new code for rpnTTF and then run the PostScript codes.

Javascript Editor

My Journey to PostScript