EnumFontFamilyEx() in c#

  • Thread starter Thread starter a_man
  • Start date Start date
A

a_man

Hello everyone,
Im writing an application which is printing pricelabels.
Im using a label printer which has certain device specific fonts, which
are not available through
installedfontfamily.

I´ve learnt that i must write my own enumfontfamilyex function in c# .
Im not quite sure how to do this. In general win32 programming is not
something i´ve tried before. Can anyone help and guide me through this
problem.

Thank you in advance
Amir
 
Amir,

Have you looked at the PrivateFontCollection class? It will allow you
to use fonts that are not installed on the system.

Hope this helps.

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

Hello everyone,
Im writing an application which is printing pricelabels.
Im using a label printer which has certain device specific fonts, which
are not available through
installedfontfamily.

I´ve learnt that i must write my own enumfontfamilyex function in c# .
Im not quite sure how to do this. In general win32 programming is not
something i´ve tried before. Can anyone help and guide me through this
problem.

Thank you in advance
Amir
 
Hello Nicholas Thank you for your suggestion. I´ve check out the
privatefontfamily class. And it doesnt help me.
I need the fonts available on my label printer. There are no font
files available, so I cant use the PrivateFontFamily class.
The strange things is that when I use the printer object in VB 6.0, I
call its fonts method and obtain all fonts available, both installed
and device specific. Why is this such a trouble in c#. I dont understand
what is going on and its frustrating me.

What i have discovered so far is that I have to write the
EnumFontFamiliesEX() method wich handles some unmanaged code with a
callback,
which youve suggested someone who has the same question. You did this in
2002 :)

Can you please help me.
Thank you for your help
Amir
 
Back
Top