Here is my proposed embedding api to allow a user to
specify the fallback fonts:
+/**
+ * The nsIFontList interface provides an application the
+ * necessary information so that the user can select the font to use
+ * in the default style sheet (used if the style sheet is
+ * missing or does not specify a font.
+ * <P>Font lists are specified per language group.
+ *
+ */
+
+[scriptable, uuid(702909c6-1dd2-11b2-b833-8a740f643539)]
+interface nsIFontList : nsISupports
+{
+
+ /**
+ * Get the list of available fonts for a language group
+ * and for use as the given CSS generic font.
+ *
+ * @param aLangGroup limit the fonts to fonts in this language
+ * group.
+ *
+ * @param aFontType CSS generic font type
+ *
+ * @return a simple enumerator of the available fonts for a
+ * language group. These strings are the text
+ * supplied by the operating system's font system.
+ */
+ nsISimpleEnumerator/*<wstring>*/ availableFonts(
+ in wstring aLangGroup,
+ in wstring aFontType);
+};
+
I have one question:
I'm presenting the list of available fonts using nsISimpleEnumerator.
nsISimpleEnumerator requires a return object with a nsISupports
interface.
My enumerator is simply returning lines of text.
Should I create a new object type with one attribute: a string?
or
Should I should I just use a nsIAtom?
Brian