How would i go about finding the baseline of a font using ImageSharp in pixels

54 Views Asked by At

I've been trying to get the font baseline of a font by calculating the Descender using the ImageSharp.Font library for C#.

So far what I've been able to gather is that the all measures are expressed in Font Units, but I need them in pixels so I'm not sure what the conversion process is, and that the number is negative because its underneath the baseline.

I think I should also probably mention I'm working with some high vertical dpi, 600 vertical and horizontal that I've set using

Canvas.Metadata.HorizontalResolution = 600;
Canvas.Metadata.VerticalResolution = 600;

Thanks you!

0

There are 0 best solutions below