*/
public GVTFontFamily getFontFamily(BridgeContext ctx) {
String name = FontFamilyResolver.lookup(familyName);
if (name != null) {
GVTFontFace ff = createFontFace(name, this);
return new AWTFontFamily(ff);
}
Iterator iter = srcs.iterator();
while (iter.hasNext()) {
Object o = iter.next();
if (o instanceof String) {
String str = (String)o;
name = FontFamilyResolver.lookup(str);
if (name != null) {
GVTFontFace ff = createFontFace(str, this);
return new AWTFontFamily(ff);
}
} else if (o instanceof ParsedURL) {
try {
GVTFontFamily ff = getFontFamily(ctx, (ParsedURL)o);
if (ff != null)
return ff;
} catch (SecurityException ex) {
// Security violation notify the user but keep going.
ctx.getUserAgent().displayError(ex);
} catch (BridgeException ex) {
// If Security violation notify
// the user but keep going.
if (ERR_URI_UNSECURE.equals(ex.getCode()))
ctx.getUserAgent().displayError(ex);
} catch (Exception ex) {
// Do nothing couldn't get Referenced URL.
}
}
}
return new AWTFontFamily(this);
}