* @param addStyle
* If a reference to the style resource should be automatically
* added to each OPS resource
*/
public FontEmbeddingReport addFonts(StyleResource styleResource, FontLocator locator, boolean addStyle) {
FontSubsetter subsetter = new FontSubsetter(this, styleResource, locator);
Iterator res = resources();
while (res.hasNext()) {
Object next = res.next();
if (next instanceof OPSResource) {
OPSResource ops = (OPSResource) next;
OPSDocument doc = ops.getDocument();
doc.addStyleResource(styleResource.getResourceRef());
doc.addFonts(subsetter, styleResource);
}
}
subsetter.addFonts(this);
return subsetter;
}