Closed zbaylin closed 4 years ago
This is a really small change that just adds two functions from FontMetrics: the average character width and the maximum character width. These functions make it easy to test if a loaded font is monospace through
FontMetrics
FontMetrics.avgCharacterWidth(metrics) == FontMetrics.maxCharacaterWidth(metrics)
I tested this with Consolas and it worked. Fortunately it also worked with FiraCode (I was worried that maybe the ligatures would register strangely).
This is a really small change that just adds two functions from
FontMetrics
: the average character width and the maximum character width. These functions make it easy to test if a loaded font is monospace throughI tested this with Consolas and it worked. Fortunately it also worked with FiraCode (I was worried that maybe the ligatures would register strangely).