Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations | Functions | Variables
nsFontMetricsOS2.cpp File Reference
#include "nsGfxDefs.h"
#include "nsIPref.h"
#include "nsIServiceManager.h"
#include "nsILanguageAtomService.h"
#include "nsICharsetConverterManager.h"
#include "nsLocaleCID.h"
#include "nsILocaleService.h"
#include "nsICharRepresentable.h"
#include "nsISaveAsCharset.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsFontMetricsOS2.h"
#include "nsQuickSort.h"
#include "nsTextFormatter.h"
#include "prmem.h"
#include "plhash.h"
#include "prprf.h"
#include "nsReadableUtils.h"
#include "nsUnicodeRange.h"
#include "nsUnicharUtils.h"
#include "nsOS2Uni.h"
#include <math.h>

Go to the source code of this file.

Classes

struct  nsCharsetInfo
class  nsFontCleanupObserver
struct  nsFontFamilyName
struct  GenericFontEnumContext
struct  UnicodeFontEnumContext
struct  FindGlobalFontData
struct  EnumerateAllFontsData

Defines

#define USER_DEFINED   "x-user-def"
#define NS_REPLACEMENT_CHAR   PRUnichar(0x003F)
#define NS_MAX_FONT_WEIGHT   900
#define NS_MIN_FONT_WEIGHT   100
#define CHAR_BUFFER_SIZE   1024
#define MAKE_FONT_PREF_KEY(_pref, _s0, _s1)
#define IS_SPECIAL_WO_ELLIPSE(x)
#define IS_SPECIAL(x)
#define IsCJKLangGroupAtom(a)

Typedefs

typedef struct nsFontFamilyName nsFontFamilyName

Enumerations

enum  nsCharset {
  eCharset_DEFAULT = 0, eCharset_ANSI, eCharset_EASTEUROPE, eCharset_RUSSIAN,
  eCharset_GREEK, eCharset_TURKISH, eCharset_HEBREW, eCharset_ARABIC,
  eCharset_BALTIC, eCharset_THAI, eCharset_SHIFTJIS, eCharset_GB2312,
  eCharset_HANGEUL, eCharset_CHINESEBIG5, eCharset_JOHAB, eCharset_COUNT
}

Functions

static NS_DEFINE_CID (kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID)
static NS_DEFINE_CID (kPrefCID, NS_PREF_CID)
static NS_DEFINE_CID (kLocaleServiceCID, NS_LOCALESERVICE_CID)
static void FreeGlobals (void)
static nsresult InitGlobals (void)
static FONTMETRICS * getMetrics (long &lFonts, PCSZ facename, HPS hps)
static PLHashNumber PR_CALLBACK HashKey (const void *aString)
static PRIntn PR_CALLBACK CompareKeys (const void *aStr1, const void *aStr2)
 PR_STATIC_CALLBACK (void *) familyname_AllocTable(void *pool
static PRBool GenericFontEnumCallback (const nsString &aFamily, PRBool aGeneric, void *aData)
static void AppendGenericFontFromPref (nsString &aFontname, const char *aLangGroup, const char *aGeneric)
static PRBool FontEnumCallback (const nsString &aFamily, PRBool aGeneric, void *aData)
static PRBool UnicodeFontEnumCallback (const nsString &aFamily, PRBool aGeneric, void *aData)
 FindGlobalFontEnumFunc (GlobalFontEntry *aEntry, void *aData)
static nsresult SubstituteChars (const PRUnichar *aString, PRUint32 aLength, nsAutoChar16Buffer &aResult, PRUint32 *aCount)
static int CompareFontNames (const void *aArg1, const void *aArg2, void *aClosure)
 EnumerateAllFontsCallback (GlobalFontEntry *aEntry, void *aData)

Variables

static nsIPrefgPref = nsnull
static nsIAtomgUsersLocale = nsnull
static nsIAtomgSystemLocale = nsnull
static nsIAtomgUserDefined = nsnull
static int gInitialized = 0
static ULONG gSystemCodePage = 0
static ULONG gCurrHashValue = 1
static nsISaveAsCharsetgFontSubstituteConverter = nsnull
static nsIAtomgJA = nsnull
static nsIAtomgKO = nsnull
static nsIAtomgZHTW = nsnull
static nsIAtomgZHCN = nsnull
static nsIAtomgZHHK = nsnull
static nsCharsetInfo gCharsetInfo [eCharset_COUNT]
static nsFontCleanupObservergFontCleanupObserver
static nsFontFamilyName gBadDBCSFontMapping []
static nsFontFamilyName gFamilyNameTable []
static nsFontFamilyName gFamilyNameTableDBCS []

Class Documentation

struct nsFontFamilyName

Definition at line 146 of file nsFontMetricsGTK.cpp.

Class Members
const char * mName
char * mName
char * mWinName
const char * mXName
struct GenericFontEnumContext

Definition at line 1079 of file nsFontMetricsOS2.cpp.

Collaboration diagram for GenericFontEnumContext:
Class Members
PRUint32 mChar
HDC mDC
nsFontOS2 * mFont
nsFontWin * mFont
nsFontMetricsOS2 * mMetrics
nsFontMetricsWin * mMetrics
HPS mPS
struct UnicodeFontEnumContext

Definition at line 1606 of file nsFontMetricsOS2.cpp.

Collaboration diagram for UnicodeFontEnumContext:
Class Members
nsFontOS2 * mFont
nsFontMetricsOS2 * mMetrics
HPS mPS
struct FindGlobalFontData

Definition at line 2048 of file nsFontMetricsOS2.cpp.

Collaboration diagram for FindGlobalFontData:
Class Members
PRUint32 ch
GlobalFontEntry * entry
nsFontOS2FT * font
HPS ps
struct EnumerateAllFontsData

Definition at line 2673 of file nsFontMetricsOS2.cpp.

Collaboration diagram for EnumerateAllFontsData:
Class Members
PRUnichar ** array
int count

Define Documentation

Definition at line 79 of file nsFontMetricsOS2.cpp.

Value:
(IS_SPECIAL_WO_ELLIPSE(x) ||  \
                       (x == 0x2026)) /* hellip */

Definition at line 1709 of file nsFontMetricsOS2.cpp.

Value:
((x == 0x20AC) ||  /* euro */  \
                       (x == 0x2022) ||  /* bull */  \
                       (x == 0x201C) ||  /* ldquo */ \
                       (x == 0x201D) ||  /* rdquo */ \
                       (x == 0x2018) ||  /* lsquo */ \
                       (x == 0x2019) ||  /* rsquo */ \
                       (x == 0x2013) ||  /* ndash */ \
                       (x == 0x2014))    /* mdash */

Definition at line 1699 of file nsFontMetricsOS2.cpp.

Value:
((a)==gJA || (a)==gKO || (a)==gZHCN || \
                                (a)==gZHTW || (a) == gZHHK)

Definition at line 1956 of file nsFontMetricsOS2.cpp.

#define MAKE_FONT_PREF_KEY (   _pref,
  _s0,
  _s1 
)
Value:
_pref.Assign(_s0); \
 _pref.Append(_s1);

Definition at line 1101 of file nsFontMetricsOS2.cpp.

Definition at line 75 of file nsFontMetricsOS2.cpp.

Definition at line 76 of file nsFontMetricsOS2.cpp.

Definition at line 69 of file nsFontMetricsOS2.cpp.

#define USER_DEFINED   "x-user-def"

Definition at line 67 of file nsFontMetricsOS2.cpp.


Typedef Documentation


Enumeration Type Documentation

enum nsCharset
Enumerator:
eCharset_DEFAULT 
eCharset_ANSI 
eCharset_EASTEUROPE 
eCharset_RUSSIAN 
eCharset_GREEK 
eCharset_TURKISH 
eCharset_HEBREW 
eCharset_ARABIC 
eCharset_BALTIC 
eCharset_THAI 
eCharset_SHIFTJIS 
eCharset_GB2312 
eCharset_HANGEUL 
eCharset_CHINESEBIG5 
eCharset_JOHAB 
eCharset_COUNT 

