White paper: Templates in web-to-print.  Free download

Font Manipulations

When using text strings in a PSD file, you may run into problems with fonts. For example, a designer who creates a PSD template in Photoshop may have a particular font installed in his/her system, but it may be missing on the server.

Installing fonts

To add a font to the Dynamic Image API, all you need to do is put it into a special folder in the app. By default, it is located at App_Data/assets/fonts, but you may override it in AppSettings.config (the FontPath param).

DI supports TrueType and OpenType fonts.

Specifying a font name

Unlike other software, when you specify a font name in PsdWebService, you should use the so-called PostScript Name instead of a Font Family. In other words, if you want to use the Roboto font, you need to specify Roboto-Regular (not just Roboto). Or, ArialMT instead of Arial.

You must do this because it allows you to specify not only a font name, but also a font style (including some non-standard ones, like UtlraThin, etc).

You may find it a bit challenging to determine the PostScript name of a font, especially if you are using Windows. To do so, you must download some type of font editing software, like FontForge, and open the font file with it.

Alternatively, you may use this endpoint to read a list of fonts available in PsdWebService:

Among other data, it contains PostScript Names. So, you can use this endpoint just as a "cheat sheet" or create a dropdown list for fonts in your user interface.