gdi32: Add support for emulating bold faces of bitmap fonts.
Huw Davies
huw at codeweavers.com
Mon Apr 16 03:37:08 CDT 2012
On Mon, Apr 16, 2012 at 04:37:39PM +0900, Dmitry Timoshkov wrote:
> diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
> index 0a5d3c3..eb3f9b5 100644
> --- a/dlls/gdi32/freetype.c
> +++ b/dlls/gdi32/freetype.c
> @@ -5669,12 +5669,27 @@ static inline BYTE get_max_level( UINT format )
> return 255;
> }
>
> -static const BYTE masks[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
> +static void emulate_bold_glyph(BYTE *buf, int pitch, int height)
> +{
> + int x, y;
> + BYTE *p = buf;
> +
> + for (y = 0; y < height; y++)
> + {
> + for (x = pitch - 1; x >= 0; x--)
> + {
> + p[x] |= p[x] >> 1;
> + if (x > 0) p[x] |= p[x - 1] << 7;
> + }
> + p += pitch;
> + }
> +}
>
Don't we need to add some bytes if glyph_width % 32 == 0 ?
Huw.
More information about the wine-devel
mailing list