[PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.

Daniel Lehman




0002-gdi32-List-fonts-copied-to-C-Windows-Fonts-in-registry.txt (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.

Huw Davies
On Mon, Mar 12, 2018 at 11:24:50PM +0000, Daniel Lehman wrote:

> From 08ea107ac1e709b091bbd1f7e22449944aef85db Mon Sep 17 00:00:00 2001
> From: Daniel Lehman <[hidden email]>
> Date: Thu, 8 Mar 2018 11:53:17 -0800
> Subject: [PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.
>
> Signed-off-by: Daniel Lehman <[hidden email]>
> ---
>  dlls/gdi32/freetype.c   | 51 ++++++++++++++++++++++++++-----------------------
>  dlls/gdi32/tests/font.c |  2 +-
>  2 files changed, 28 insertions(+), 25 deletions(-)
>
> diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
> index 1293e08..dfe9a23 100644
> --- a/dlls/gdi32/freetype.c
> +++ b/dlls/gdi32/freetype.c
> @@ -282,11 +282,10 @@ typedef struct tagFace {
>      struct enum_data *cached_enum_data;
>  } Face;
>  
> -#define ADDFONT_EXTERNAL_FONT 0x01
> -#define ADDFONT_ALLOW_BITMAP  0x02
> -#define ADDFONT_ADD_TO_CACHE  0x04
> -#define ADDFONT_ADD_RESOURCE  0x08  /* added through AddFontResource */
> -#define ADDFONT_VERTICAL_FONT 0x10
> +#define ADDFONT_ALLOW_BITMAP  0x01
> +#define ADDFONT_ADD_TO_CACHE  0x02
> +#define ADDFONT_ADD_RESOURCE  0x04  /* added through AddFontResource */
> +#define ADDFONT_VERTICAL_FONT 0x08
>  #define ADDFONT_AA_FLAGS(flags) ((flags) << 16)

Removing support for external fonts doesn't look right.
Fonts marked as external are the host's system fonts
that shouldn't remain in the registry in case they are
removed from the system.  This contrasts with fonts
that have been programatically added to the registry
by Windows apps.

Huw.


Reply | Threaded
Open this post in threaded view
|

RE: [PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.

Daniel Lehman

> Removing support for external fonts doesn't look right.
> Fonts marked as external are the host's system fonts that shouldn't remain in the registry in case they are removed from the system.  This contrasts with fonts that have been programatically added to the registry by Windows apps.

Our software and Wine's dwrite list fonts from that key.  Currently, the only fonts I see listed are the host's system fonts

Is there another way it could be done?

Thanks
daniel



Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.

Huw Davies
On Tue, Mar 13, 2018 at 02:58:33PM +0000, Daniel Lehman wrote:
>
> > Removing support for external fonts doesn't look right.
> > Fonts marked as external are the host's system fonts that shouldn't remain in the registry in case they are removed from the system.  This contrasts with fonts that have been programatically added to the registry by Windows apps.
>
> Our software and Wine's dwrite list fonts from that key.  Currently, the only fonts I see listed are the host's system fonts
>
> Is there another way it could be done?

Which fonts are missing?  These should probably be added to
the registry as part of their installation process.

Huw.


Reply | Threaded
Open this post in threaded view
|

RE: [PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.

Daniel Lehman
> Which fonts are missing?  These should probably be added to the registry as part of their installation process.

fonts that exist in \windows\fonts before boot

i'll admit it's a bit of an odd case, but my windows 2012 r2 will install and record in the registry any new fonts added to \windows\fonts

the idea with my patch is that if new fonts are copied to Wine's fonts folder, it'll pick them up on the next wineboot and list them in registry

I realized my subject is misleading.  i don't expect fonts i copy while Wine (or Windows) is running to be installed and show up in the registry (although copying using explorer on my windows box does install them)

thanks
daniel


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.

Nikolay Sivov
On 3/14/2018 7:12 PM, Daniel Lehman wrote:
>> Which fonts are missing?  These should probably be added to the registry as part of their installation process.
>
> fonts that exist in \windows\fonts before boot
>
> i'll admit it's a bit of an odd case, but my windows 2012 r2 will install and record in the registry any new fonts added to \windows\fonts

I don't know if version/server kind matters, but I don't see this on
Windows 10. I added new font file, and it wasn't registered after
reboot, or shutdown/restart.


Reply | Threaded
Open this post in threaded view
|

RE: [PATCH 2/2] gdi32: List fonts copied to C:\Windows\Fonts in registry.

Daniel Lehman
> I don't know if version/server kind matters, but I don't see this on Windows 10. I added new font file, and it wasn't registered after reboot, or shutdown/restart.

argh...

I tried it on fresh Windows 7/8.1/10 Enterprise VMs and couldn't see it.  so I just retried on my windows 2012 r2 and can't see it now either.  not sure why I was able to reproduce it several times the other day

Ignore patch then

Thanks
daniel