michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: [scriptable, uuid(924d98d9-3518-4cb4-8708-c74fe8e3ec3c)] michael@0: interface nsIFontEnumerator : nsISupports michael@0: { michael@0: /** michael@0: * Return a sorted array of the names of all installed fonts. michael@0: * michael@0: * @param aCount returns number of names returned michael@0: * @param aResult returns array of names michael@0: * @return void michael@0: */ michael@0: void EnumerateAllFonts(out uint32_t aCount, michael@0: [retval, array, size_is(aCount)] out wstring aResult); michael@0: michael@0: /** michael@0: * Return a sorted array of names of fonts that support the given language michael@0: * group and are suitable for use as the given CSS generic font. michael@0: * michael@0: * @param aLangGroup language group michael@0: * @param aGeneric CSS generic font michael@0: * @param aCount returns number of names returned michael@0: * @param aResult returns array of names michael@0: * @return void michael@0: */ michael@0: void EnumerateFonts(in string aLangGroup, in string aGeneric, michael@0: out uint32_t aCount, [retval, array, size_is(aCount)] out wstring aResult); michael@0: michael@0: /** michael@0: @param aLangGroup language group michael@0: @return bool do we have a font for this language group michael@0: */ michael@0: void HaveFontFor(in string aLangGroup, [retval] out boolean aResult); michael@0: michael@0: /** michael@0: * @param aLangGroup language group michael@0: * @param aGeneric CSS generic font michael@0: * @return suggested default font for this language group and generic family michael@0: */ michael@0: wstring getDefaultFont(in string aLangGroup, in string aGeneric); michael@0: michael@0: /** michael@0: * update the global font list michael@0: * return true if font list is changed michael@0: */ michael@0: boolean updateFontList(); michael@0: michael@0: /** michael@0: * get the standard family name on the system from given family michael@0: * @param aName family name which may be alias michael@0: * @return the standard family name on the system, if given name does not michael@0: * exist, returns empty string michael@0: */ michael@0: wstring getStandardFamilyName(in wstring aName); michael@0: };