lang group table has been added to proper location under mozilla/intl;

removing the redundant table here; minor change; r=none


git-svn-id: svn://10.0.0.236/trunk@64213 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
erik%netscape.com 2000-03-27 04:55:35 +00:00
parent 5890e4382e
commit d3c89cc900
3 changed files with 0 additions and 71 deletions

View File

@ -59,8 +59,6 @@ public:
NS_IMETHOD GetCanonicalPixelScale(float &aScale) const;
NS_IMETHOD GetLangGroup(const nsString& aCharSet, nsIAtom** aLangGroup);
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIAtom* aLangGroup,
nsIFontMetrics*& aMetrics);
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIFontMetrics*& aMetrics);

View File

@ -264,8 +264,6 @@ public:
*/
NS_IMETHOD GetSystemAttribute(nsSystemAttrID anID, SystemAttrStruct * aInfo) const = 0;
NS_IMETHOD GetLangGroup(const nsString& aCharSet, nsIAtom** aLangGroup) = 0;
/**
* Get the nsIFontMetrics that describe the properties of
* an nsFont.

View File

@ -640,73 +640,6 @@ NS_IMETHODIMP DeviceContextImpl::GetPaletteInfo(nsPaletteInfo& aPaletteInfo)
return NS_OK;
}
typedef struct LangGroupEntry
{
char* mCharSet;
char* mLangGroup;
nsIAtom* mAtom;
} LangGroupEntry;
static LangGroupEntry langGroups[] =
{
{ "Shift_JIS", "ja", nsnull },
{ "Big5", "zh-TW", nsnull },
{ "EUC-JP", "ja", nsnull },
{ "EUC-KR", "ko", nsnull },
{ "GB2312", "zh-CN", nsnull },
{ "HZ-GB-2312", "zh-CN", nsnull },
{ "ISO-2022-JP", "ja", nsnull },
{ "ISO-2022-KR", "ko", nsnull },
{ "ISO-8859-1", "x-western", nsnull },
{ "ISO-8859-2", "x-central-euro", nsnull },
{ "ISO-8859-5", "x-cyrillic", nsnull },
{ "ISO-8859-7", "el", nsnull },
{ "ISO-8859-9", "tr", nsnull },
{ "KOI8-R", "x-cyrillic", nsnull },
{ "UTF-8", "x-unicode", nsnull },
{ "us-ascii", "x-western", nsnull },
{ "windows-1250", "x-central-euro", nsnull },
{ "windows-1251", "x-cyrillic", nsnull },
{ "x-euc-tw", "zh-TW", nsnull },
{ "x-mac-ce", "x-central-euro", nsnull },
{ "x-mac-cyrillic", "x-cyrillic", nsnull },
{ "x-mac-greek", "el", nsnull },
{ "x-mac-roman", "x-western", nsnull },
{ "x-mac-turkish", "tr", nsnull },
{ nsnull, nsnull, nsnull }
};
NS_IMETHODIMP
DeviceContextImpl::GetLangGroup(const nsString& aCharSet, nsIAtom** aLangGroup)
{
if (!aLangGroup) {
return NS_ERROR_NULL_POINTER;
}
*aLangGroup = nsnull;
LangGroupEntry* p = langGroups;
while (p->mCharSet) {
if (aCharSet.Equals(p->mCharSet)) {
if (!p->mAtom) {
p->mAtom = NS_NewAtom(p->mLangGroup);
if (p->mAtom) {
NS_ADDREF(p->mAtom);
}
else {
return NS_ERROR_FAILURE;
}
}
NS_ADDREF(p->mAtom);
*aLangGroup = p->mAtom;
return NS_OK;
}
p++;
}
return NS_OK;
}
/////////////////////////////////////////////////////////////
nsFontCache :: nsFontCache()