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
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
Copy link to clipboard
Copied
Doesn't look so.
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
Copy link to clipboard
Copied
good you could find something useful. I couldn't find anything in the dom
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
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
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.
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
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
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
Copy link to clipboard
Copied
you can give Typekit api a try :
Copy link to clipboard
Copied
Hi,
Thank you for your response. I will give a try and reply you back.
Revathi
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
Copy link to clipboard
Copied
Hi Steve,
Thank you for your reponse.
Regards,
Revathi