theming – How do I add a font locally?

The following libraries example has the font being accessed from google and one local.

      styles/local.css: {attributes: { type: "text/css" }}
      styles/editing.css: {attributes: { type: "text/css" }}
      '//': { type: external, minified: true }
      'styles/Raleway-Italic-VariableFont_wght.ttf': {type: "application/octet-stream" }
      'styles/Raleway-VariableFont_wght.ttf': {}
  • The font loaded from loads fine.
  • The font with the type application/octet-stream gives Invalid CSS asset type.
  • The font without the type gives an error _not loaded because its mime type is not text/css’.

How do I load the font from the libraries file?
Is loading the font from the style sheet the only way?