During Personas projects, we should determine a set of font families that developers can use while creating their flavors, themes, and templates.
Configuring available fonts for Personas happens in the Administration application, by navigating to Corporate Branding → Fonts.
The list here will determine which fonts are available during object maintenance when formatting labels, buttons, text fields and other artifacts. Such fonts must be installed and accessible on the user’s workstation.
However, in certain scenarios we may want to use a font that is not accessible on the user’s device. Even if we add this font to the list of available ones in the Administration application, a fallback default font will be used instead when rendering the screen.
In these cases, there is a way to utilize such fonts by referencing their definition in an external font library. This is possible when the flavor is consumed via a browser session, but not in SAP GUI for Windows or Java.
Keep in mind that the below method uses DOM manipulation, which in general is not recommended and as such, not supported by SAP if something goes wrong. It also comes with certain risk, since if the referenced external font definition is compromised in any way, this will affect your flavors. Therefore, use it with caution and only reference fonts from trusted sources.
As an example, let’s see how to add the font called Yellowtail from the Adobe web font library.