Copy link to clipboard
Copied
Ex: Get lists of families of a Session
UIntT i, j; F_StringsT families, weights, variations, angles; F_FontsT perms;
/* Get lists of families, variations, weights, and angles. */
families = F_ApiGetStrings(0, FV_SessionId, FP_FontFamilyNames);
weights = F_ApiGetStrings(0, FV_SessionId, FP_FontWeightNames);
variations = F_ApiGetStrings(0, FV_SessionId, FP_FontVariationNames);
angles = F_ApiGetStrings(0, FV_SessionId, FP_FontAngleNames);
But i change SessionID by DocID, It can't resturn values.
I want get list font using in a document.
How can get list fonts of document in FrameMaker by FDK?
Copy link to clipboard
Copied
Try posting in the FM Scripting forum
Copy link to clipboard
Copied
diatranthanhoa,
I do not fully understand your question. If you are asking how to discover which fonts are actually in use within a specific document, that sounds a bit complicated. The Fonts pod does it very quickly, but I don't know how to replicate that easily. Maybe someone else does. Without any better idea, I would probably query the session for all font family names, then use F_ApiFind() to search the document for each. This doesn't seem like a very efficient approach, though. I apologize that I can't be of more help.
Russ
Copy link to clipboard
Copied
If get font of Document from each textrange,It is ok.
But it is slow, I want find solution get all font from Docmuent.
Copy link to clipboard
Copied
I'd try this approach:
A warning that this is untested, and put together frommemory without looking at the API documentation. It might need further refinement, and I'll not be able to contribute any more to this thread myself. But I hope this gets you started.