enumerating and using fonts installed by AddFontResourceEx

G

Guest

1. I've installed a bunch of fonts in main application, which is in native
C++ code using AddFontResourceEx
2. A C# application is launched from this main application, but failed to
enumerate those installed fonts.

My issue is that I don't want those fonts to be used outside of the main
application so that I've set the font characteristics as FR_PRIVATE. However,
I want the C# application be able to use those fonts. Although the C# app is
from Main application, probably it is in another process so that it is not
able to enumerate the fonts.

My question is may I view and use those fonts in C# application? And how?

Thanks in advance,
 
N

Nicholas Paldino [.NET/C# MVP]

Gary,

You can't do this. The documentation specifically states that fonts
added using the FR_PRIVATE flag are only accessible by the process that made
the call.
 
G

Guest

Yes. I think it is impossible for one process to get private fonts from
another process. However, this C# app is actually in side the Main process.
It is an addin to that application.

Is there a way to check the private fonts?

Nicholas Paldino said:
Gary,

You can't do this. The documentation specifically states that fonts
added using the FR_PRIVATE flag are only accessible by the process that made
the call.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Gary said:
1. I've installed a bunch of fonts in main application, which is in native
C++ code using AddFontResourceEx
2. A C# application is launched from this main application, but failed to
enumerate those installed fonts.

My issue is that I don't want those fonts to be used outside of the main
application so that I've set the font characteristics as FR_PRIVATE.
However,
I want the C# application be able to use those fonts. Although the C# app
is
from Main application, probably it is in another process so that it is not
able to enumerate the fonts.

My question is may I view and use those fonts in C# application? And how?

Thanks in advance,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top