[PATCH 2/2] dwrite: Store text format properties

Dmitry Timoshkov dmitry at baikal.ru
Mon Apr 7 01:39:34 CDT 2014


Nikolay Sivov <bunglehead at gmail.com> wrote:

> >> +static HRESULT WINAPI dwritetextformat_SetLineSpacing(IDWriteTextFormat *iface, DWRITE_LINE_SPACING_METHOD method,
> >> +    FLOAT spacing, FLOAT baseline)
> >>   {
> >>       struct dwrite_textformat *This = impl_from_IDWriteTextFormat(iface);
> >> -    FIXME("(%p)->(%d %f %f): stub\n", This, spacing, line_spacing, baseline);
> >> -    return E_NOTIMPL;
> >> +    TRACE("(%p)->(%d %f %f)\n", This, method, spacing, baseline);
> >> +    This->format.spacingmethod = method;
> >> +    This->format.spacing = spacing;
> >> +    This->format.baseline = baseline;
> >> +    return S_OK;
> >>   }
> > Probably all the format properties setters should handle invalid enum or
> > negative floating point arguments some way.
> >
> It's too early to care about that at this point.

I'm afraid that it will be too late when some application sets invalid value
and that would lead to weird rendering results for unknown reason.

-- 
Dmitry.



More information about the wine-devel mailing list