Commit 90020c95 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Add a Wine specific flag to GetRasterizeCaps that reports whether

freetype's patented hinter is enabled. This will be used by winex11 to check whether it should honour the gasp table settings.
parent 71af04b6
......@@ -2431,19 +2431,6 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD fHidden,
return FALSE; /* create failed */
}
/*************************************************************************
* GetRasterizerCaps (GDI32.@)
*/
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
{
lprs->nSize = sizeof(RASTERIZER_STATUS);
lprs->wFlags = TT_AVAILABLE|TT_ENABLED;
lprs->nLanguageID = 0;
return TRUE;
}
/*************************************************************************
* GetKerningPairsA (GDI32.@)
*/
......
......@@ -103,6 +103,7 @@ static void *ft_handle = NULL;
MAKE_FUNCPTR(FT_Vector_Unit);
MAKE_FUNCPTR(FT_Done_Face);
MAKE_FUNCPTR(FT_Get_Char_Index);
MAKE_FUNCPTR(FT_Get_Module);
MAKE_FUNCPTR(FT_Get_Sfnt_Table);
MAKE_FUNCPTR(FT_Init_FreeType);
MAKE_FUNCPTR(FT_Load_Glyph);
......@@ -1476,6 +1477,7 @@ BOOL WineEngInit(void)
LOAD_FUNCPTR(FT_Vector_Unit)
LOAD_FUNCPTR(FT_Done_Face)
LOAD_FUNCPTR(FT_Get_Char_Index)
LOAD_FUNCPTR(FT_Get_Module)
LOAD_FUNCPTR(FT_Get_Sfnt_Table)
LOAD_FUNCPTR(FT_Init_FreeType)
LOAD_FUNCPTR(FT_Load_Glyph)
......@@ -3752,6 +3754,32 @@ BOOL WINAPI FontIsLinked(HDC hdc)
return ret;
}
static BOOL is_hinting_enabled(void)
{
FT_Module mod = pFT_Get_Module(library, "truetype");
if(mod && FT_DRIVER_HAS_HINTER(mod))
return TRUE;
return FALSE;
}
/*************************************************************************
* GetRasterizerCaps (GDI32.@)
*/
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
{
static int hinting = -1;
if(hinting == -1)
hinting = is_hinting_enabled();
lprs->nSize = sizeof(RASTERIZER_STATUS);
lprs->wFlags = TT_AVAILABLE | TT_ENABLED | (hinting ? WINE_TT_HINTER_ENABLED : 0);
lprs->nLanguageID = 0;
return TRUE;
}
#else /* HAVE_FREETYPE */
BOOL WineEngInit(void)
......@@ -3867,4 +3895,16 @@ BOOL WINAPI FontIsLinked(HDC hdc)
{
return FALSE;
}
/*************************************************************************
* GetRasterizerCaps (GDI32.@)
*/
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
{
lprs->nSize = sizeof(RASTERIZER_STATUS);
lprs->wFlags = 0;
lprs->nLanguageID = 0;
return TRUE;
}
#endif /* HAVE_FREETYPE */
......@@ -84,6 +84,10 @@ typedef struct tagPALETTEOBJ
extern void *GDI_GetObjPtr( HGDIOBJ, WORD );
extern void GDI_ReleaseObj( HGDIOBJ );
/* GetGlyphOutline */
#define WINE_GGO_GRAY16_BITMAP 0x7f
/* GetRasterizerCaps */
#define WINE_TT_HINTER_ENABLED 0x8000
#endif /* __WINE_GDI_H */
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