Use Adobe Fonts Typekit

Many users use the adobe fonts, and they don’t really have the font file to upload. therefore, i need a way to integrate adobe fonts in our plugin.

from the docs, it seems like the easiest way is to “add to web project” then you get a css file with the fonts imported.

for example: https://use.typekit.net/hgj2hpu.css

however, each font in the css is written in a different way than how any variation of fontFamily/fontStyle you can get from the node in xd.

for example:

in XD
fontFamily: “Kepler Std”
fontStyle: “Bold Semicondensed Display”

is in adobe fonts:
font-family:“kepler-std-semicondensed-dis”;

is there a way to get the adobe fonts naming in xd? or maybe any kind of other integration with the adobe fonts?

UXP plugins can only utilize the fonts already installed on the user’s machine; using TypeKit fonts that aren’t already installed isn’t supported.

Hi thanks for the quick answer, however my question is a bit different.

let’s say there is a font which is installed in the user’s machine and it is TypeKit font.
i want to use it also in the plugin side, and in order to do so i need to let the user import the css file that includes the fonts for the project.

however, it seems like how xd is naming fonts and how typekit is naming fonts is different, is there a way to get to the adobe fonts naming?

Unfortunately there’s no API in XD or UXP that maps from one to the other.

Perhaps @DavidXD has some insight into how XD is determining the display value, in case it’s algorithmically determined (in which case you could do the same or reverse transformation.)