Created
October 20, 2011 20:02
-
-
Save pederan/1302175 to your computer and use it in GitHub Desktop.
JSFL script to embed character ranges and special characters to library fonts. Select the font(s) in the library and run this script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dom = fl.getDocumentDOM(); | |
// array of selected library items | |
var selItems = dom.library.getSelectedItems(); | |
var count = selItems.length; | |
for(var i=0; i<count; i++) | |
{ | |
currentItem = selItems[i]; | |
//check that the selected item is a font | |
if(currentItem.itemType == "font") | |
{ | |
currentItem.embedRanges = "1|2|3|4|5"; | |
currentItem.embeddedCharacters = "æøåÆØÅöÖüÜäÄéÉèÉëË"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very nice, just a quick trivial thing. You don't have to get the selected items from the Library object, you can simple do "var selItems = dom.selection;" - and get the current selection of items directly from the dom.