/** Checks to see if the font metrics and longest line are up-to-date. */ private void updateMetrics() { host = (RSyntaxTextArea) getContainer(); Font f = host.getFont(); if (font != f) { // The font changed, we need to recalculate the longest line! // This also updates cached font and tab size. calculateLongestLine(); } }