Commit a081fe87 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Move text format object implementation to a separate file.

parent 88bc8f94
......@@ -10,6 +10,7 @@ C_SRCS = \
bracket.c \
direction.c \
font.c \
format.c \
freetype.c \
gdiinterop.c \
layout.c \
......
......@@ -353,6 +353,76 @@ extern float fontface_get_scaled_design_advance(struct dwrite_fontface *fontface
float emsize, float ppdip, const DWRITE_MATRIX *transform, UINT16 glyph, BOOL is_sideways) DECLSPEC_HIDDEN;
extern struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface) DECLSPEC_HIDDEN;
struct dwrite_textformat_data
{
WCHAR *family_name;
unsigned int family_len;
WCHAR *locale;
unsigned int locale_len;
DWRITE_FONT_WEIGHT weight;
DWRITE_FONT_STYLE style;
DWRITE_FONT_STRETCH stretch;
DWRITE_PARAGRAPH_ALIGNMENT paralign;
DWRITE_READING_DIRECTION readingdir;
DWRITE_WORD_WRAPPING wrapping;
BOOL last_line_wrapping;
DWRITE_TEXT_ALIGNMENT textalignment;
DWRITE_FLOW_DIRECTION flow;
DWRITE_VERTICAL_GLYPH_ORIENTATION vertical_orientation;
DWRITE_OPTICAL_ALIGNMENT optical_alignment;
DWRITE_LINE_SPACING spacing;
DWRITE_AUTOMATIC_FONT_AXES automatic_axes;
float fontsize;
float tabstop;
DWRITE_TRIMMING trimming;
IDWriteInlineObject *trimmingsign;
IDWriteFontCollection *collection;
IDWriteFontFallback *fallback;
DWRITE_FONT_AXIS_VALUE *axis_values;
unsigned int axis_values_count;
};
struct dwrite_textformat
{
IDWriteTextFormat3 IDWriteTextFormat3_iface;
LONG refcount;
struct dwrite_textformat_data format;
};
struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface) DECLSPEC_HIDDEN;
void release_format_data(struct dwrite_textformat_data *data) DECLSPEC_HIDDEN;
HRESULT format_set_vertical_orientation(struct dwrite_textformat_data *format,
DWRITE_VERTICAL_GLYPH_ORIENTATION orientation, BOOL *changed) DECLSPEC_HIDDEN;
HRESULT format_set_fontfallback(struct dwrite_textformat_data *format, IDWriteFontFallback *fallback) DECLSPEC_HIDDEN;
HRESULT format_get_fontfallback(const struct dwrite_textformat_data *format, IDWriteFontFallback **fallback) DECLSPEC_HIDDEN;
HRESULT format_set_font_axisvalues(struct dwrite_textformat_data *format,
DWRITE_FONT_AXIS_VALUE const *axis_values, unsigned int num_values) DECLSPEC_HIDDEN;
HRESULT format_get_font_axisvalues(struct dwrite_textformat_data *format,
DWRITE_FONT_AXIS_VALUE *axis_values, unsigned int num_values) DECLSPEC_HIDDEN;
HRESULT format_set_optical_alignment(struct dwrite_textformat_data *format,
DWRITE_OPTICAL_ALIGNMENT alignment) DECLSPEC_HIDDEN;
HRESULT format_set_trimming(struct dwrite_textformat_data *format, DWRITE_TRIMMING const *trimming,
IDWriteInlineObject *trimming_sign, BOOL *changed) DECLSPEC_HIDDEN;
HRESULT format_set_flowdirection(struct dwrite_textformat_data *format,
DWRITE_FLOW_DIRECTION direction, BOOL *changed) DECLSPEC_HIDDEN;
HRESULT format_set_readingdirection(struct dwrite_textformat_data *format,
DWRITE_READING_DIRECTION direction, BOOL *changed) DECLSPEC_HIDDEN;
HRESULT format_set_wordwrapping(struct dwrite_textformat_data *format, DWRITE_WORD_WRAPPING wrapping,
BOOL *changed) DECLSPEC_HIDDEN;
HRESULT format_set_paralignment(struct dwrite_textformat_data *format,
DWRITE_PARAGRAPH_ALIGNMENT alignment, BOOL *changed) DECLSPEC_HIDDEN;
HRESULT format_set_textalignment(struct dwrite_textformat_data *format, DWRITE_TEXT_ALIGNMENT alignment,
BOOL *changed) DECLSPEC_HIDDEN;
HRESULT format_set_linespacing(struct dwrite_textformat_data *format,
DWRITE_LINE_SPACING const *spacing, BOOL *changed) DECLSPEC_HIDDEN;
/* Opentype font table functions */
struct dwrite_font_props
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment