reimplemented invert metric from curve style values