Definition at line 107 of file nsFontMetricsOS2.cpp.


Function Documentation

static void AppendGenericFontFromPref ( nsString aFontname,
const char *  aLangGroup,
const char *  aGeneric 
) [static]

Definition at line 1106 of file nsFontMetricsOS2.cpp.

{
  nsresult res;
  nsCAutoString pref;
  nsXPIDLString value;
  nsCAutoString generic_dot_langGroup;

  generic_dot_langGroup.Assign(aGeneric);
  generic_dot_langGroup.Append('.');
  generic_dot_langGroup.Append(aLangGroup);

  // font.name.[generic].[langGroup]
  // the current user' selected font, it gives the first preferred font
  MAKE_FONT_PREF_KEY(pref, "font.name.", generic_dot_langGroup);
  res = gPref->CopyUnicharPref(pref.get(), getter_Copies(value));      
  if (NS_SUCCEEDED(res)) {
    if(!aFontname.IsEmpty())
      aFontname.Append((PRUnichar)',');
    aFontname.Append(value);
  }

  // font.name-list.[generic].[langGroup]
  // the pre-built list of default fonts, it gives alternative fonts
  MAKE_FONT_PREF_KEY(pref, "font.name-list.", generic_dot_langGroup);
  res = gPref->CopyUnicharPref(pref.get(), getter_Copies(value));      
  if (NS_SUCCEEDED(res)) {
    if(!aFontname.IsEmpty())
      aFontname.Append((PRUnichar)',');
    aFontname.Append(value);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int CompareFontNames ( const void aArg1,
const void aArg2,
void aClosure 
) [static]

Definition at line 2642 of file nsFontMetricsOS2.cpp.

{
  const PRUnichar* str1 = *((const PRUnichar**) aArg1);
  const PRUnichar* str2 = *((const PRUnichar**) aArg2);

  int rc = 9;
  if ((char)str1[0] == '@') {
    str1++;
    rc = nsCRT::strcmp(str1, str2);
    if (rc == 0)
      return 1;
  }
  if ((char)str2[0] == '@') {
    str2++;
    rc = nsCRT::strcmp(str1, str2);
    if (rc == 0)
      return -1;
  }

  if (rc == 9)
    rc = nsCRT::strcmp(str1, str2);
  return rc;
}
static PRIntn PR_CALLBACK CompareKeys ( const void aStr1,
const void aStr2 
) [static]

Definition at line 950 of file nsFontMetricsOS2.cpp.

{
  return nsCRT::strcmp(((const nsString*) aStr1)->get(),
    ((const nsString*) aStr2)->get()) == 0;
}

Here is the caller graph for this function:

EnumerateAllFontsCallback ( GlobalFontEntry aEntry,
void aData 
)

Definition at line 2680 of file nsFontMetricsOS2.cpp.

Here is the call graph for this function:

FindGlobalFontEnumFunc ( GlobalFontEntry aEntry,
void aData 
)

Definition at line 2057 of file nsFontMetricsOS2.cpp.

{
  FindGlobalFontData* data = NS_STATIC_CAST(FindGlobalFontData*, aData);
  strcpy(data->font->mFattrs.szFacename, aEntry->mMetrics->szFacename);
#ifdef PERF_HASGLYPH_CHAR_MAP
  if (aEntry->mHaveCheckedCharMap == nsnull) {
    aEntry->mHaveCheckedCharMap = (PRUint32*)calloc(UCS2_MAP_LEN, sizeof(PRUint32));
    aEntry->mRepresentableCharMap = (PRUint32*)calloc(UCS2_MAP_LEN, sizeof(PRUint32));
  }
  data->font->mHaveCheckedCharMap = aEntry->mHaveCheckedCharMap;
  data->font->mRepresentableCharMap = aEntry->mRepresentableCharMap;
#endif

  if (data->font->HasGlyph(data->ps, data->ch)) {
    data->entry = aEntry;
    return PL_DHASH_STOP;
  } else {
    return PL_DHASH_NEXT;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool FontEnumCallback ( const nsString aFamily,
PRBool  aGeneric,
void aData 
) [static]

Definition at line 1262 of file nsFontMetricsOS2.cpp.

{
  nsFontMetricsOS2* metrics = (nsFontMetricsOS2*) aData;

#ifdef USE_FREETYPE
  if (!nsFontMetricsOS2::gUseFTFunctions)
#endif
  {
    /* Hack for Truetype on OS/2 - if it's Arial and not 1252 or 0, just get another font */
    if (aFamily.Find("Arial", IGNORE_CASE) != -1) {
       if (metrics->mConvertCodePage != 1252) {
          if ((metrics->mConvertCodePage == 0) &&
              (gSystemCodePage != 850) &&
              (gSystemCodePage != 437)) {
             return PR_TRUE; // don't stop
          }
       }
    }
  }

  metrics->mFonts.AppendString(aFamily);
  if (aGeneric) {
    metrics->mGeneric.Assign(aFamily);
    ToLowerCase(metrics->mGeneric);
    return PR_FALSE; // stop
  }
  ++metrics->mGenericIndex;

  return PR_TRUE; // don't stop
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void FreeGlobals ( void  ) [static]
static PRBool GenericFontEnumCallback ( const nsString aFamily,
PRBool  aGeneric,
void aData 
) [static]

Definition at line 1088 of file nsFontMetricsOS2.cpp.

{
  GenericFontEnumContext* context = (GenericFontEnumContext*)aData;
  HPS ps = context->mPS;
  PRUint32 ch = context->mChar;
  nsFontMetricsOS2* metrics = context->mMetrics;
  context->mFont = metrics->LoadGenericFont(ps, ch, aFamily);
  if (context->mFont) {
    return PR_FALSE; // stop enumerating the list
  }
  return PR_TRUE; // don't stop
}

Here is the call graph for this function:

Here is the caller graph for this function:

static FONTMETRICS* getMetrics ( long lFonts,
PCSZ  facename,
HPS  hps 
) [static]

Definition at line 401 of file nsFontMetricsOS2.cpp.

{
   LONG lWant = 0;
   lFonts = GFX (::GpiQueryFonts(hps, QF_PUBLIC | QF_PRIVATE,
                                 facename, &lWant, 0, 0),
                 GPI_ALTERROR);
   if (!lFonts) {
      return NULL;
   }
   FONTMETRICS* pMetrics = (FONTMETRICS*)nsMemory::Alloc(lFonts * sizeof(FONTMETRICS));

   GFX (::GpiQueryFonts(hps, QF_PUBLIC | QF_PRIVATE, facename,
                        &lFonts, sizeof (FONTMETRICS), pMetrics),
        GPI_ALTERROR);

   return pMetrics;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PLHashNumber PR_CALLBACK HashKey ( const void aString) [static]

Definition at line 943 of file nsFontMetricsOS2.cpp.

{
  const nsString* str = (const nsString*)aString;
  return (PLHashNumber) nsCRT::HashCode(str->get());
}

Here is the call graph for this function:

Here is the caller graph for this function:

static nsresult InitGlobals ( void  ) [static]

Definition at line 215 of file nsFontMetricsOS2.cpp.

{
  CallGetService(kPrefCID, &gPref);
  if (!gPref) {
    FreeGlobals();
    return NS_ERROR_FAILURE;
  }

  nsCOMPtr<nsILanguageAtomService> langService;
  langService = do_GetService(NS_LANGUAGEATOMSERVICE_CONTRACTID);
  if (langService) {
    NS_IF_ADDREF(gUsersLocale = langService->GetLocaleLanguageGroup());
  }
  if (!gUsersLocale) {
    gUsersLocale = NS_NewAtom("x-western");
  }
  if (!gUsersLocale) {
    FreeGlobals();
    return NS_ERROR_OUT_OF_MEMORY;
  }

  UINT cp = ::WinQueryCp(HMQ_CURRENT);
  for (int i = 1; i < eCharset_COUNT; ++i) {
    if (gCharsetInfo[i].mCodePage == cp) {
      gSystemLocale = NS_NewAtom(gCharsetInfo[i].mLangGroup);
      break;
    }
  }
  if (!gSystemLocale) {
    gSystemLocale = gUsersLocale;
    NS_ADDREF(gSystemLocale);
  }

  gUserDefined = NS_NewAtom(USER_DEFINED);
  if (!gUserDefined) {
    FreeGlobals();
    return NS_ERROR_OUT_OF_MEMORY;
  }
#ifdef USE_FREETYPE
  if (nsFontMetricsOS2::gUseFTFunctions) {
    // enable the freetype engine
    nsFontMetricsOS2FT::pfnFt2EnableFontEngine(TRUE);

    gJA = NS_NewAtom("ja");
    if (!gJA) {
      FreeGlobals();
      return NS_ERROR_OUT_OF_MEMORY;
    }
    gKO = NS_NewAtom("ko");
    if (!gKO) {
      FreeGlobals();
      return NS_ERROR_OUT_OF_MEMORY;
    }
    gZHCN = NS_NewAtom("zh-CN");
    if (!gZHCN) {
      FreeGlobals();
      return NS_ERROR_OUT_OF_MEMORY;
    }
    gZHTW = NS_NewAtom("zh-TW");
    if (!gZHTW) {
      FreeGlobals();
      return NS_ERROR_OUT_OF_MEMORY;
    }
    gZHHK = NS_NewAtom("zh-HK");
    if (!gZHHK) {
      FreeGlobals();
      return NS_ERROR_OUT_OF_MEMORY;
    }
  }
#endif /* use_freetype */

  // Not all versions of OS/2 support the 1386 and 943 codepages, so by default
  // we use 1381 and 932 (see the declaration of gCharsetInfo above).
  // Here, we check to see if the OS supports the newer codepages, and if so,
  // use them.
  ULONG numCP = ::WinQueryCpList((HAB)0, 0, NULL);
  if (numCP > 0) {
     ULONG * pCPList = (ULONG*)nsMemory::Alloc(numCP*sizeof(ULONG));
     if (::WinQueryCpList((HAB)0, numCP, pCPList)) {
        for (PRUint32 i = 0; i < numCP; i++) {
           if (pCPList[i] == 1386) {
              gCharsetInfo[11].mCodePage = 1386;
           } else if (pCPList[i] == 943) {
              gCharsetInfo[10].mCodePage = 943;
           }
        }
     }
     nsMemory::Free(pCPList);
  }

  gSystemCodePage = ::WinQueryCp(HMQ_CURRENT);

  nsresult res;

  if (!nsFontMetricsOS2::gGlobalFonts) {
    res = nsFontMetricsOS2::InitializeGlobalFonts();
    if (NS_FAILED(res)) {
      FreeGlobals();
      return res;
    }
  }

  res = gPref->GetBoolPref("browser.display.substitute_vector_fonts",
                                    &nsFontMetricsOS2::gSubstituteVectorFonts);
  NS_ASSERTION( NS_SUCCEEDED(res), "Could not get pref 'browser.display.substitute_vector_fonts'" );

  //register an observer to take care of cleanup
  gFontCleanupObserver = new nsFontCleanupObserver();
  NS_ASSERTION(gFontCleanupObserver, "failed to create observer");
  if (gFontCleanupObserver) {
    // register for shutdown
    nsresult rv;
    nsCOMPtr<nsIObserverService> observerService(do_GetService("@mozilla.org/observer-service;1", &rv));
    if (NS_SUCCEEDED(rv)) {
      rv = observerService->AddObserver(gFontCleanupObserver, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
    }    
  }
  gInitialized = 1;

  return NS_OK;
}

Here is the call graph for this function:

static NS_DEFINE_CID ( kCharsetConverterManagerCID  ,
NS_ICHARSETCONVERTERMANAGER_CID   
) [static]
static NS_DEFINE_CID ( kPrefCID  ,
NS_PREF_CID   
) [static]
static NS_DEFINE_CID ( kLocaleServiceCID  ,
NS_LOCALESERVICE_CID   
) [static]
static nsresult SubstituteChars ( const PRUnichar aString,
PRUint32  aLength,
nsAutoChar16Buffer aResult,
PRUint32 aCount 
) [static]

Definition at line 2539 of file nsFontMetricsOS2.cpp.

{
  nsresult res;
  if (!gFontSubstituteConverter) {
    CallCreateInstance(NS_SAVEASCHARSET_CONTRACTID, &gFontSubstituteConverter);
    if (gFontSubstituteConverter) {
      res = gFontSubstituteConverter->Init("ISO-8859-1",
                              nsISaveAsCharset::attr_EntityAfterCharsetConv +
                              nsISaveAsCharset::attr_FallbackQuestionMark +
                              nsISaveAsCharset::attr_IgnoreIgnorables,
                              nsIEntityConverter::transliterate);
      if (NS_FAILED(res)) {
        NS_RELEASE(gFontSubstituteConverter);
      }
    }
  }

  // do the transliteration if we have a converter
  PRUnichar* result; 
  if (gFontSubstituteConverter) {
    nsXPIDLCString conv;
    nsAutoString tmp(aString, aLength); // we need to pass a null-terminated string
    res = gFontSubstituteConverter->Convert(tmp.get(), getter_Copies(conv));
    if (NS_SUCCEEDED(res)) {
      *aCount = conv.Length();
      if (*aCount > 0) {
        if (!aResult.EnsureElemCapacity(*aCount)) {
          return NS_ERROR_OUT_OF_MEMORY;
        }
        result = aResult.get();
        PRUnichar* u = result;
        const char* c = conv.get();
        for (; *c; ++c, ++u) {
          *u = *c;
        }
      }
      return NS_OK;
    }
  }

  // we reach here if we couldn't transliterate, so fallback to question marks 
  if (!aResult.EnsureElemCapacity(aLength)) return NS_ERROR_OUT_OF_MEMORY;
  result = aResult.get();
  for (PRUint32 i = 0; i < aLength; i++) {
    result[i] = NS_REPLACEMENT_CHAR;
  }
  *aCount = aLength;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool UnicodeFontEnumCallback ( const nsString aFamily,
PRBool  aGeneric,
void aData 
) [static]

Definition at line 1614 of file nsFontMetricsOS2.cpp.

{
  UnicodeFontEnumContext* context = (UnicodeFontEnumContext*)aData;
  HPS ps = context->mPS;
  nsFontMetricsOS2* metrics = context->mMetrics;
  context->mFont = metrics->LoadUnicodeFont(ps, aFamily);
  if (context->mFont) {
    return PR_FALSE; // stop enumerating the list
  }
  return PR_TRUE; // don't stop
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Initial value:
{
  { "\xB7\xC2\xCB\xCE\xB3\xA3\xB9\xE6", "IBM Fang Song SC"},
  { "\xBA\xDA\xCC\xE5\xB3\xA3\xB9\xE6", "IBM Hei SC"},
  { "\xBF\xAC\xCC\xE5\xB3\xA3\xB9\xE6", "IBM Kai SC"},
  { "\x5B\x8B\x4F\x53\x5E\x38\x89\xC4", "IBM Song SC"},
  { "\x91\x76\x91\xCC\x8F\xED",         "IBM Song SC"},

  { "@\xB7\xC2\xCB\xCE\xB3\xA3\xB9\xE6", "@IBM Fang Song SC"},
  { "@\xBA\xDA\xCC\xE5\xB3\xA3\xB9\xE6", "@IBM Hei SC"},
  { "@\xBF\xAC\xCC\xE5\xB3\xA3\xB9\xE6", "@IBM Kai SC"},
  { "@\x5B\x8B\x4F\x53\x5E\x38\x89\xC4", "@IBM Song SC"},
  { "@\x91\x76\x91\xCC\x8F\xED",         "@IBM Song SC"},

  { "\xAC\xD1\xFA\x80\xFA\xBD\x8F\x82",  "MOEKai TC"},
  { "\xBC\xD0\xB7\xC7\xB7\xA2\xC5\xE9",  "MOEKai TC"},
  { "\xAC\xD1\xFA\x80\x15\xA7\x8F\x82",  "MOESung TC"},
  { "\xBC\xD0\xB7\xC7\xA7\xBA\xC5\xE9",  "MOESung TC"},
  { "\xCF\xCF\x14\xB6\x8F\x82",          "Hei TC"},
  { "\xA4\xA4\xB6\xC2\xC5\xE9",          "Hei TC"},

  { "@\xAC\xD1\xFA\x80\xFA\xBD\x8F\x82",  "@MOEKai TC"},
  { "@\xBC\xD0\xB7\xC7\xB7\xA2\xC5\xE9",  "@MOEKai TC"},
  { "@\xAC\xD1\xFA\x80\x15\xA7\x8F\x82",  "@MOESong TC"},
  { "@\xBC\xD0\xB7\xC7\xA7\xBA\xC5\xE9",  "@MOESong TC"},
  { "@\xCF\xCF\x14\xB6\x8F\x82",          "@Hei TC"},
  { "@\xA4\xA4\xB6\xC2\xC5\xE9",          "@Hei TC"},
  { nsnull, nsnull }
}

Definition at line 695 of file nsFontMetricsOS2.cpp.

Initial value:
{
  { "DEFAULT",       0,    "" },
  { "ANSI",          1252, "x-western" },
  { "EASTEUROPE",    1250, "x-central-euro" },
  { "RUSSIAN",       1251, "x-cyrillic" },
  { "GREEK",         813,  "el" },
  { "TURKISH",       1254, "tr" },
  { "HEBREW",        1208,  "he" },
  { "ARABIC",        864,  "ar" },
  { "BALTIC",        1257, "x-baltic" },
  { "THAI",          874,  "th" },
  { "SHIFTJIS",      932,  "ja" },
  { "GB2312",        1381, "zh-CN" },
  { "HANGEUL",       949,  "ko" },
  { "CHINESEBIG5",   950,  "zh-TW" },
  { "JOHAB",         1361, "ko-XXX", }
}

Definition at line 135 of file nsFontMetricsOS2.cpp.

ULONG gCurrHashValue = 1 [static]

Definition at line 93 of file nsFontMetricsOS2.cpp.

Initial value:
{




  { "times",           "Times New Roman" },
  { "times roman",     "Times New Roman" },

  { nsnull, nsnull }
}

Definition at line 914 of file nsFontMetricsOS2.cpp.

Initial value:
{




  { "times",           "Times New Roman" },
  { "times roman",     "Times New Roman" },
  { "warpsans",        "WarpSans Combined" },

  { nsnull, nsnull }
}

Definition at line 926 of file nsFontMetricsOS2.cpp.

Definition at line 212 of file nsFontMetricsOS2.cpp.

Definition at line 97 of file nsFontMetricsOS2.cpp.

int gInitialized = 0 [static]

Definition at line 91 of file nsFontMetricsOS2.cpp.

nsIAtom* gJA = nsnull [static]

Definition at line 99 of file nsFontMetricsOS2.cpp.

nsIAtom* gKO = nsnull [static]

Definition at line 100 of file nsFontMetricsOS2.cpp.

nsIPref* gPref = nsnull [static]

Definition at line 87 of file nsFontMetricsOS2.cpp.

ULONG gSystemCodePage = 0 [static]

Definition at line 92 of file nsFontMetricsOS2.cpp.

Definition at line 89 of file nsFontMetricsOS2.cpp.

Definition at line 90 of file nsFontMetricsOS2.cpp.

Definition at line 88 of file nsFontMetricsOS2.cpp.

nsIAtom* gZHCN = nsnull [static]

Definition at line 102 of file nsFontMetricsOS2.cpp.

nsIAtom* gZHHK = nsnull [static]

Definition at line 103 of file nsFontMetricsOS2.cpp.

nsIAtom* gZHTW = nsnull [static]

Definition at line 101 of file nsFontMetricsOS2.cpp.