FEATURE: Support using system font in wizard font step (PR #10742)

Draft PR because this depends on discourse-fonts v.0.0.4 getting published.


Can you get rid of the code duplication above with a special handling for the “system” font here and some changes to font_css below (to allow arbitrary src values)?

          if font[:key] == "system"
            # Overwrite font definition because the preview canvases in the wizard do not like "-apple-system" and require explicit @font-face.
            font = {
              name: "System",
              key: "system",
              stack: "System",
              variants: [
                { src: 'local(".SFNS-Regular"), local(".SFNSText-Regular"), local(".HelveticaNeueDeskInterface-Regular"), local(".LucidaGrandeUI"), local("Segoe UI"), local("Ubuntu"), local("Roboto-Regular"), local("DroidSans"), local("Tahoma")', weight: 400 },
                { src: 'local(".SFNS-Bold"), local(".SFNSText-Bold"), local(".HelveticaNeueDeskInterface-Bold"), local(".LucidaGrandeUI"), local("Segoe UI Bold"), local("Ubuntu Bold"), local("Roboto-Bold"), local("DroidSans-Bold"), local("Tahoma Bold")', weight: 700 }

I think I messed something up during initial implementation because at this point, font should hold the value of font[:name].

Excellent! :+1: