srecord noeq G22LocalFontsPanel(G22Utils g22utils) is Swingable { transient SingleComponentPanel scpFontDemo = singleComponentPanel(); transient JList fontsList; transient S demoText = "Gazelle is a new image recognizer"; cachedVisualize { var fontNames = localFontFamilies(); fontsList = jlist(fontNames); onSelect(fontsList, fontName -> { if (fontName == null) ret with scpFontDemo.clear(); var font = localFont(fontName); scpFontDemo.set(jCenteredSection("Font Demo: " + fontName, jscroll_center(imageSurface(new RenderText(font).get(demoText))))); }); ret jCenteredRaisedSection("Local Fonts", jhsplit(0.3, jCenteredSection(n2(fontNames, "Font"), fontsList), scpFontDemo); } }