Verwendung: Verwendung eines neuen Fonts in Oneo

Reinhard's Avatar

Reinhard

09 Feb, 2026 09:25 AM

Produkt: Oneo Contao
Contao-Version: 5.3.44
Browser und Browserversionen: Chrome Version 144.0.7559.133

Hallo, für einen Kunden möchte ich in Oneo einen anderen Font, als Open Sans verwenden. Zum Test habe ich Roboto hochgeladen. In custom.css habe ich die font-face eingetragen->

@font-face {
  font-family: "Roboto";
  font-style: italic;
  font-weight: 400;
  src: url("../../font/roboto/Roboto-Italic.woff2") format('woff2');
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  font-style: italic;
  font-weight: 700;
  src: url("../../font/roboto/Roboto-BoldItalic.woff2") format('woff2');
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  src: url("../../font/roboto/Roboto-Regular.woff2") format('woff2');
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  src: url("../../font/roboto/Roboto-Bold.woff2") format('woff2');
  font-display: swap;
}

Im Theme Assistent der Eintrag -> "Roboto","Open Sans",sans-serif
Der Font ändert sich aber nicht. Wenn ich nur Roboto eintrage, erscheint eine default Serif-Schrift.
Roboto habe ich von Google Fonts geladen und mit einem Tool von ttf in woff2 konvertiert.
Was mache ich falsch?
Danke und Grüße
Reinhard Ewert
Was mache ich falsch?

  1. Support Staff 1 Posted by RockSolid Theme... on 09 Feb, 2026 03:18 PM

    RockSolid Themes's Avatar

    Vielen Dank für Ihre Frage.

    Die Datei /files/font/roboto/Roboto-Regular.woff2 ist über den Webserver anscheinend nicht erreichbar. Bitte prüfen Sie ob die Datei exakt an diesem Pfad am Webserver existiert und stellen Sie sicher, dass der Ordner font oder der Ordner font/roboto in der Dateiverwaltung von Contao als „öffentlich“ markiert ist.

  2. 2 Posted by Ramon on 09 Feb, 2026 06:13 PM

    Ramon's Avatar

    Danke für die schnelle Antwort. Ich bin davon ausgegangen, dass die Ordner in CSS public sind. Habe die Dateien jetzt direkt unter /files/ installiert. jetzt funktioniert es.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Roboto-Bold.woff2 63.9 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac