Custom Fonts in Azure

There is a static StiFontCollection class. It's possible to add a new font with the AddFontFile method:


This works for:

  • Web Designer (font should be available in the client’s browser)
  • WPF Designer V1, V2
  • WinForms Designer
  • WPF Viewer
  • WinForms Viewer,
  • PDF Export

There is an issue with other exports. For instance, in the HTML export just a name of the font is specified. A browser replace the font with any available one if the specified font is not available.

The export to HTML is used in the web viewer and web designer. So you can't see text with the right font. What we can do:
- show text as image;
- load a font to the HTML with help of CSS.

The developer can connect specific fonts in CSS on a web page. For example, you can install a new font "before_the_rain.ttf" on server side. Then this font can be used in the designer and other place. To show this font in the browser the developer should describe included fonts in CSS.

@font-face {
    font-family: myFirstFont;
    src: url(sansation_light.woff);

But in this case the font should be in the WOFF format. If you need we can create a detailed instruction what to do?


Please sign in to leave a comment.