1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/src/nsIFontEnumerator.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,61 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +[scriptable, uuid(924d98d9-3518-4cb4-8708-c74fe8e3ec3c)] 1.13 +interface nsIFontEnumerator : nsISupports 1.14 +{ 1.15 + /** 1.16 + * Return a sorted array of the names of all installed fonts. 1.17 + * 1.18 + * @param aCount returns number of names returned 1.19 + * @param aResult returns array of names 1.20 + * @return void 1.21 + */ 1.22 + void EnumerateAllFonts(out uint32_t aCount, 1.23 + [retval, array, size_is(aCount)] out wstring aResult); 1.24 + 1.25 + /** 1.26 + * Return a sorted array of names of fonts that support the given language 1.27 + * group and are suitable for use as the given CSS generic font. 1.28 + * 1.29 + * @param aLangGroup language group 1.30 + * @param aGeneric CSS generic font 1.31 + * @param aCount returns number of names returned 1.32 + * @param aResult returns array of names 1.33 + * @return void 1.34 + */ 1.35 + void EnumerateFonts(in string aLangGroup, in string aGeneric, 1.36 + out uint32_t aCount, [retval, array, size_is(aCount)] out wstring aResult); 1.37 + 1.38 + /** 1.39 + @param aLangGroup language group 1.40 + @return bool do we have a font for this language group 1.41 + */ 1.42 + void HaveFontFor(in string aLangGroup, [retval] out boolean aResult); 1.43 + 1.44 + /** 1.45 + * @param aLangGroup language group 1.46 + * @param aGeneric CSS generic font 1.47 + * @return suggested default font for this language group and generic family 1.48 + */ 1.49 + wstring getDefaultFont(in string aLangGroup, in string aGeneric); 1.50 + 1.51 + /** 1.52 + * update the global font list 1.53 + * return true if font list is changed 1.54 + */ 1.55 + boolean updateFontList(); 1.56 + 1.57 + /** 1.58 + * get the standard family name on the system from given family 1.59 + * @param aName family name which may be alias 1.60 + * @return the standard family name on the system, if given name does not 1.61 + * exist, returns empty string 1.62 + */ 1.63 + wstring getStandardFamilyName(in wstring aName); 1.64 +};