• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Fetching fonts from TypeKit using JavaScript

New Here ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Hi,

Is it possible to fetch font from TypeKit using JavaScript in indesign using scripts. Please do guide me.

Regards,

Revathi

TOPICS
Scripting

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Aug 31, 2017 Aug 31, 2017

Hi Revathi,

Thanks for your interest in both InDesign ExtendScript and Typekit. After digging into this a bit here, I can report that this kind of action is not supported.

Thanks again,

Steve

Votes

Translate

Translate
People's Champ ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Doesn't look so.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Hi Loic,

are you sure about that?
At least we should be able to fetch used fonts from TypeKit with ExtendScript.

I did not test this, but we could check this:

var usedFonts = app.documents[0].fonts.everyItem().getElements();

for(var n=0;n<usedFonts.length;n++)

{

    $.writeln( usedFonts.location );

}

And how about:

var usedFonts = app.fonts.everyItem().getElements();

for(var n=0;n<usedFonts.length;n++)

{

    $.writeln( usedFonts.location );

}

Wouldn't that give some hints?

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

good you could find something useful. I couldn't find anything in the dom

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Hi Loic,

it remains to be seen, if font.location is useful.
Revathi schould test my little snippets and see if a special location for a known Typekit font can be found.

I think, the location could be in a temp folder or at least in a folder that is very unusual to host a font. That will be no "hard" evidence, but maybe good enough.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Or perhaps font.location will show an empty string if the TypeKit fonts are shielded good enough from user access.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jul 27, 2017 Jul 27, 2017

Copy link to clipboard

Copied

Hi Uwe,

I was under the impression our friend was looking for a way to retrieve a font from Typekit through a script, something like:

app.fetchFromTypekit ( "myFontName" );

That's what I was looking at first.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2017 Jul 29, 2017

Copy link to clipboard

Copied

Hm, yes…

But since Revathi did not comment on any of our replies we cannot be sure about that.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 31, 2017 Aug 31, 2017

Copy link to clipboard

Copied

Hi,

Sorry for my delay in reply. Thank you for your responses.

I tried this one,

app.fetchFromTypekit ( "myFontName" );

but this is showing an error, app.fetchFromTypekit is not a function.

Is it possible to download fonts from typekit using script?

Thanks,

Revathi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 31, 2017 Aug 31, 2017

Copy link to clipboard

Copied

Hi Laubender,

I tried that one, but there is no changes.

Is there any another possible way to download fonts from typekit?

Thanks,

Revathi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Aug 31, 2017 Aug 31, 2017

Copy link to clipboard

Copied

you can give Typekit api a try :

The Typekit API

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 31, 2017 Aug 31, 2017

Copy link to clipboard

Copied

Hi,

Thank you for your response. I will give a try and reply you back.

Revathi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 31, 2017 Aug 31, 2017

Copy link to clipboard

Copied

Hi Revathi,

Thanks for your interest in both InDesign ExtendScript and Typekit. After digging into this a bit here, I can report that this kind of action is not supported.

Thanks again,

Steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 31, 2017 Aug 31, 2017

Copy link to clipboard

Copied

LATEST

Hi Steve,

Thank you for your reponse.

Regards,

Revathi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines