Made a class that represents the font metrics for a particular font. It can take in a string, and then output the dimensions of the string, taking into account any potential leading or ascent that may arise. This dimension is tight with respect to these values.
Changed classes (StringViewer and AbstractEdgeViewer) that rely on text dimensions directly to utilize this class, rather than doing the calculations themselves.
Fix tests that were made broken by the change in how precisely the dimensions are determined (notably, it takes into account any potential ascent or descent, as opposed to the old version which only accounted for it if it was there, and making the bounds tighter
Added a test for the new class that tests both that the dimension calculated is correct and that there is no potential state saving upon testing different strings.
Summary of the changes:
StringViewer
andAbstractEdgeViewer
) that rely on text dimensions directly to utilize this class, rather than doing the calculations themselves.