[PATCH] gdi32: Avoid the registry key is not deleted when face's full name matches but the file path does not match.

Huw Davies huw at codeweavers.com
Mon May 24 05:33:16 CDT 2021


On Fri, May 14, 2021 at 06:54:46PM +0800, Jiangyi Chen wrote:

> From 26e8f0d40f459a250de846bf270d4d1f468f128b Mon Sep 17 00:00:00 2001
> From: Jiangyi Chen <chenjiangyi at uniontech.com>
> Date: Fri, 14 May 2021 18:48:06 +0800
> Subject: [PATCH] gdi32: Avoid the registry key is not deleted when face's full
>  name matches but the file path does not match. For example, the Arial.ttf in
>  the /usr/share/fonts/truetype/msttcorefonts/ is uninstalled,and then the user
>  places the Arial.ttf in the container's windows/Fonts directory,the
>  corresponding registry key Arial
>  (TrueType)=Z:\usr\share\fonts\truetype\msttcorefonts\Arial.ttf has not been
>  deleted.
> 
> Signed-off-by: Jiangyi Chen <chenjiangyi at uniontech.com>
> ---
>  dlls/gdi32/font.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
> index 24e6d82c100..c2b1b3a7c56 100644
> --- a/dlls/gdi32/font.c
> +++ b/dlls/gdi32/font.c
> @@ -7882,9 +7882,9 @@ static void update_external_font_keys(void)
>      {
>          if (type != REG_SZ) goto next;
>          if ((tmp = wcsrchr( value, ' ' )) && !facename_compare( tmp, L" (TrueType)", -1 )) *tmp = 0;
> -        if ((face = find_face_from_full_name( value )))
> +        if ((face = find_face_from_full_name( value )) && !wcsicmp( face->file, path ))
>          {
> -            if (!wcsicmp( face->file, path )) face->flags |= ADDFONT_EXTERNAL_FOUND;
> +            face->flags |= ADDFONT_EXTERNAL_FOUND;
>              goto next;
>          }
>          if (tmp && !*tmp) *tmp = ' ';

Thanks, I've sent in a v2 with a reworded commit msg.

Huw.




More information about the wine-devel mailing list