tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIFontEnumerator.idl (2301B)


      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   * @return array of names
     16   * @return void
     17   */
     18  Array<AString> EnumerateAllFonts();
     19 
     20  /**
     21   * Return a sorted array of names of fonts that support the given language
     22   * group and are suitable for use as the given CSS generic font.
     23   *
     24   * @param  aLangGroup language group
     25   * @param  aGeneric   CSS generic font
     26   * @return            array of names
     27   * @return void
     28   */
     29  Array<AString> EnumerateFonts(in string aLangGroup, in string aGeneric);
     30 
     31  /**
     32   * Return a promise that resolves to a sorted array of the names of all
     33   * installed fonts.
     34   *
     35   * @return Promise that resolves to Array
     36   */
     37  [implicit_jscontext]
     38  jsval EnumerateAllFontsAsync();
     39 
     40  /**
     41   * Return a promise that resolves to a sorted array of names of fonts
     42   * that support the given language group and are suitable for use as the given
     43   * CSS generic font.
     44   *
     45   * @param  aLangGroup language group
     46   * @param  aGeneric   CSS generic font
     47   * @return Promise that resolves to Array
     48   */
     49  [implicit_jscontext]
     50  jsval EnumerateFontsAsync(in string aLangGroup, in string aGeneric);
     51 
     52  /**
     53    @param  aLangGroup language group
     54    @return bool do we have a font for this language group
     55   */
     56  void HaveFontFor(in string aLangGroup, [retval] out boolean aResult);
     57 
     58  /**
     59   * @param  aLangGroup language group
     60   * @param  aGeneric CSS generic font
     61   * @return suggested default font for this language group and generic family
     62   */
     63  wstring getDefaultFont(in string aLangGroup, in string aGeneric);
     64 
     65  /**
     66   * get the standard family name on the system from given family
     67   * @param  aName family name which may be alias
     68   * @return the standard family name on the system, if given name does not
     69   *         exist, returns empty string
     70   */
     71  wstring getStandardFamilyName(in wstring aName);
     72 };