Loading...
Skip navigation

How can I use Web-Fonts in AMP-Views?

First of all, you need to enable the font Library. You also have to insert the HTML-Tag for including a Font into the headerDataTypoScript node. Just insert this TypoScript into your Extension-Template on your Detail-Page.

plugin.tx_amp {
  settings {
    amp {
      libraries {
        font = 1
      }
      # Add some header data
      headerData (
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300,400">
      )
    }
  }
}

Attention:

Not every CDN (Content delivery network) is allowed to include Web-Fonts on AMP-Pages. For more information visit: www.ampproject.org/docs/guides/responsive/custom_fonts

Contact request

You can contact us at any time

Stop! Playing in the meantime?
Stop! Playing in the meantime?
Stop! Playing in the meantime?

Stop! Playing in the meantime?

Break the highscore

Press Start
Contact request
Screenreader label
Security question
PHL_________N6I______
__Y____P____M_____4PJ
UKJ___7OE___KZF______
__A____J____L_C___FS5
EBQ_________XXG______