ID2D1DeviceContext4::GetColorBitmapGlyphImage method (d2d1_3.h)

Retrieves an image of the color bitmap glyph from the color glyph cache. If the cache does not already contain the requested resource, it will be created. This method may be used to extend the lifetime of a glyph image even after it is evicted from the color glyph cache.

Syntax

HRESULT GetColorBitmapGlyphImage(
                 DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat,
                 D2D1_POINT_2F              glyphOrigin,
  [in]           IDWriteFontFace            *fontFace,
                 FLOAT                      fontEmSize,
                 UINT16                     glyphIndex,
                 BOOL                       isSideways,
  [in, optional] const D2D1_MATRIX_3X2_F    *worldTransform,
                 FLOAT                      dpiX,
                 FLOAT                      dpiY,
  [out]          D2D1_MATRIX_3X2_F          *glyphTransform,
  [out]          ID2D1Image                 **glyphImage
);

Parameters

glyphImageFormat

Type: DWRITE_GLYPH_IMAGE_FORMATS

The format for the glyph image. If there is no image data in the requested format for the requested glyph, this method will return an error.

glyphOrigin

Type: D2D1_POINT_2F

The origin for the glyph.

[in] fontFace

Type: IDWriteFontFace*

Reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.

fontEmSize

Type: FLOAT

The specified font size affects the choice of which bitmap to use from the font. It also affects the output glyphTransform, causing it to properly scale the glyph.

glyphIndex

Type: UINT16

Index of the glyph.

isSideways

Type: BOOL

If true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying isSideways as true and rotating the entire run 90 degrees to the right via a rotate transform.

[in, optional] worldTransform

Type: const D2D1_MATRIX_3X2_F*

The transform to apply to the image. This input transform affects the choice of which bitmap to use from the font. It is also factored into the output glyphTransform.

dpiX

Type: FLOAT

Dots per inch along the x-axis.

dpiY

Type: FLOAT

Dots per inch along the y-axis.

[out] glyphTransform

Type: D2D1_MATRIX_3X2_F*

Output transform, which transforms from the glyph's space to the same output space as the worldTransform. This includes the input glyphOrigin, the glyph's offset from the glyphOrigin, and any other required transformations.

[out] glyphImage

Type: ID2D1Image**

On completion contains the retrieved glyph image.

Return value

Type: HRESULT

This method returns an HRESULT success or error code.

Requirements

Requirement Value
Target Platform Windows
Header d2d1_3.h
DLL D2d1.dll

See also

ID2D1DeviceContext4