зеркало из https://github.com/mozilla/pjs.git
Fix mac build
This commit is contained in:
Родитель
5179e2aba4
Коммит
ec33bc0eb4
|
@ -548,8 +548,48 @@ nsDrawingSurface nsDeviceContextMac :: GetDrawingSurface()
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextMac::FirstExistingFont(const nsFont& aFont, nsString& aFaceName)
|
||||
{
|
||||
|
||||
/*
|
||||
|
||||
IMPLEMENT THIS! -- gpk
|
||||
|
||||
FontEnumData data(this, aFaceName);
|
||||
if (aFont.EnumerateFamilies(FontEnumCallback, &data)) {
|
||||
return NS_ERROR_FAILURE; // ran out
|
||||
}
|
||||
*/
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextMac::GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
|
||||
PRBool& aAliased)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
|
||||
/*
|
||||
|
||||
IMPLEMENT THIS! -- gpk
|
||||
if (nsnull == mFontAliasTable) {
|
||||
result = CreateFontAliasTable();
|
||||
}
|
||||
|
||||
if (nsnull != mFontAliasTable) {
|
||||
StringKey key(aFaceName);
|
||||
const nsString* alias = (const nsString*)mFontAliasTable->Get(&key);
|
||||
if (nsnull != alias) {
|
||||
aLocalName = *alias;
|
||||
aAliased = PR_TRUE;
|
||||
}
|
||||
else {
|
||||
aLocalName = aFaceName;
|
||||
aAliased = PR_FALSE;
|
||||
}
|
||||
}
|
||||
*/
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -84,6 +84,10 @@ public:
|
|||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||
NS_IMETHOD CreateILColorSpace(IL_ColorSpace*& aColorSpace);
|
||||
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
||||
NS_IMETHOD FirstExistingFont(const nsFont& aFont, nsString& aFaceName);
|
||||
NS_IMETHOD GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
|
||||
PRBool& aAliased);
|
||||
|
||||
|
||||
protected:
|
||||
~nsDeviceContextMac();
|
||||
|
|
|
@ -293,12 +293,12 @@ nscoord nsFontMetricsMac :: GetWidth(const PRUnichar *aString, PRUint32 aLength)
|
|||
// PR_Free(xstring);
|
||||
|
||||
//return (nscoord(width * mContext->GetDevUnitsToAppUnits()));
|
||||
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
// XXX this needs to be implemented correctly
|
||||
nscoord nsFontMetricsWin :: GetWidth(nsIDeviceContext *aContext, const nsString& aString)
|
||||
nscoord nsFontMetricsMac:: GetWidth(nsIDeviceContext *aContext, const nsString& aString)
|
||||
{
|
||||
return GetWidth(aString.GetUnicode(), aString.Length());
|
||||
}
|
||||
|
|
|
@ -548,8 +548,48 @@ nsDrawingSurface nsDeviceContextMac :: GetDrawingSurface()
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextMac::FirstExistingFont(const nsFont& aFont, nsString& aFaceName)
|
||||
{
|
||||
|
||||
/*
|
||||
|
||||
IMPLEMENT THIS! -- gpk
|
||||
|
||||
FontEnumData data(this, aFaceName);
|
||||
if (aFont.EnumerateFamilies(FontEnumCallback, &data)) {
|
||||
return NS_ERROR_FAILURE; // ran out
|
||||
}
|
||||
*/
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextMac::GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
|
||||
PRBool& aAliased)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
|
||||
/*
|
||||
|
||||
IMPLEMENT THIS! -- gpk
|
||||
if (nsnull == mFontAliasTable) {
|
||||
result = CreateFontAliasTable();
|
||||
}
|
||||
|
||||
if (nsnull != mFontAliasTable) {
|
||||
StringKey key(aFaceName);
|
||||
const nsString* alias = (const nsString*)mFontAliasTable->Get(&key);
|
||||
if (nsnull != alias) {
|
||||
aLocalName = *alias;
|
||||
aAliased = PR_TRUE;
|
||||
}
|
||||
else {
|
||||
aLocalName = aFaceName;
|
||||
aAliased = PR_FALSE;
|
||||
}
|
||||
}
|
||||
*/
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -84,6 +84,10 @@ public:
|
|||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||
NS_IMETHOD CreateILColorSpace(IL_ColorSpace*& aColorSpace);
|
||||
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
||||
NS_IMETHOD FirstExistingFont(const nsFont& aFont, nsString& aFaceName);
|
||||
NS_IMETHOD GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
|
||||
PRBool& aAliased);
|
||||
|
||||
|
||||
protected:
|
||||
~nsDeviceContextMac();
|
||||
|
|
Загрузка…
Ссылка в новой задаче