Back to index

lightning-sunbird  0.9+nobinonly
nsFontMetricsXlib.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; 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
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Tony Tsui <tony@igelaus.com.au>
00024  *   Tim Copperfield <timecop@network.email.ne.jp>
00025  *   Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
00026  *
00027  * Alternatively, the contents of this file may be used under the terms of
00028  * either of the GNU General Public License Version 2 or later (the "GPL"),
00029  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00030  * in which case the provisions of the GPL or the LGPL are applicable instead
00031  * of those above. If you wish to allow use of your version of this file only
00032  * under the terms of either the GPL or the LGPL, and not to allow others to
00033  * use your version of this file under the terms of the MPL, indicate your
00034  * decision by deleting the provisions above and replace them with the notice
00035  * and other provisions required by the GPL or the LGPL. If you do not delete
00036  * the provisions above, a recipient may use your version of this file under
00037  * the terms of any one of the MPL, the GPL or the LGPL.
00038  *
00039  * ***** END LICENSE BLOCK ***** */
00040 
00041 #ifndef nsFontMetricsXlib_h__
00042 #define nsFontMetricsXlib_h__
00043 
00044 #include "nsIFontMetrics.h"
00045 #include "nsIFontEnumerator.h"
00046 #include "nsIDeviceContext.h"
00047 #include "nsDeviceContextXlib.h"
00048 #include "nsFont.h"
00049 #include "nsString.h"
00050 #include "nsUnitConversion.h"
00051 #include "nsCRT.h"
00052 #include "nsCOMPtr.h"
00053 #include "nsRenderingContextXlib.h"
00054 #include "nsICharRepresentable.h"
00055 #include "nsCompressedCharMap.h"
00056 
00057 /* Undefine some CPP symbols which wrap not-yet-implemented code */
00058 #undef MOZ_ENABLE_FREETYPE2
00059 #undef USE_AASB
00060 #undef USE_X11SHARED_CODE
00061 
00062 #ifdef USE_X11SHARED_CODE
00063 /* XXX: I wish I would use the code in gfx/src/x11shared/ - unfortunately
00064  * it is full of GDK/GTK+ dependices which makes it impossible to use it
00065  * yet... ;-(
00066  */ 
00067 #error not implemented yet
00068 #include "nsXFontNormal.h"
00069 #else
00070 class nsX11FontNormal {
00071 public:
00072   nsX11FontNormal(Display *, XFontStruct *);
00073   ~nsX11FontNormal();
00074 
00075   void          DrawText8(Drawable Drawable, GC GC, PRInt32, PRInt32,
00076                           const char *, PRUint32);
00077   void          DrawText16(Drawable Drawable, GC GC, PRInt32, PRInt32,
00078                            const XChar2b *, PRUint32);
00079   PRBool        GetXFontProperty(Atom, unsigned long *);
00080   XFontStruct  *GetXFontStruct();
00081   PRBool        LoadFont();
00082   void          TextExtents8(const char *, PRUint32, PRInt32*, PRInt32*,
00083                              PRInt32*, PRInt32*, PRInt32*);
00084   void          TextExtents16(const XChar2b *, PRUint32, PRInt32*, PRInt32*,
00085                               PRInt32*, PRInt32*, PRInt32*);
00086   PRInt32       TextWidth8(const char *, PRUint32);
00087   PRInt32       TextWidth16(const XChar2b *, PRUint32);
00088   void          UnloadFont();
00089   inline PRBool IsSingleByte() { return mIsSingleByte; };
00090 protected:
00091   Display     *mDisplay; /* Track |Display *| for this font 
00092                           * (Xlib gfx supports multiple displays) */
00093   XFontStruct *mXFont;
00094   PRBool       mIsSingleByte;
00095 };
00096 
00097 /* XXX: Silly class rename hack to avoid issues with StaticBuild code and to
00098  * keep the source clean until we can reuse the classes from gfx/src/x11shared/
00099  */
00100 #define nsXFont       nsX11FontNormal
00101 #define nsXFontNormal nsX11FontNormal
00102 #endif /* USE_X11SHARED_CODE */
00103 
00104 class nsFontXlib;
00105 class nsXFont;
00106 class nsRenderingContextXlib;
00107 class nsIDrawingSurfaceXlib;
00108 
00109 /* nsFontMetricsXlibContext glue */
00110 class nsFontMetricsXlibContext;
00111 nsresult CreateFontMetricsXlibContext(nsIDeviceContext *aDevice, PRBool printermode, nsFontMetricsXlibContext **aFontMetricsXlibContext);
00112 void     DeleteFontMetricsXlibContext(nsFontMetricsXlibContext *aFontMetricsXlibContext);
00113 
00114 #undef FONT_HAS_GLYPH
00115 #define FONT_HAS_GLYPH(map, char) IS_REPRESENTABLE(map, char)
00116 #define WEIGHT_INDEX(weight) (((weight) / 100) - 1)
00117 
00118 #define NS_FONT_DEBUG_LOAD_FONT   0x01
00119 #define NS_FONT_DEBUG_CALL_TRACE  0x02
00120 #define NS_FONT_DEBUG_FIND_FONT   0x04
00121 #define NS_FONT_DEBUG_SIZE_FONT   0x08
00122 #define NS_FONT_DEBUG_SCALED_FONT       0x10
00123 #define NS_FONT_DEBUG_BANNED_FONT       0x20
00124 #define NS_FONT_DEBUG_FONT_CATALOG      0x100
00125 #define NS_FONT_DEBUG_FONT_SCAN         0x200
00126 #define NS_FONT_DEBUG_FREETYPE_FONT     0x400
00127 #define NS_FONT_DEBUG_FREETYPE_GRAPHICS 0x800
00128 
00129 #undef NS_FONT_DEBUG
00130 #define NS_FONT_DEBUG 1
00131 #ifdef NS_FONT_DEBUG
00132 
00133 # define DEBUG_PRINTF(x) \
00134          DEBUG_PRINTF_MACRO(x, 0xFFFF)
00135 
00136 # define DEBUG_PRINTF_MACRO(x, type) \
00137             PR_BEGIN_MACRO \
00138               if (gFontDebug & (type)) { \
00139                 printf x ; \
00140                 printf(", %s %d\n", __FILE__, __LINE__); \
00141               } \
00142             PR_END_MACRO
00143 #else
00144 # define DEBUG_PRINTF_MACRO(x, type) \
00145             PR_BEGIN_MACRO \
00146             PR_END_MACRO
00147 #endif
00148 
00149 #define FIND_FONT_PRINTF(x) \
00150          DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FIND_FONT)
00151 
00152 #define SIZE_FONT_PRINTF(x) \
00153          DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_SIZE_FONT)
00154 
00155 #define SCALED_FONT_PRINTF(x) \
00156          DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_SCALED_FONT)
00157 
00158 #define BANNED_FONT_PRINTF(x) \
00159          DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_BANNED_FONT)
00160 
00161 #define FONT_CATALOG_PRINTF(x) \
00162          DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FONT_CATALOG)
00163 
00164 #define FONT_SCAN_PRINTF(x) \
00165             PR_BEGIN_MACRO \
00166               if (gFontDebug & NS_FONT_DEBUG_FONT_SCAN) { \
00167                 printf x ; \
00168                 fflush(stdout); \
00169               } \
00170             PR_END_MACRO
00171 
00172 #define FREETYPE_FONT_PRINTF(x) \
00173          DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FREETYPE_FONT)
00174 
00175 typedef struct nsFontCharSetInfoXlib nsFontCharSetInfoXlib;
00176 
00177 typedef int (*nsFontCharSetConverterXlib)(nsFontCharSetInfoXlib* aSelf,
00178   XFontStruct* aFont, const PRUnichar* aSrcBuf, PRInt32 aSrcLen,
00179   char* aDestBuf, PRInt32 aDestLen);
00180 
00181 struct nsFontCharSetXlib;
00182 struct nsFontFamilyXlib;
00183 struct nsFontNodeXlib;
00184 struct nsFontStretchXlib;
00185 struct nsFontWeightXlib;
00186 
00187 class nsFontXlibUserDefined;
00188 class nsFontMetricsXlib;
00189 #ifdef MOZ_ENABLE_FREETYPE2
00190 class nsFreeTypeFace;
00191 #endif /* MOZ_ENABLE_FREETYPE2 */
00192 
00193 struct nsFontStretchXlib
00194 {
00195   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
00196 
00197   void SortSizes(void);
00198 
00199   nsFontXlib       **mSizes;
00200   PRUint16           mSizesAlloc;
00201   PRUint16           mSizesCount;
00202 
00203   char*              mScalable;
00204   PRBool             mOutlineScaled;
00205   nsVoidArray        mScaledFonts;
00206 #ifdef MOZ_ENABLE_FREETYPE2
00207   nsFreeTypeFace    *mFreeTypeFaceID;
00208 #endif /* MOZ_ENABLE_FREETYPE2 */
00209 };
00210 
00211 struct nsFontStyleXlib
00212 {
00213   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
00214 
00215   void FillWeightHoles(void);
00216 
00217   nsFontWeightXlib *mWeights[9];
00218 };
00219 
00220 struct nsFontWeightXlib
00221 {
00222   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
00223 
00224   void FillStretchHoles(void);
00225 
00226   nsFontStretchXlib *mStretches[9];
00227 };
00228 
00229 struct nsFontNodeXlib
00230 {
00231   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
00232 
00233   void FillStyleHoles(void);
00234 
00235   nsCAutoString          mName;
00236   nsFontCharSetInfoXlib *mCharSetInfo;
00237   nsFontStyleXlib       *mStyles[3];
00238   PRUint8                mHolesFilled;
00239   PRUint8                mDummy;
00240 };
00241 
00242 class nsFontNodeArrayXlib : public nsAutoVoidArray
00243 {
00244 public:
00245   nsFontNodeArrayXlib() {};
00246 
00247   nsFontNodeXlib *GetElement(PRInt32 aIndex)
00248   {
00249     return (nsFontNodeXlib *) ElementAt(aIndex);
00250   };
00251 };
00252 
00253 /*
00254  * Font Language Groups
00255  *
00256  * These Font Language Groups (FLG) indicate other related
00257  * encodings to look at when searching for glyphs
00258  *
00259  */
00260 typedef struct nsFontLangGroupXlib {
00261   const char *mFontLangGroupName;
00262   nsIAtom*    mFontLangGroupAtom;
00263 } nsFontLangGroup;
00264 
00265 struct nsFontCharSetMapXlib
00266 {
00267   const char*            mName;
00268   nsFontLangGroupXlib*   mFontLangGroup;
00269   nsFontCharSetInfoXlib* mInfo;
00270 };
00271 
00272 class nsFontXlib
00273 {
00274 public:
00275   nsFontXlib();
00276   nsFontXlib(nsFontXlib *);
00277   virtual ~nsFontXlib();
00278   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
00279 
00280   nsFontMetricsXlibContext *mFontMetricsContext;
00281 
00282   void LoadFont(void);
00283   PRBool IsEmptyFont(XFontStruct*);
00284 
00285   inline int SupportsChar(PRUnichar aChar)
00286     { return mCCMap && CCMAP_HAS_CHAR(mCCMap, aChar); };
00287 
00288   virtual XFontStruct *GetXFontStruct(void);
00289   virtual nsXFont     *GetXFont(void);
00290   virtual PRBool       GetXFontIs10646(void);
00291 #ifdef MOZ_ENABLE_FREETYPE2
00292   virtual PRBool       IsFreeTypeFont(void);
00293 #endif /* MOZ_ENABLE_FREETYPE2 */
00294   virtual int          GetWidth(const PRUnichar* aString, PRUint32 aLength) = 0;
00295   virtual int          DrawString(nsRenderingContextXlib *aContext,
00296                                   nsIDrawingSurfaceXlib *aSurface, nscoord aX,
00297                                   nscoord aY, const PRUnichar* aString,
00298                                   PRUint32 aLength) = 0;
00299 #ifdef MOZ_MATHML
00300   // bounding metrics for a string 
00301   // remember returned values are not in app units 
00302   // - to emulate GetWidth () above
00303   virtual nsresult
00304   GetBoundingMetrics(const PRUnichar*   aString,
00305                      PRUint32           aLength,
00306                      nsBoundingMetrics& aBoundingMetrics) = 0;
00307 #endif /* MOZ_MATHML */
00308 
00309   PRUint16              *mCCMap;
00310   nsFontCharSetInfoXlib *mCharSetInfo;
00311   char                  *mName;
00312   nsFontXlibUserDefined *mUserDefinedFont;
00313   PRUint16               mSize;
00314 #ifdef USE_AASB
00315   PRUint16               mAABaseSize;
00316 #endif /* USE_AASB */
00317   PRInt16                mBaselineAdjust;
00318 
00319   // these values are not in app units, they need to be scaled with 
00320   // nsIDeviceContext::DevUnitsToAppUnits()
00321   PRInt16                mMaxAscent;
00322   PRInt16                mMaxDescent;
00323 
00324 protected:
00325   XFontStruct           *mFont;
00326   XFontStruct           *mFontHolder;
00327   nsXFont               *mXFont;
00328   PRPackedBool           mAlreadyCalledLoadFont;
00329 };
00330 
00331 struct nsFontSwitchXlib {
00332   // Simple wrapper on top of nsFontXlib for the moment
00333   // Could hold other attributes of the font
00334   nsFontXlib *mFontXlib;
00335 };
00336 
00337 typedef PRBool (*PR_CALLBACK nsFontSwitchCallbackXlib)
00338                (const nsFontSwitchXlib *aFontSwitch,
00339                 const PRUnichar*        aSubstring,
00340                 PRUint32                aSubstringLength,
00341                 void*                   aData);
00342 
00343 class nsFontMetricsXlib : public nsIFontMetrics
00344 {
00345 public:
00346   nsFontMetricsXlib();
00347   virtual ~nsFontMetricsXlib();
00348 
00349   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
00350 
00351   NS_DECL_ISUPPORTS
00352 
00353   NS_IMETHOD  Init(const nsFont& aFont, nsIAtom* aLangGroup,
00354                    nsIDeviceContext* aContext);
00355   NS_IMETHOD  Destroy();
00356 
00357   NS_IMETHOD  GetXHeight(nscoord& aResult);
00358   NS_IMETHOD  GetSuperscriptOffset(nscoord& aResult);
00359   NS_IMETHOD  GetSubscriptOffset(nscoord& aResult);
00360   NS_IMETHOD  GetStrikeout(nscoord& aOffset, nscoord& aSize);
00361   NS_IMETHOD  GetUnderline(nscoord& aOffset, nscoord& aSize);
00362 
00363   NS_IMETHOD  GetHeight(nscoord &aHeight);
00364   NS_IMETHOD  GetNormalLineHeight(nscoord &aHeight);
00365   NS_IMETHOD  GetLeading(nscoord &aLeading);
00366   NS_IMETHOD  GetEmHeight(nscoord &aHeight);
00367   NS_IMETHOD  GetEmAscent(nscoord &aAscent);
00368   NS_IMETHOD  GetEmDescent(nscoord &aDescent);
00369   NS_IMETHOD  GetMaxHeight(nscoord &aHeight);
00370   NS_IMETHOD  GetMaxAscent(nscoord &aAscent);
00371   NS_IMETHOD  GetMaxDescent(nscoord &aDescent);
00372   NS_IMETHOD  GetMaxAdvance(nscoord &aAdvance);
00373   NS_IMETHOD  GetAveCharWidth(nscoord &aAveCharWidth);
00374   NS_IMETHOD  GetLangGroup(nsIAtom** aLangGroup);
00375   NS_IMETHOD  GetFontHandle(nsFontHandle &aHandle);
00376   // Xlib probably has string length limits, but I can't be bothered
00377   virtual PRInt32 GetMaxStringLength() { return PR_INT32_MAX; }
00378   
00379   NS_IMETHOD  GetSpaceWidth(nscoord &aSpaceWidth);
00380   NS_IMETHOD  ResolveForwards(const PRUnichar* aString, PRUint32 aLength,
00381                               nsFontSwitchCallbackXlib aFunc, void* aData);
00382   nsFontXlib*  FindFont(PRUnichar aChar);
00383   nsFontXlib*  FindUserDefinedFont(PRUnichar aChar);
00384   nsFontXlib*  FindStyleSheetSpecificFont(PRUnichar aChar);
00385   nsFontXlib*  FindStyleSheetGenericFont(PRUnichar aChar);
00386   nsFontXlib*  FindLangGroupPrefFont(nsIAtom* aLangGroup, PRUnichar aChar);
00387   nsFontXlib*  FindLangGroupFont(nsIAtom* aLangGroup, PRUnichar aChar, nsCString* aName);
00388   nsFontXlib*  FindAnyFont(PRUnichar aChar);
00389   nsFontXlib*  FindSubstituteFont(PRUnichar aChar);
00390 
00391   nsFontXlib*  SearchNode(nsFontNodeXlib* aNode, PRUnichar aChar);
00392   nsFontXlib*  TryAliases(nsCString* aName, PRUnichar aChar);
00393   nsFontXlib*  TryFamily(nsCString* aName, PRUnichar aChar);
00394   nsFontXlib*  TryNode(nsCString* aName, PRUnichar aChar);
00395   nsFontXlib*  TryNodes(nsACString &aFFREName, PRUnichar aChar);
00396   nsFontXlib*  TryLangGroup(nsIAtom* aLangGroup, nsCString* aName, PRUnichar aChar);
00397 
00398   nsFontXlib*  AddToLoadedFontsList(nsFontXlib* aFont);
00399   nsFontXlib*  FindNearestSize(nsFontStretchXlib* aStretch, PRUint16 aSize);
00400 #ifdef USE_AASB
00401   nsFontXlib*  GetAASBBaseFont(nsFontStretchXlib *aStretch, 
00402                                nsFontCharSetInfoXlib* aCharSet);
00403 #endif /* USE_AASB */
00404   nsFontXlib*  PickASizeAndLoad(nsFontStretchXlib *aStretch,
00405                                nsFontCharSetInfoXlib *aCharSet, 
00406                                PRUnichar aChar,
00407                                const char *aName);
00408 
00409   static nsresult FamilyExists(nsFontMetricsXlibContext *aFontMetricsContext, const nsString& aName);
00410 
00411   //friend struct nsFontXlib;
00412 
00413   nsFontXlib **mLoadedFonts;
00414   PRUint16     mLoadedFontsAlloc;
00415   PRUint16     mLoadedFontsCount;
00416 
00417   nsFontXlib  *mSubstituteFont;
00418 
00419   nsCStringArray    mFonts;
00420   PRInt32           mFontsIndex;
00421   nsAutoVoidArray   mFontIsGeneric;
00422 
00423   nsCAutoString     mDefaultFont;
00424   nsCString        *mGeneric;
00425   nsCOMPtr<nsIAtom> mLangGroup;
00426   nsCAutoString     mUserDefined;
00427 
00428   PRUint8           mTriedAllGenerics;
00429   PRUint8           mIsUserDefined;
00430 
00431   nsFontMetricsXlibContext *mFontMetricsContext;
00432   nsIDeviceContext         *mDeviceContext;
00433 
00434 protected:
00435   void RealizeFont();
00436   nsFontXlib *LocateFont(PRUint32 aChar, PRInt32 & aCount);
00437 
00438   nsFontXlib         *mWesternFont;
00439 
00440   nscoord             mLeading;
00441   nscoord             mEmHeight;
00442   nscoord             mEmAscent;
00443   nscoord             mEmDescent;
00444   nscoord             mMaxHeight;
00445   nscoord             mMaxAscent;
00446   nscoord             mMaxDescent;
00447   nscoord             mMaxAdvance;
00448   nscoord             mXHeight;
00449   nscoord             mSuperscriptOffset;
00450   nscoord             mSubscriptOffset;
00451   nscoord             mStrikeoutSize;
00452   nscoord             mStrikeoutOffset;
00453   nscoord             mUnderlineSize;
00454   nscoord             mUnderlineOffset;
00455   nscoord             mSpaceWidth;
00456   nscoord             mAveCharWidth;
00457 
00458   PRUint16            mPixelSize;
00459   PRUint8             mStretchIndex;
00460   PRUint8             mStyleIndex;
00461   nsFontCharSetConverterXlib mDocConverterType;
00462 };
00463 
00464 class nsFontEnumeratorXlib : public nsIFontEnumerator
00465 {
00466 public:
00467   nsFontEnumeratorXlib();
00468   NS_DECL_ISUPPORTS
00469   NS_DECL_NSIFONTENUMERATOR
00470 };
00471 
00472 class nsHashKey;
00473 
00474 /* XXX: We can't include gfx/src/x11shared/nsFreeType.h because it relies on
00475  * GDK/GTK+ includes which are not available in Xlib builds (fix is to remove
00476  * the GDK/GTK+ dependicy from the code in gfx/src/x11shared/ ...)
00477  */
00478 #ifndef MOZ_ENABLE_FREETYPE2
00479 /*
00480  * Defines for the TrueType codepage bits.
00481  * Used as a hint for the languages supported in a TrueType font.
00482  */
00483 
00484 /*
00485  * ulCodePageRange1
00486  */
00487 #define TT_OS2_CPR1_LATIN1       (0x00000001) /* Latin 1                     */
00488 #define TT_OS2_CPR1_LATIN2       (0x00000002) /* Latin 2: Eastern Europe     */
00489 #define TT_OS2_CPR1_CYRILLIC     (0x00000004) /* Cyrillic                    */
00490 #define TT_OS2_CPR1_GREEK        (0x00000008) /* Greek                       */
00491 #define TT_OS2_CPR1_TURKISH      (0x00000010) /* Turkish                     */
00492 #define TT_OS2_CPR1_HEBREW       (0x00000020) /* Hebrew                      */
00493 #define TT_OS2_CPR1_ARABIC       (0x00000040) /* Arabic                      */
00494 #define TT_OS2_CPR1_BALTIC       (0x00000080) /* Windows Baltic              */
00495 #define TT_OS2_CPR1_VIETNAMESE   (0x00000100) /* Vietnamese                  */
00496                                  /* 9-15     Reserved for Alternate ANSI     */
00497 #define TT_OS2_CPR1_THAI         (0x00010000) /* Thai                        */
00498 #define TT_OS2_CPR1_JAPANESE     (0x00020000) /* JIS/Japan                   */
00499 #define TT_OS2_CPR1_CHINESE_SIMP (0x00040000) /* Chinese: Simplified         */
00500 #define TT_OS2_CPR1_KO_WANSUNG   (0x00080000) /* Korean Wansung              */
00501 #define TT_OS2_CPR1_CHINESE_TRAD (0x00100000) /* Chinese: Traditional        */
00502 #define TT_OS2_CPR1_KO_JOHAB     (0x00200000) /* Korean Johab                */
00503                                  /* 22-28    Reserved for Alternate ANSI&OEM */
00504 #define TT_OS2_CPR1_MAC_ROMAN    (0x20000000) /* Mac (US Roman)              */
00505 #define TT_OS2_CPR1_OEM          (0x40000000) /* OEM Character Set           */
00506 #define TT_OS2_CPR1_SYMBOL       (0x80000000) /* Symbol Character Set        */
00507 
00508 /*
00509  * ulCodePageRange2
00510  */                              /* 32-47    Reserved for OEM                */
00511 #define TT_OS2_CPR2_GREEK        (0x00010000) /* IBM Greek                   */
00512 #define TT_OS2_CPR2_RUSSIAN      (0x00020000) /* MS-DOS Russian              */
00513 #define TT_OS2_CPR2_NORDIC       (0x00040000) /* MS-DOS Nordic               */
00514 #define TT_OS2_CPR2_ARABIC       (0x00080000) /* Arabic                      */
00515 #define TT_OS2_CPR2_CA_FRENCH    (0x00100000) /* MS-DOS Canadian French      */
00516 #define TT_OS2_CPR2_HEBREW       (0x00200000) /* Hebrew                      */
00517 #define TT_OS2_CPR2_ICELANDIC    (0x00400000) /* MS-DOS Icelandic            */
00518 #define TT_OS2_CPR2_PORTUGESE    (0x00800000) /* MS-DOS Portuguese           */
00519 #define TT_OS2_CPR2_TURKISH      (0x01000000) /* IBM Turkish                 */
00520 #define TT_OS2_CPR2_CYRILLIC     (0x02000000)/*IBM Cyrillic; primarily Russian*/
00521 #define TT_OS2_CPR2_LATIN2       (0x04000000) /* Latin 2                     */
00522 #define TT_OS2_CPR2_BALTIC       (0x08000000) /* MS-DOS Baltic               */
00523 #define TT_OS2_CPR2_GREEK_437G   (0x10000000) /* Greek; former 437 G         */
00524 #define TT_OS2_CPR2_ARABIC_708   (0x20000000) /* Arabic; ASMO 708            */
00525 #define TT_OS2_CPR2_WE_LATIN1    (0x40000000) /* WE/Latin 1                  */
00526 #define TT_OS2_CPR2_US           (0x80000000) /* US                          */
00527 #endif /* !MOZ_ENABLE_FREETYPE2 */
00528 
00529 #endif /* !nsFontMetricsXlib_h__ */
00530