Merge pull request #4916 from jahting/fontcubik

Fixes a problem with fonts using cubic bezier curves (partial solution to #4590)
Merge branch 'dev' into mydevs