[PATCH 1/5] usp10: Set fZeroWidth when replacing control characters with blanks.
Aric Stewart
aric at codeweavers.com
Mon Jun 13 10:42:57 CDT 2016
Signed-off-by: Aric Stewart <aric at codeweavers.com>
On 6/9/16 5:44 PM, Henri Verbeet wrote:
> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
> ---
> dlls/usp10/tests/usp10.c | 2 ++
> dlls/usp10/usp10.c | 3 +++
> 2 files changed, 5 insertions(+)
>
> diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
> index 0a0ac2d..0e1bd07 100644
> --- a/dlls/usp10/tests/usp10.c
> +++ b/dlls/usp10/tests/usp10.c
> @@ -1727,6 +1727,8 @@ static void test_ScriptShape(HDC hdc)
> ok(glyphs[0] == glyphs2[0] ||
> broken(glyphs2[0] == blanks[j] && (blanks[j] < 0x10)),
> "%s: [%02x] expected %04x, got %04x\n", lf.lfFaceName, blanks[j], glyphs[0], glyphs2[0]);
> + ok(attrs[0].fZeroWidth || broken(!attrs[0].fZeroWidth && (blanks[j] < 0x10) /* Vista */),
> + "%s: [%02x] got unexpected fZeroWidth %#x.\n", lf.lfFaceName, blanks[j], attrs[0].fZeroWidth);
> }
> if (oldfont)
> DeleteObject(SelectObject(hdc, oldfont));
> diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
> index 74250ea..52f93ab 100644
> --- a/dlls/usp10/usp10.c
> +++ b/dlls/usp10/usp10.c
> @@ -3186,7 +3186,10 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
> {
> if (pwcChars[idx] == 0x0009 || pwcChars[idx] == 0x000A ||
> pwcChars[idx] == 0x000D || pwcChars[idx] >= 0x001C)
> + {
> pwOutGlyphs[i] = ((ScriptCache *)*psc)->sfp.wgBlank;
> + pOutGlyphProps[i].sva.fZeroWidth = 1;
> + }
> }
> }
> }
>
More information about the wine-patches
mailing list