Back to index

lightning-sunbird  0.9+nobinonly
nsIFontCatalogService.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is Christopher Blizzard
00018  * <blizzard@mozilla.org>.  Portions created by the Initial Developer
00019  * are Copyright (C) 2002 the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *   Pete Zha <pete.zha@sun.com>
00023  *   Brian Stell <bstell@ix.netcom.com>
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either the GNU General Public License Version 2 or later (the "GPL"), or
00027  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the NPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the NPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 #include "nsISupports.idl"
00040 #include "nsIArray.idl"
00041 
00042 [noscript, uuid(70406f93-5b53-49a0-b5a7-ebf533bfe59b)]
00043 interface nsIFontCatalogEntry : nsISupports
00044 {
00045   const short FONT_CATALOG_TRUETYPE = 1;
00046 
00047   readonly attribute unsigned short fontCatalogType;
00048 };
00049 
00050 [noscript, uuid(11f3efad-316e-4982-b9cf-9c304b0d5237)]
00051 interface nsITrueTypeFontCatalogEntry : nsIFontCatalogEntry
00052 {
00053   readonly attribute ACString        fileName;
00054   readonly attribute ACString        familyName;
00055   readonly attribute ACString        styleName;
00056   readonly attribute ACString        vendorID;
00057   readonly attribute short           faceIndex;
00058   readonly attribute short           numFaces;
00059   readonly attribute short           numEmbeddedBitmaps;
00060   readonly attribute long            numGlyphs;
00061   readonly attribute long            numUsableGlyphs;
00062   readonly attribute unsigned short  weight;
00063   readonly attribute unsigned short  width;
00064   readonly attribute unsigned long   flags;
00065   readonly attribute long long       faceFlags;
00066   readonly attribute long long       styleFlags;
00067   readonly attribute unsigned long   codePageRange1;
00068   readonly attribute unsigned long   codePageRange2;
00069   readonly attribute long long       fileModTime;
00070 
00071   void getCCMap(out unsigned long size,
00072                 [retval, array, size_is(size)] out unsigned short ccMaps);
00073 
00074   void getEmbeddedBitmapHeights(out unsigned long size,
00075                 [retval, array, size_is(size)] out long heights);
00076 };
00077 
00078 [noscript, uuid(a3057187-c40f-4ffa-9160-2b16482053b1)]
00079 interface nsIFontCatalogService : nsISupports
00080 {
00081   nsIArray getFontCatalogEntries(in ACString familyName,
00082                                  in ACString language,
00083                                  in unsigned short weight,
00084                                  in unsigned short width,
00085                                  in unsigned short slant,
00086                                  in unsigned short spacing);
00087 
00088   // Definition for weight
00089   const unsigned short kFCWeightAny      =   0;
00090   const unsigned short kFCWeightLight    = 300;
00091   const unsigned short kFCWeightBook     = 400;
00092   const unsigned short kFCWeightMedium   = 400;
00093   const unsigned short kFCWeightRegular  = 400;
00094   const unsigned short kFCWeightDemi     = 600;
00095   const unsigned short kFCWeightDemibold = 600;
00096   const unsigned short kFCWeightBold     = 700;
00097   const unsigned short kFCWeighBlack     = 900;
00098 
00099   // Definition for width
00100   const unsigned short kFCWidthAny           = 0;
00101   const unsigned short kFCWidthNarrow        = 3;
00102   const unsigned short kFCWidthSemicondensed = 4;
00103   const unsigned short kFCWidthBlock         = 5;
00104   const unsigned short kFCWidthMedium        = 5;
00105   const unsigned short kFCWidthNormal        = 5;
00106   const unsigned short kFCWidthBold          = 7;
00107   const unsigned short kFCWidthWide          = 7;
00108   const unsigned short kFCWidthDoubleWide    = 9;
00109 
00110   // Definition for slant
00111   const unsigned short kFCSlantAny            = 0;
00112   const unsigned short kFCSlantRoman          = 1;
00113   const unsigned short kFCSlantItalic         = 2;
00114   const unsigned short kFCSlantOblique        = 3;
00115   const unsigned short kFCSlantReverseItalic  = 4;
00116   const unsigned short kFCSlantReverseOblique = 5;
00117 
00118   // Definition for spacing
00119   const unsigned short kFCSpacingAny          = 0;
00120   const unsigned short kFCSpacingMonospace    = 1;
00121   const unsigned short kFCSpacingProportional = 2;
00122 };