gdi32: Move a few font functions to text.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f801e27d32
commit
23345fe055
|
@ -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.@)
|
||||||
*
|
*
|
||||||
|
@ -6682,58 +6672,6 @@ BOOL WINAPI GetFontResourceInfoW( LPCWSTR str, LPDWORD size, PVOID buffer, DWORD
|
||||||
return FALSE;
|
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.
|
|
||||||
*
|
|
||||||
* 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.@)
|
||||||
*
|
*
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue