FT_Library g_FreeTypeLibrary;
-typedef struct
-{
- FT_Int major;
- FT_Int minor;
- FT_Int patch;
-} FT_Version_t;
-static FT_Version_t FT_Version;
-static DWORD FT_SimpleVersion;
-#define FT_VERSION_VALUE(major, minor, patch) (((major) << 16) | ((minor) << 8) | (patch))
-
/* special font names */
static const UNICODE_STRING g_MarlettW = RTL_CONSTANT_STRING(L"Marlett");
return FALSE;
}
- FT_Library_Version(g_FreeTypeLibrary,&FT_Version.major,&FT_Version.minor,&FT_Version.patch);
-
- DPRINT1("FreeType version is %d.%d.%d\n",FT_Version.major,FT_Version.minor,FT_Version.patch);
- FT_SimpleVersion = ((FT_Version.major << 16) & 0xff0000) |
- ((FT_Version.minor << 8) & 0x00ff00) |
- ((FT_Version.patch ) & 0x0000ff);
-
IntLoadSystemFonts();
IntLoadFontSubstList(&g_FontSubstListHead);
} while (Entry);
}
-static BOOL is_hinting_enabled(void)
-{
- static int enabled = -1;
-
- if (enabled == -1)
- {
- /* Use the >= 2.2.0 function if available */
- FT_TrueTypeEngineType type = FT_Get_TrueType_Engine_Type(g_FreeTypeLibrary);
- enabled = (type == FT_TRUETYPE_ENGINE_TYPE_PATENTED);
-
- DPRINT1("hinting is %senabled\n", enabled ? "" : "NOT ");
- }
- return enabled;
-}
-
-static BOOL is_subpixel_rendering_enabled( void )
-{
- static int enabled = -1;
- if (enabled == -1)
- {
- /* FreeType >= 2.8.1 offers LCD-optimezed rendering without lcd filters. */
- if (FT_SimpleVersion >= FT_VERSION_VALUE(2, 8, 1))
- enabled = TRUE;
- else enabled = FALSE;
-
- DPRINT1("subpixel rendering is %senabled\n", enabled ? "" : "NOT ");
- }
- return enabled;
-}
-
BOOL FASTCALL
IntIsFontRenderingEnabled(VOID)
{
- return is_hinting_enabled() && is_subpixel_rendering_enabled() && g_RenderingEnabled;
+ return (gpsi->BitsPixel > 8) && g_RenderingEnabled;
}
VOID FASTCALL
switch (iFormat)
{
case GGO_BITMAP:
+ {
width = gm.gmBlackBoxX;
height = gm.gmBlackBoxY;
pitch = ((width + 31) >> 5) << 2;
}
case ft_glyph_format_outline:
+ {
ft_bitmap.width = width;
ft_bitmap.rows = height;
ft_bitmap.pitch = pitch;
FT_Outline_Get_Bitmap(g_FreeTypeLibrary, &ft_face->glyph->outline, &ft_bitmap);
IntUnLockFreeType();
break;
+ }
default:
DPRINT1("Loaded glyph format %x\n", ft_face->glyph->format);
return GDI_ERROR;
}
+
break;
+ }
case GGO_GRAY2_BITMAP:
case GGO_GRAY4_BITMAP:
DPRINT1("Loaded glyph format %x\n", ft_face->glyph->format);
return GDI_ERROR;
}
+
+ break;
}
case GGO_NATIVE:
IntUnLockFreeType();
break;
}
+
case GGO_BEZIER:
{
FT_Outline *outline = &ft_face->glyph->outline;
String,
Count,
(const INT *)Dx);
- DC_UnlockDc(dc);
return bResult;
}
if ((fuOptions & ETO_OPAQUE) && (dc->pdcattr->ulDirty_ & DIRTY_BACKGROUND))
DC_vUpdateBackgroundBrush(dc) ;
- if(dc->pdcattr->ulDirty_ & DIRTY_TEXT)
+ if (dc->pdcattr->ulDirty_ & DIRTY_TEXT)
DC_vUpdateTextBrush(dc) ;
thickness = 1;