FONT_ENTRY_MEM *Entry;
} FONT_ENTRY_COLL_MEM, *PFONT_ENTRY_COLL_MEM;
-#include <pshpack1.h> /* We don't like padding for these structures */
+#include <pshpack1.h> /* We don't like padding for these structures for hashing */
typedef struct _EMULATION_BOLD_ITALIC
{
#include <poppack.h>
-C_ASSERT(offsetof(FONT_CACHE_ENTRY, GlyphIndex) % sizeof(DWORD) == 0);
-C_ASSERT(sizeof(FONT_CACHE_ENTRY) % sizeof(DWORD) == 0);
+C_ASSERT(FIELD_OFFSET(FONT_CACHE_ENTRY, GlyphIndex) % sizeof(DWORD) == 0); /* for hashing */
+C_ASSERT(sizeof(FONT_CACHE_ENTRY) % sizeof(DWORD) == 0); /* for hashing */
/*
* FONTSUBST_... --- constants for font substitutes
* TRUE on success, FALSE on failure.
*
*/
-static BOOLEAN APIENTRY
+static BOOLEAN
IntTranslateCharsetInfo(PDWORD Src, /* [in]
if flags == TCI_SRCFONTSIG: pointer to fsCsb of a FONTSIGNATURE
if flags == TCI_SRCCHARSET: a character set value
return FALSE;
}
-static DWORD APIENTRY
-IntGetHash(LPCVOID pv, DWORD cdw)
+static DWORD
+IntGetHash(IN LPCVOID pv, IN DWORD cdw)
{
DWORD dwHash = cdw;
const DWORD *pdw = pv;
return dwHash;
}
-FT_BitmapGlyph APIENTRY
-ftGdiGlyphCacheGet(const FONT_CACHE_ENTRY *pCache)
+static FT_BitmapGlyph
+ftGdiGlyphCacheGet(IN const FONT_CACHE_ENTRY *pCache)
{
PLIST_ENTRY CurrentEntry;
PFONT_CACHE_ENTRY FontEntry;
}
/* no cache */
-FT_BitmapGlyph APIENTRY
+static FT_BitmapGlyph
ftGdiGlyphSet(
FT_Face Face,
FT_GlyphSlot GlyphSlot,
return BitmapGlyph;
}
-FT_BitmapGlyph APIENTRY
+static FT_BitmapGlyph
ftGdiGlyphCacheSet(
- PFONT_CACHE_ENTRY Cache,
- FT_GlyphSlot GlyphSlot)
+ IN OUT PFONT_CACHE_ENTRY Cache,
+ IN FT_GlyphSlot GlyphSlot)
{
FT_Glyph GlyphCopy;
INT error;
return needed;
}
-FT_BitmapGlyph
-APIENTRY
+static FT_BitmapGlyph
ftGdiGetRealGlyph(
- PFONT_CACHE_ENTRY Cache)
+ IN OUT PFONT_CACHE_ENTRY Cache)
{
INT error;
FT_GlyphSlot glyph;
Cache.lfHeight = plf->lfHeight;
Cache.Aspect.Emu.Bold = EMUBOLD_NEEDED(FontGDI->OriginalWeight, plf->lfWeight);
- ASSERT(Cache.Aspect.Emu.Bold <= 1);
-
Cache.Aspect.Emu.Italic = (plf->lfItalic && !FontGDI->OriginalItalic);
- ASSERT(Cache.Aspect.Emu.Italic <= 1);
if (IntIsFontRenderingEnabled())
Cache.Aspect.RenderMode = (BYTE)IntGetFontRenderMode(plf);
}
/* Calculate width of the text. */
-BOOL
-APIENTRY
+static BOOL
ftGdiGetTextWidth(
LONGLONG *pTextWidth64,
LPCWSTR String,
Cache.lfHeight = plf->lfHeight;
Cache.Aspect.Emu.Bold = EMUBOLD_NEEDED(FontGDI->OriginalWeight, plf->lfWeight);
- ASSERT(Cache.Aspect.Emu.Bold <= 1);
-
Cache.Aspect.Emu.Italic = (plf->lfItalic && !FontGDI->OriginalItalic);
- ASSERT(Cache.Aspect.Emu.Italic <= 1);
if (IntIsFontRenderingEnabled())
Cache.Aspect.RenderMode = (BYTE)IntGetFontRenderMode(plf);