[PATCH 3/5 v2] riched20: Call ITextHost_TxGetCharFormat() for setting default charformat.
Huw Davies
huw at codeweavers.com
Wed May 23 04:00:45 CDT 2018
On Wed, May 23, 2018 at 04:55:20PM +0800, Jactry Zeng wrote:
> Huw Davies <huw at codeweavers.com> 于2018年5月23日周三 下午4:36写道:
>
> > > + /* replace some default charformat setting with charformat from host
> */
> > > + hr = ITextHost_TxGetCharFormat(editor->texthost, (const CHARFORMATW
> **)&host_cf);
> > > + if (hr == S_OK)
> > > + {
> > > + if (host_cf->dwMask & CFM_FACE)
> > > + lstrcpyW(cf.szFaceName, host_cf->szFaceName);
> > > + if (host_cf->dwMask & CFM_SIZE)
> > > + cf.yHeight = host_cf->yHeight;
>
> > Does this really only use CFM_FACE and CFM_SIZE? I'd expect a full merge
> of
> > char formats.
>
> No, it had more effect masks. I only picked these two because it is enough
> for
> making real
> applications (QQ and QQMusic etc.) look good. And I assumed more mask will
> be added
> when some other applications need more mask for displaying string correctly.
> Do you think it is necessary to add a full effect mask for now?
We already have code for merging charformats, so you should use that rather
than implement it again.
Huw.
More information about the wine-devel
mailing list