Skip to Content

Use custom fonts in SAPUI5 applications

Hi,

I know this question was asked before. But I couldn't find a way to do it. Is there a way to use your custom fonts in SAPUI5 applications by configuring it in the Theme Designer?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jul 17 at 12:15 PM

    I think SAP Theme Designer does not support changing the font right now (see the endless discussions on SCN ...)

    We use the following workaround in our applications:

    1. Make a custom CSS in your project folder, e.g. css\style.css
    2. Include the CSS in your manifest.json

      <code>"resources": {
          "css": [
              {
              uri": "css/style.css"
              }
          ]
      }
      

    3. Set the font-family property in the CSS (in this case "Candara"), the selector excludes all SAP-Standard icons and their special fonts

      :not(.sapUiIcon) {
           font-family: Candara;
      }

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06 at 07:38 AM

    Hi,

    Custom font is not supported by SAP UI5. The parameter 'sapUiFontSize' is has no public access.

    Regards,

    Dharmendra Kumar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 06 at 09:05 AM

    Hi,

    You can refer this blog.

    https://blogs.sap.com/2015/11/02/enhance-ui5-app-with-custom-icon-fonts/

    Regards,

    Kanwarmeet Kaur

    Add comment
    10|10000 characters needed characters exceeded