void init(Vector names) throws IOException {
Enumeration entries = names.elements();
HashSet fonts = new HashSet();
Hashtable fontMap = new Hashtable();
CSSStylesheet stylesheet = null;
while (entries.hasMoreElements()) {
String name = entries.nextElement().toString();
String lname = name.toLowerCase();
if (lname.endsWith(".css")) {
InputStream in = getInputStream(name);
if (stylesheet == null)
stylesheet = new CSSStylesheet();
CSSParser parser = new CSSParser();
parser.readStylesheet(in, stylesheet);
in.close();
} else if (lname.endsWith(".ttf") || lname.endsWith(".otf") || lname.endsWith(".ttc")) {
fonts.add(name);
}
}
Iterator stmts = stylesheet.statements();
while (stmts.hasNext()) {
Object stmt = stmts.next();
if (stmt instanceof FontFaceRule) {
Object src = ((FontFaceRule) stmt).get("src");
if (src instanceof CSSURL) {