Breaking Changes from Beta to RC
During the development of the Release Candidate (RC) of Windows 7 there have been some changes made to improve functionality and to disambiguate certain components of the DirectWrite API. This overview describes the changes that will cause certain code that is based on the Beta Microsoft Windows Software Development Kit (SDK) to no longer work.
DWRITE_RENDERING_MODE
The names of the constants in the DWRITE_RENDERING_MODE enumeration have been changed. The name of the enumerated type DWRITE_RENDERING_MODE has not been changed. Below is a table of the old names and the new names.
Old Name | New Name |
---|---|
DWRITE_RENDERING_MODE_BILEVEL | DWRITE_RENDERING_MODE_ALIASED |
DWRITE_RENDERING_MODE_CLEARTYPE_COMPATIBLE | DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC |
DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL | DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL |
DWRITE_RENDERING_MODE_CLEARTYPE | DWRITE_RENDERING_MODE_NATURAL |
DWRITE_RENDERING_MODE_SYMMETRIC | DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC |
DWRITE_RENDERING_MODE_OUTLINE | DWRITE_RENDERING_MODE_OUTLINE |
Note The DWRITE_RENDERING_MODE_OUTLINE constant in the DWRITE_RENDERING_MODE enumeration has not changed.
DWRITE_MEASURING_METHOD
The DWRITE_MEASURING_METHOD enumerated type has been renamed to DWRITE_MEASURING_MODE. The names of the constants in this enumeration have also been changed. Below is a table of the old names and the new names.
Old Name | New Name |
---|---|
DWRITE_MEASURING_METHOD_USE_IDEAL_METRICS | DWRITE_MEASURING_MODE_NATURAL |
DWRITE_MEASURING_METHOD_USE_DISPLAY_COMPATIBLE_METRICS | DWRITE_MEASURING_MODE_GDI_CLASSIC |
DWRITE_MEASURING_METHOD_USE_DISPLAY_NATURAL_METRICS | DWRITE_MEASURING_MODE_GDI_NATURAL |
DWRITE_UNDERLINE and DWRITE_STRIKETHROUGH
The DWRITE_UNDERLINE and DWRITE_STRIKETHROUGH structures have both had a new member named measuringMode, of type DWRITE_MEASURING_MODE, added. In both structures, measuringMode is the last member of the structure.
IDWriteFactory
The IDWriteFactory interface has had changes to two of its child methods: CreateDisplayTextLayout and CreateGlyphRunAnalysis.
The method CreateDisplayTextLayout has been renamed CreateGdiCompatibleTextLayout, and its parameter useDisplayNatural has been renamed useGdiNatural. The datatype for the parameter remains BOOL. The two versions of the method are shown below.
The Windows 7 Beta version.
virtual HRESULT CreateDisplayTextLayout(
[in] const WCHAR * string,
UINT32 stringLength,
IDWriteTextFormat * textFormat,
FLOAT layoutWidth,
FLOAT layoutHeight,
FLOAT pixelsPerDip,
[in, optional] const DWRITE_MATRIX * transform,
BOOL useDisplayNatural,
[out] IDWriteTextLayout ** textLayout
) = 0;
The Windows 7 RC version.
virtual HRESULT CreateGdiCompatibleTextLayout(
[in] const WCHAR * string,
UINT32 stringLength,
IDWriteTextFormat * textFormat,
FLOAT layoutWidth,
FLOAT layoutHeight,
FLOAT pixelsPerDip,
[in, optional] const DWRITE_MATRIX * transform,
BOOL useGdiNatural,
[out] IDWriteTextLayout ** textLayout
) = 0;
The method CreateGlyphRunAnalysis has had a parameter, measuringMode, of type DWRITE_RENDERING_MODE, added as the fifth parameter. The two versions of the method are shown below.
The Windows 7 Beta version.
virtual HRESULT CreateGlyphRunAnalysis(
[in] const DWRITE_GLYPH_RUN * glyphRun,
FLOAT pixelsPerDip,
[in, optional] const DWRITE_MATRIX * transform,
DWRITE_RENDERING_MODE renderingMode,
FLOAT baselineOriginX,
FLOAT baselineOriginY,
[out] IDWriteGlyphRunAnalysis ** glyphRunAnalysis
) = 0;
The Windows 7 RC version.
virtual HRESULT CreateGlyphRunAnalysis(
[in] const DWRITE_GLYPH_RUN * glyphRun,
FLOAT pixelsPerDip,
[in, optional] const DWRITE_MATRIX * transform,
DWRITE_RENDERING_MODE renderingMode,
DWRITE_MEASURING_MODE measuringMode,
FLOAT baselineOriginX,
FLOAT baselineOriginY,
[out] IDWriteGlyphRunAnalysis ** glyphRunAnalysis
) = 0;
IDWriteGeometrySink
IDWriteGeometrySink, formerly a typedef of the ID2D1GeometrySink interface, has been changed to a typedef of the ID2D1SimplifiedGeometrySink interface.
Send comments about this topic to Microsoft
Build date: 6/10/2009