|
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
|
2 * |
|
3 * This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #include "nsISupports.idl" |
|
8 |
|
9 [scriptable, uuid(924d98d9-3518-4cb4-8708-c74fe8e3ec3c)] |
|
10 interface nsIFontEnumerator : nsISupports |
|
11 { |
|
12 /** |
|
13 * Return a sorted array of the names of all installed fonts. |
|
14 * |
|
15 * @param aCount returns number of names returned |
|
16 * @param aResult returns array of names |
|
17 * @return void |
|
18 */ |
|
19 void EnumerateAllFonts(out uint32_t aCount, |
|
20 [retval, array, size_is(aCount)] out wstring aResult); |
|
21 |
|
22 /** |
|
23 * Return a sorted array of names of fonts that support the given language |
|
24 * group and are suitable for use as the given CSS generic font. |
|
25 * |
|
26 * @param aLangGroup language group |
|
27 * @param aGeneric CSS generic font |
|
28 * @param aCount returns number of names returned |
|
29 * @param aResult returns array of names |
|
30 * @return void |
|
31 */ |
|
32 void EnumerateFonts(in string aLangGroup, in string aGeneric, |
|
33 out uint32_t aCount, [retval, array, size_is(aCount)] out wstring aResult); |
|
34 |
|
35 /** |
|
36 @param aLangGroup language group |
|
37 @return bool do we have a font for this language group |
|
38 */ |
|
39 void HaveFontFor(in string aLangGroup, [retval] out boolean aResult); |
|
40 |
|
41 /** |
|
42 * @param aLangGroup language group |
|
43 * @param aGeneric CSS generic font |
|
44 * @return suggested default font for this language group and generic family |
|
45 */ |
|
46 wstring getDefaultFont(in string aLangGroup, in string aGeneric); |
|
47 |
|
48 /** |
|
49 * update the global font list |
|
50 * return true if font list is changed |
|
51 */ |
|
52 boolean updateFontList(); |
|
53 |
|
54 /** |
|
55 * get the standard family name on the system from given family |
|
56 * @param aName family name which may be alias |
|
57 * @return the standard family name on the system, if given name does not |
|
58 * exist, returns empty string |
|
59 */ |
|
60 wstring getStandardFamilyName(in wstring aName); |
|
61 }; |