# Matrix functionality in font SVG

Reading time: 7 min

Content List

If you're trying to convert an SVG to font SVG and eventually to a font, you will realize the upside down result in your font after lots of handlers and parsing, here is what you need to know about this

The basic concept is to make the coordinates in the path upside down, well, that’s easy, you can capture the max height of the path, and by doing the simple math of ” *maxHeight-Y* ” for each coordinates in the path, it shall mirror the effect that’s causing this situation.

bUt

This is not going to work for every situation, since the generated path might not even be upside down for any reason at all, so this is where the **MATRIX** one of the processes in *SVG Transformations* comes in:

This is the basically math we need to perform for every x/y in the path

As you see in the formula, we got many variables in there (a, b, c, d, e, f), that we initiate different values based on the result we are expecting, but in here, we have a simple set of them in order to reverse and fix the coordinates only:

- a: 1
- b: 0
- c: 0
- d: -1
- e: 0
- f: Maximum height of the path

Here is an example of code you can use

Rexfont svgJson module, matrix parser

## Was this page helpful?

What was the most helpful point of this page for you?

Thanks for your cooperation!

Excellent post. I definitely appreciate this website. Thanks!