jpayne@68: jpayne@68: jpayne@68:
jpayne@68: jpayne@68:jpayne@68: Top jpayne@68: | jpayne@68:![]() |
jpayne@68: ![]() |
jpayne@68: ![]() |
jpayne@68: ![]() |
jpayne@68:
jpayne@68: Win32 Fontsjpayne@68:Win32 Fonts — Font support for Microsoft Windows jpayne@68: |
jpayne@68: jpayne@68: |
jpayne@68: cairo_font_face_t * jpayne@68: | jpayne@68:jpayne@68: cairo_win32_font_face_create_for_logfontw () jpayne@68: | jpayne@68:
jpayne@68: cairo_font_face_t * jpayne@68: | jpayne@68:jpayne@68: cairo_win32_font_face_create_for_hfont () jpayne@68: | jpayne@68:
jpayne@68: cairo_font_face_t * jpayne@68: | jpayne@68:jpayne@68: cairo_win32_font_face_create_for_logfontw_hfont () jpayne@68: | jpayne@68:
jpayne@68: cairo_status_t jpayne@68: | jpayne@68:jpayne@68: cairo_win32_scaled_font_select_font () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_win32_scaled_font_done_font () jpayne@68: | jpayne@68:
jpayne@68: double jpayne@68: | jpayne@68:jpayne@68: cairo_win32_scaled_font_get_metrics_factor () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_win32_scaled_font_get_logical_to_device () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_win32_scaled_font_get_device_to_logical () jpayne@68: | jpayne@68:
#define | jpayne@68:CAIRO_HAS_WIN32_FONT | jpayne@68:
The Microsoft Windows font backend is primarily used to render text on jpayne@68: Microsoft Windows systems.
jpayne@68:cairo_font_face_t *
jpayne@68: cairo_win32_font_face_create_for_logfontw
jpayne@68: (LOGFONTW *logfont
);
jpayne@68: Creates a new font for the Win32 font backend based on a
jpayne@68: LOGFONT. This font can then be used with
jpayne@68: cairo_set_font_face()
or cairo_scaled_font_create()
.
jpayne@68: The cairo_scaled_font_t
jpayne@68: returned from cairo_scaled_font_create()
is also for the Win32 backend
jpayne@68: and can be used with functions such as cairo_win32_scaled_font_select_font()
.
logfont |
jpayne@68: A LOGFONTW structure specifying the font to use. jpayne@68: The lfHeight, lfWidth, lfOrientation and lfEscapement jpayne@68: fields of this structure are ignored. |
jpayne@68: jpayne@68: |
a newly created cairo_font_face_t. Free with
jpayne@68: cairo_font_face_destroy()
when you are done using it.
Since: 1.0
jpayne@68:cairo_font_face_t *
jpayne@68: cairo_win32_font_face_create_for_hfont
jpayne@68: (HFONT font
);
jpayne@68: Creates a new font for the Win32 font backend based on a
jpayne@68: HFONT. This font can then be used with
jpayne@68: cairo_set_font_face()
or cairo_scaled_font_create()
.
jpayne@68: The cairo_scaled_font_t
jpayne@68: returned from cairo_scaled_font_create()
is also for the Win32 backend
jpayne@68: and can be used with functions such as cairo_win32_scaled_font_select_font()
.
font |
jpayne@68: An HFONT structure specifying the font to use. |
jpayne@68: jpayne@68: |
a newly created cairo_font_face_t. Free with
jpayne@68: cairo_font_face_destroy()
when you are done using it.
Since: 1.2
jpayne@68:cairo_font_face_t * jpayne@68: cairo_win32_font_face_create_for_logfontw_hfont jpayne@68: (jpayne@68:LOGFONTW *logfont
, jpayne@68:HFONT font
);
Creates a new font for the Win32 font backend based on a
jpayne@68: LOGFONT. This font can then be used with
jpayne@68: cairo_set_font_face()
or cairo_scaled_font_create()
.
jpayne@68: The cairo_scaled_font_t
jpayne@68: returned from cairo_scaled_font_create()
is also for the Win32 backend
jpayne@68: and can be used with functions such as cairo_win32_scaled_font_select_font()
.
logfont |
jpayne@68: A LOGFONTW structure specifying the font to use.
jpayne@68: If |
jpayne@68: jpayne@68: |
font |
jpayne@68: An HFONT that can be used when the font matrix is a scale by jpayne@68: -lfHeight and the CTM is identity. |
jpayne@68: jpayne@68: |
a newly created cairo_font_face_t. Free with
jpayne@68: cairo_font_face_destroy()
when you are done using it.
Since: 1.6
jpayne@68:cairo_status_t jpayne@68: cairo_win32_scaled_font_select_font (jpayne@68:cairo_scaled_font_t *scaled_font
, jpayne@68:HDC hdc
);
Selects the font into the given device context and changes the
jpayne@68: map mode and world transformation of the device context to match
jpayne@68: that of the font. This function is intended for use when using
jpayne@68: layout APIs such as Uniscribe to do text layout with the
jpayne@68: cairo font. After finishing using the device context, you must call
jpayne@68: cairo_win32_scaled_font_done_font()
to release any resources allocated
jpayne@68: by this function.
See cairo_win32_scaled_font_get_metrics_factor()
for converting logical
jpayne@68: coordinates from the device context to font space.
Normally, calls to SaveDC()
and RestoreDC()
would be made around
jpayne@68: the use of this function to preserve the original graphics state.
scaled_font |
jpayne@68: A cairo_scaled_font_t from the Win32 font backend. Such an
jpayne@68: object can be created with |
jpayne@68: jpayne@68: |
hdc |
jpayne@68: a device context |
jpayne@68: jpayne@68: |
CAIRO_STATUS_SUCCESS
if the operation succeeded.
jpayne@68: otherwise an error such as CAIRO_STATUS_NO_MEMORY
and
jpayne@68: the device context is unchanged.
Since: 1.0
jpayne@68:void
jpayne@68: cairo_win32_scaled_font_done_font (cairo_scaled_font_t *scaled_font
);
jpayne@68: Releases any resources allocated by cairo_win32_scaled_font_select_font()
scaled_font |
jpayne@68: A scaled font from the Win32 font backend. |
jpayne@68: jpayne@68: |
Since: 1.0
jpayne@68:double
jpayne@68: cairo_win32_scaled_font_get_metrics_factor
jpayne@68: (cairo_scaled_font_t *scaled_font
);
jpayne@68: Gets a scale factor between logical coordinates in the coordinate
jpayne@68: space used by cairo_win32_scaled_font_select_font()
(that is, the
jpayne@68: coordinate system used by the Windows functions to return metrics) and
jpayne@68: font space coordinates.
scaled_font |
jpayne@68: a scaled font from the Win32 font backend |
jpayne@68: jpayne@68: |
factor to multiply logical units by to get font space jpayne@68: coordinates.
jpayne@68:Since: 1.0
jpayne@68:void jpayne@68: cairo_win32_scaled_font_get_logical_to_device jpayne@68: (jpayne@68:cairo_scaled_font_t *scaled_font
, jpayne@68:cairo_matrix_t *logical_to_device
);
Gets the transformation mapping the logical space used by scaled_font
jpayne@68:
jpayne@68: to device space.
scaled_font |
jpayne@68: a scaled font from the Win32 font backend |
jpayne@68: jpayne@68: |
logical_to_device |
jpayne@68: matrix to return |
jpayne@68: jpayne@68: |
Since: 1.4
jpayne@68:void jpayne@68: cairo_win32_scaled_font_get_device_to_logical jpayne@68: (jpayne@68:cairo_scaled_font_t *scaled_font
, jpayne@68:cairo_matrix_t *device_to_logical
);
Gets the transformation mapping device space to the logical space
jpayne@68: used by scaled_font
jpayne@68: .
scaled_font |
jpayne@68: a scaled font from the Win32 font backend |
jpayne@68: jpayne@68: |
device_to_logical |
jpayne@68: matrix to return |
jpayne@68: jpayne@68: |
Since: 1.4
jpayne@68: