Better handle mathvariant for unknown/invalid values or values not supported by generic fonts.
Merge remote-tracking branch 'fred/issue363' into develop

Resolves issue #363.