Is it possible to get the list of all the fonts and colors used in the active illustrator document (.ai file) ?
if yes then how?
thanx in advance...
Certainly doable, but you'd have to iterate the document and build up the list yourself. Font would be pretty easy, because that's only text objects. Colour is a little trickier, just because colour can hide in so many places, but you can get a pretty good result fairly easily.
Colors is actually easy too. In the AIPathStyleSuite, check the function AdjustObjectAIColors. There's some stuff in the docs that give the general idea of how you'd catalogue all the colors used in a document.
I thought about AdjustObjectAIColors, and its a good way to get a bunch of them but I'm not 100% sure if it covers all colours or just those found in paths. If not, this would exclude colours on effects & overlays for symbols, found in kPluginArt (though there is a similar function for plugin art specifically) and I imagine text. Probably a few other types if we look hard enough. Granted, paths are probably 90% of colours :-) I also wondered (sinc I haven't tried it before) how comprehensive that method is -- does it hit all the colours in various effects & styles layered on path? Or does it just hit the standard stroke & fill? I assume not, but I don't know.
Well... it definitely goes into pattern fills/strokes as I've had to do that. As for the others, my guess is probably, but it'd have to be tested. It seems that this is the intended method for doing this based on what's in the documentation.