Interpolation - Smooth to Sharp Transition


Hello everybody,
I would like to aks for a help. I'm starting to set up this rounded geometric variable font and I'm bit struggling with those "smooth to sharp" transitions. After some trials and errors I have found this somehow working approach. But I am not really sure whether this is the optimal solution. Have you ever tried to interpolate anything similar yet?

Note: I would like to have just 2 masters (Thin and Heavy), at least at this early designing stage (if possible)
I have some problems and few questions:

1) Interpolation
Do you find this scheme working and OK? Or Would you perhaps suggest some completelly different approach?

2) Kinks
There are those weird kinks at transition, where the handles flip their positions (from outward to inward)
Actually, I have finetuned the master curves later on and it is much better now than on the preview.
But it is still quite a problematic part (just a bit exagerated here)
This "slight" problem shows up just around somewhere between 430-485 (on the range of 100-900) .
I am also thinking of doubling precision to UPM 2000, which could help too (please see the point 4)

3) Inktraps
This approach does not solve inktraps at all - what if I need them? And should I need them?
(I mean the short horizontal line at the cusp)
I've done some research and it differs a lot:
Some renowned fonts do not have them (at such details like the inner corners of AVX) - Helvetica Now, Futura Now
Others do - Eurostile Next, TT Lakes Neue.
To be honest, I don't see much benefit of it, unless the font is ment to be optimised for very small sizes or is condensed a lot - what do you think? 

4) Nodes at extremes
I am aware of the "nodes at extremes" rule - but I guess they would be quite redundant right here, right?
At least, I have seen many fonts not having extremas at this particular situations/places.
(I'm talking just about diagonals like this, not the other letters like O, where I'm pretty sure they really need to be)
Not having them will make everything much easier and cleaner.
Could the missing extrema make some "real" problems? (other than hinting, perhaps)
 
5) UPM
How do you feel about doubling precision by designing in let's  say 2000 UPM (2048, or even 3333 as some do)?
Would you recommend it or not?
Or perhaps the use of decimal coordinates?
I have noticed that 2000 UPM should be a standard for VFs at Google fonts now.
There are lots of discussion on this topic, but I'm stil missing some "ultimate" answer.



I would really appreciate your expertise - I would rather make all those important decisions at the beginning of the process than later on.

Comments

  • You should be able to avoid those kinks entirely, 100%. It is not primarily caused by a lack of precision.

    In your Heavy master, the off-curve control points associated with the diagonals should be retreated right ON TOP OF the on-curve points they are associated with. If you do that, you can avoid the interpolation problem.

    If you are retreating those off-curve points back even further, so they reverse direction in the Bold master… well, don’t do that.
  • Craig Eliason
    Craig Eliason Posts: 1,436
    edited November 2022
    You should be able to avoid those kinks entirely, 100%. It is not primarily caused by a lack of precision.

    In your Heavy master, the off-curve control points associated with the diagonals should be retreated right ON TOP OF the on-curve points they are associated with. If you do that, you can avoid the interpolation problem.
    I though zero-length handles were a  no-no. (Or am I misunderstanding your idea?)
  • If you have a real curve, in a non-variable font, and one handle is retracted onto the on-curve point, that is usually just sloppy.

    In variable fonts, there are cases where such constructions are not only reasonably legitimate, but even optimal. I expect that the problems cited are avoided in the rendering path that the variable fonts are going through, in which the rendering engine is expected to do some special things for variable fonts, such as removing overlap.

    In Google’s Material Symbols, pretty much every single glyph does this, as we have interior corners that are rounded in the Thin master, but sharp in the Regular and Bold masters.

    So, the regular default instance has it in most of the glyphs in the font. At least in our case, we have not seen any rendering or printing issues related to this. For some months now, I also have been doing triage on external bug reports, so I would probably have heard, I should think?

    Some of the problems cited in that other thread might be related to a particular app being used or its functions, perhaps. The main list was from Rainer (Glyphs), and two issues cited were:

    - “TrueType conversion issues.” We are using FontLab, and are working with PostScript curves upstream, and converting to TrueType at build time, with no issues related to that. Could be an issue in some other font editor(s), though?

    - “Post-processing problems (drawing a parallel path or a thick contour can be difficult for host application, or things like autohinting may fail).” I am pretty sure I have routinely used parallel paths in FontLab, even on these weirdly collapsed-point contours, without trouble. But it would not shock me if some apps had trouble with them, at some times.

    All that said, the utility and need for such contours in at least some more daring variable fonts probably leads to improvements. @Rainer Erich Scheichelbauer are those two things above still issues in Glyphs today, as far as you know?
  • John Hudson
    John Hudson Posts: 3,186
    edited November 2022
    Zero-length handles have traditionally been a problem in conversion of cubic (PS, CFF) curves to quadratic (TTF) curves. As Thomas says, in a variable font design, there are places where it is intentional that multiple points collapse to a single location as here, where a curve disappears and becomes a sharp corner. A concern, however, would be if you had multiple axes and were relying on extrapolation between the axes in corners of the design space, because OT variations math is additive, so if multiple axes are affecting the movement of the points collapsing to this one point, you could get areas of the design space where instead of collapsing to a corner the outline turns inside out.
  • You should be able to avoid those kinks entirely, 100%. It is not primarily caused by a lack of precision.

    In your Heavy master, the off-curve control points associated with the diagonals should be retreated right ON TOP OF the on-curve points they are associated with. If you do that, you can avoid the interpolation problem.

    If you are retreating those off-curve points back even further, so they reverse direction in the Bold master… well, don’t do that.
    Hello Thomas, 
    thank you for your advice, but I'm not sure if I get it all right.
    So, this scheme is in priciple OK and I should not worry to use it that way?
    The inner part will be smooth from 100-500 and sharp from 500-900 that way.
    At some point (right in the middle) there will be 3 points on top of each other (with zero-lenght handles), but it should not cause any fatal problems?

    The "bow" curve (marked red) is now identical in both masters, so it should colapse together exactly at 500 (in the middle).

    I'm not really sure what you've ment by this:
    In your Heavy master, the off-curve control points associated with the diagonals should be retreated right ON TOP OF the on-curve points they are associated with.

    Precision/UPM:
    I beg to differ - here is what interpolation does on the range of cca 480-520

    The handles simply don't have enough freedom where to go due to integer rounding.
    Note that there is also 1 asymmetrical frame - I don't understand why - everthing is stricly and perfectly symmetrical in the design.

    I'm also afraid that those overlaped crescent shapes (in upper half) would render as white holes!

    Of course, further away from the 450-550 range it works much better, but not perfectly though. I believe the double precision (2000 UPM perhaps) could help a lot. At least narrow down this "problematic range".  

    If I turn on the decimal precision, everything seems pretty much perfect!

    But, is there even possibility to have Variable with fractional coordinates at all?
    As far as I now VFs are mostly TT (intergers only).
    There is the option for PS variable in FL7-8, but marked as "beta" and I'm not sure if fractional coordinates are allowed and whether PS format is acceptable/suitable in the first place.