Commit 23345fe0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Move a few font functions to text.c.

parent f801e27d
...@@ -5518,16 +5518,6 @@ done: ...@@ -5518,16 +5518,6 @@ done:
} }
/***********************************************************************
* GetAspectRatioFilterEx (GDI32.@)
*/
BOOL WINAPI GetAspectRatioFilterEx( HDC hdc, LPSIZE pAspectRatio )
{
FIXME("(%p, %p): -- Empty Stub !\n", hdc, pAspectRatio);
return FALSE;
}
/****************************************************************************** /******************************************************************************
* NtGdiGetCharABCWidthsW (win32u.@) * NtGdiGetCharABCWidthsW (win32u.@)
* *
...@@ -6683,58 +6673,6 @@ BOOL WINAPI GetFontResourceInfoW( LPCWSTR str, LPDWORD size, PVOID buffer, DWORD ...@@ -6683,58 +6673,6 @@ BOOL WINAPI GetFontResourceInfoW( LPCWSTR str, LPDWORD size, PVOID buffer, DWORD
} }
/*********************************************************************** /***********************************************************************
* GetTextCharset (GDI32.@)
*/
UINT WINAPI GetTextCharset(HDC hdc)
{
/* MSDN docs say this is equivalent */
return NtGdiGetTextCharsetInfo( hdc, NULL, 0 );
}
/***********************************************************************
* GdiGetCharDimensions (GDI32.@)
*
* Gets the average width of the characters in the English alphabet.
*
* PARAMS
* hdc [I] Handle to the device context to measure on.
* lptm [O] Pointer to memory to store the text metrics into.
* height [O] On exit, the maximum height of characters in the English alphabet.
*
* RETURNS
* The average width of characters in the English alphabet.
*
* NOTES
* This function is used by the dialog manager to get the size of a dialog
* unit. It should also be used by other pieces of code that need to know
* the size of a dialog unit in logical units without having access to the
* window handle of the dialog.
* Windows caches the font metrics from this function, but we don't and
* there doesn't appear to be an immediate advantage to do so.
*
* SEE ALSO
* GetTextExtentPointW, GetTextMetricsW, MapDialogRect.
*/
LONG WINAPI GdiGetCharDimensions(HDC hdc, LPTEXTMETRICW lptm, LONG *height)
{
SIZE sz;
if(lptm && !GetTextMetricsW(hdc, lptm)) return 0;
if(!GetTextExtentPointW(hdc, L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 52, &sz))
return 0;
if (height) *height = sz.cy;
return (sz.cx / 26 + 1) / 2;
}
BOOL WINAPI EnableEUDC(BOOL fEnableEUDC)
{
FIXME("(%d): stub\n", fEnableEUDC);
return FALSE;
}
/***********************************************************************
* GetFontUnicodeRanges (GDI32.@) * GetFontUnicodeRanges (GDI32.@)
* *
* Retrieve a list of supported Unicode characters in a font. * Retrieve a list of supported Unicode characters in a font.
......
...@@ -1914,3 +1914,57 @@ DWORD WINAPI GetGlyphIndicesA( HDC hdc, const char *str, INT count, WORD *indice ...@@ -1914,3 +1914,57 @@ DWORD WINAPI GetGlyphIndicesA( HDC hdc, const char *str, INT count, WORD *indice
HeapFree( GetProcessHeap(), 0, strW ); HeapFree( GetProcessHeap(), 0, strW );
return ret; return ret;
} }
/***********************************************************************
* GetAspectRatioFilterEx (GDI32.@)
*/
BOOL WINAPI GetAspectRatioFilterEx( HDC hdc, SIZE *aspect_ratio )
{
FIXME( "(%p, %p): stub\n", hdc, aspect_ratio );
return FALSE;
}
/***********************************************************************
* GetTextCharset (GDI32.@)
*/
UINT WINAPI GetTextCharset( HDC hdc )
{
/* MSDN docs say this is equivalent */
return NtGdiGetTextCharsetInfo( hdc, NULL, 0 );
}
/***********************************************************************
* GdiGetCharDimensions (GDI32.@)
*
* Gets the average width of the characters in the English alphabet.
*
* NOTES
* This function is used by the dialog manager to get the size of a dialog
* unit. It should also be used by other pieces of code that need to know
* the size of a dialog unit in logical units without having access to the
* window handle of the dialog.
* Windows caches the font metrics from this function, but we don't and
* there doesn't appear to be an immediate advantage to do so.
*/
LONG WINAPI GdiGetCharDimensions( HDC hdc, TEXTMETRICW *metric, LONG *height )
{
SIZE sz;
if (metric && !GetTextMetricsW( hdc, metric )) return 0;
if (!GetTextExtentPointW( hdc, L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
52, &sz ))
return 0;
if (height) *height = sz.cy;
return (sz.cx / 26 + 1) / 2;
}
/***********************************************************************
* EnableEUDC (GDI32.@)
*/
BOOL WINAPI EnableEUDC( BOOL enable )
{
FIXME( "(%d): stub\n", enable );
return FALSE;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment