Using various fonts in SAP Screen Personas objects
2023-12-12 12:31:13 Author: blogs.sap.com(查看原文) 阅读量:6 收藏

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.


文章来源: https://blogs.sap.com/2023/12/12/using-various-fonts-in-sap-screen-personas-objects/
如有侵权请联系:admin#unsafe.sh