private FontRenderContext getFontRenderContext(Font font) {
    FontRenderContext frc = getFontMetrics(font).getFontRenderContext();
    Font baseFont = getBaseFont();
    if (!baseFont.equals(myLayoutFont) || !frc.equals(myLayoutFRC)) {
      myFragments.forEach(ColoredFragment::invalidateLayout);
      myLayoutFont = new ImmutableFont(baseFont);
      myLayoutFRC = frc;
    }
    return frc;
  }
private FontRenderContext getFontRenderContext(Font font)