Ole,
For a moment you had me rejoicing (I hadn't tried this in 5.0.3 yet). But my joy was short-lived, as I still can't get it to work. For instance,
app.findTextPreferences.appliedFont =
app.activeDocument.fonts.item ('Swiss 721 BT\tBold');
still tells me that "The requested font is not available." That font is not installed on my system but is used in the active document.
Absent fonts seem to confuse ESTK. Getting some properties of this non-installed font leads to different results:
-- app.activeDocument.fonts.item ('Swiss 721 BT\tBold').index
gives -1. Don't know what that means, but there's a result and no error.
-- app.activeDocument.fonts.item ('Swiss 721 BT\tBold').fontFamily
gives Swiss 721 BT. Result as expected. (It's not the case that to return this property ESTK doesn't bother to check whether the font exists: ...('Olav Kvern\tBold').fontFamily produces an error.)
-- app.activeDocument.fonts.item ('Swiss 721 BT\tBold').location
doesn't do much apart from repeating the property name. No error, nothing in the console; just "location" in the staus bar at the bottom of ESTK's app window.
Am I missing something?
Peter
(forgot to mention that this is on Windows XP sp 2)