float (@NotNull ColoredFragment fragment, Font font, FontRenderContext frc) { WidthKey key = new WidthKey(fragment.text, new ImmutableFont(font), frc, fragment.attributes.getStyle(), font.getSize()); return widthCache.get(key, it -> fragment.getAndCacheRenderer(it.font, it.frc).getWidth()); }