srecord noeq G22LocalFontsPanel(G22Utils g22utils) is Swingable { transient SingleComponentPanel scpFontDemo = singleComponentPanel(); transient JList fontsList; transient S demoText = mlsUnindent([[ 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); var renderText = new RenderText(font).fontSize(50) .alignment("center"); scpFontDemo.set(jCenteredSection("Font Demo: " + fontName, jscroll_center(g22utils.stdImageSurface(renderText.get(demoText))))); }); ret jCenteredRaisedSection("Local Fonts", jhsplit(0.3, jCenteredSection(n2(fontNames, "Font"), fontsList), scpFontDemo); } }