: Why add extrema points when designing fonts? It's apparently import to add anchor points at the horizontal and vertical extrema of your paths when designing the glyphs of a font. Most font editors
It's apparently import to add anchor points at the horizontal and vertical extrema of your paths when designing the glyphs of a font. Most font editors have functions to add these for you and will give you an error if you omit them.
But it's sometimes easier and more natural to draw paths like this:
Notice the varied angles and lack of points on most extrema.
The following is a better path, but if you're starting with something like the first image then getting to this means an extra step in the process (sometimes having to retrace the original):
So why do we even need to add extrema points and what practical issues will I face if I don't?
More posts by @Berryessa866
2 Comments
Sorted by latest first Latest Oldest Best
As already mentioned, extrema are needed for font rendering and in particular hinting.
To understand this, let’s at first look at what roughly happens when autohinting a glyph with extrema as anchors (green) in a regular pixel grid¹:
To make a font look nice and crisp, vertical and horizontal strokes should exactly fall into the pixel grid.
An arbitrarily placed glyph² will usually not fulfil this criterion, and therefore the renderer will slightly distort it to that end, namely by moving the extrema, since they define the vertical and horizontal strokes:
This process requires guesswork by the renderer which is why the designer can define a bunch of things (marked stems, blue values) that assist the renderer in this process.
Note that this is only one of the first steps and there is a lot going on after that, which we do not need to care about for this question.
Now, let’s first suppose we had not only used extrema to define the glyph but also some diagonal anchors in between.
Then these anchors would have to be gradually moved when the extrema are moved, which again requires guesswork, but unlike moving the extrema, the font designer cannot do much to help with this due to the complexity of the situation.
Therefore moving this surplus anchors is a considerable source of error, in particular if the anchors are close to the extrema.
Finally we can return to the question and consider what happens if we do not define any anchors at the extrema.
In this case, the renderer has to automatically determine the extrema (which it can do easily) before moving them and all other anchors along with it.
Since what you would naturally choose as an anchor is close to the extrema for many types of typefaces, this comes with a risk of bad guesswork due to the reasons elaborated above.
To somewhat summarise the above: Extrema play a crucial role when rendering anyway and therefore it is better if your glyph is built upon them so the renderer does not have to guess.
Quotes
From the patent US 7068276 B2 – Methods and systems for hinting fonts :
The algorithmic approach described below attempts to match up explicit on-curve knots using features such as contour direction and the presence of extrema.
From FontForge’s Wiki on hinting:
Contours need to have the right direction, otherwise snapping to blue zones is impaired. The less points form the (accurate) shape, the better. But curves hinted with H/V stems should have points at extrema, otherwise they won't get snapped. Its unelegant if such a point is 'implicit'.
¹ it’s not much different for subpixel hinting
² which is a broad simplification since glyph placement with hinting is more intricate; but it suffices for this example
Here are three reasons why "points in extrema" is the preferred method when working with bezier curves. In fact when working on lettering in particular I have seen it described as essential:
It improves (greatly) autohinting and PostScript interpretation. Indeed setting points to extrema is one of the first steps when setting up manual hinting.
Much easier to edit shape later. Editing the curves later is much easier with points in extrema. Moving points in extrema tends to keep the curves pretty with minimum additional effort.
Less points overall. Extremum points also tend to achieve the same shapes with fewer additional points... which also results in smaller file sizes.
For these reasons many font software design programs have tools for highlighting and fixing points not at maxima and minima (the extrema).
Saying all that, I have long laboured to set all my points in extrema, and have never quite succeeded, but I do not consider myself a Bezier Ninja!
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.