height property

double get height

Gets the height of the font in points.

//Create a new PDF document.
PdfDocument document = PdfDocument();
//Create a new PDF font instance.
PdfFont font = PdfStandardFont(PdfFontFamily.helvetica, 12);
//Draw string to PDF page.
document.pages.add().graphics.drawString(
    'Font Name: ${font.name}\nFont Size: ${font.size}\nFont Height: ${font.height}\nFont Style: ${font.style}',
    font);
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();

Implementation

double get height => _helper.metrics!.getHeight(null);