Symbols such as ← should also be displayed.
Signed-off-by: Haoyang Chen chenhaoyang@uniontech.com --- dlls/gdiplus/graphics.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index df4a89e8294..4a428c49869 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5229,9 +5229,6 @@ GpStatus gdip_format_string(HDC hdc, hotkeyprefix_count = 0;
for(i = 0, j = 0; i < length; i++){ - /* FIXME: This makes the indexes passed to callback inaccurate. */ - if(!iswprint(string[i]) && (string[i] != '\n')) - continue;
/* FIXME: tabs should be handled using tabstops from stringformat */ if (string[i] == '\t')
I'm surprised that iswprint returns false for ←, maybe it's not the right way to check for nonprintable characters?
在 2021/5/12 下午11:59, Esme Povirk (they/them) 写道:
I'm surprised that iswprint returns false for ←, maybe it's not the right way to check for nonprintable characters?
Hi,
I don't think it should be checked. On windows 7, when the GdipDrawString() function encounters
a "special character" that cannot be displayed, it will be a blank and will not skip it. On wine, if this
happens, if you don't skip it, at worst it will show a default character.
Thanks
On 5/13/21 5:47 AM, Haoyang Chen wrote:
在 2021/5/12 下午11:59, Esme Povirk (they/them) 写道:
I'm surprised that iswprint returns false for ←, maybe it's not the right way to check for nonprintable characters?
Hi,
I don't think it should be checked. On windows 7, when the GdipDrawString() function encounters
a "special character" that cannot be displayed, it will be a blank and will not skip it. On wine, if this
happens, if you don't skip it, at worst it will show a default character.
Thanks
What we have now already looks strange, regarding line breaks, or trailing spaces checks, or using GetTextExtentExPointW() on text parts within rendered paragraph. It should not be checking arbitrary characters at that level, control characters are supposed to get forced zero advances, or have them zeroed by the font. Ideally all that should go through proper line breaking and shaping steps, maybe with some preprocessing for key prefixes.
Alright, let's try it and if something breaks we can add a more specific fix.
Signed-off-by: Esme Povirk esme@codeweavers.com