[PATCH v2 8/8] d3dx9: Implement ID3DXFont_DrawText.

Matteo Bruni matteo.mystral at gmail.com
Wed Jan 22 10:14:52 CST 2020


On Mon, Jan 6, 2020 at 3:36 PM Sven Baars <sbaars at codeweavers.com> wrote:

> +/* DrawText helpers copied from user32 */
> +#define TAB     9
> +#define LF     10
> +#define CR     13
> +#define SPACE  32
> +static void TEXT_WordBreak(HDC hdc, WCHAR *str, unsigned int max_str,
> +                           unsigned int *len_str,
> +                           int width, int format, unsigned int chars_fit,
> +                           unsigned int *chars_used, SIZE *size)

As I already mentioned in a private email a while back, I don't think
copying whole chunks of user32 is going to be a good idea.

ID3DXFont's DrawText is supposed to be quite a bit simpler than the
user32 counterpart. I imagine that it should be possible to
reimplement the required features without carrying this much stuff
over. Maybe Uniscribe can help more, I don't know the API (Nikolay?)

Either way, I'd initially introduce a simpler DrawText implementation
(no line breaks, no word breaks, as bare-bones as possible) and then
proceed to add features incrementally over a number of patches. That
will also make the initial DrawText patch easier to review.



More information about the wine-devel mailing list