When the characters are represented in vector form (line segments/Bezier arcs), they are defined by a small number of control points.
You can design the font in such a way that the number of control points is the same for all digits, and define an arbitrary ordering of the points.
Then linearly interpolating between the control points, pairwise, will give you a similar shape morphing effect.
Innumerable variants are possible by choosing other interpolation schemes, the way point correspondences are defined, possibly with splits into independent arcs...