Font name

Hi all,
hi have a problem, i need to retreive the face name of a font when printing under windows
The face name shoul not have any space in it. This face name is used when printing under windows to a postscript driver.  

ex . the face name of  the font Avant Garde is
AvantGarde-Book.  This was found in the postscript file after
the job was printed.

I have tried to play with the GetOutlineTextMetrics(hDC,nByte , psOt) window Function.  The result was that there is nothing comparable to the postscript file name font.  The problem is only accuring with True Type fonts.

Is there a proper way to retreive such information. Need Help .........

I have tried the  ENUMLOGFONTEX, NEWTEXTMETRIC, and nothing
is conclusive.

Can GetFontData() help me, if yes are there some good example.

thanks, later

Charles.
ctremblaAsked:
Who is Participating?
 
PIGConnect With a Mentor Commented:
I You have MSDN Library from July 1999 that have following ariticicle:

"SAMPLE: Adding TrueType, Raster, or Vector Fonts to System"
Article ID: Q130459

It is a sample application that demonstrates how to programmatically add a TrueType, raster, or vector font to the system.  I think that is it. There have simple sample for all operation over fonts in low level programing.

Try it.
0
 
nietodCommented:
Did you check the lfFaceName of the LOGFONT in an ENUMLOGFONT structure?

Why do you need this?
0
 
ctremblaAuthor Commented:
I have tried with LOGFONT, and ENUMLOGFONT,
ENUMLOGFONTEX , and the result are not conclusive.

the only problems are with TrueType fonts.

The reason i need this is that i have an export in my application
that export to Adobe Illustrator. The format is a simple postscript
subset, but when dealing with TrueType fonts i need to
have the Postscript name of that font.

When that file is imported into Adobe Illustrator the font is match
to the equivalent true type font.



0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
nils pipenbrinckCommented:
truetype font aren't directly supported by postscript printers.. therefore the driver either sends the text as outlines or converts them to type1 and downloads them to the ps printer on the fly.

there are a couple of built in fonts in postscript printers... and if you've installed the adobe type manager you can also use the the additional type 1 fonts. these fonts are directly supported by ps printers and look on the printer as they appear on the screen.

all the others will be (as I said) either converted or mapped to the best matching font. the font mapper will choose which font to use.

so.. my guess is, that you simply can't know which ttf font will map to which printerfont when printing to postscript.


 Nils


0
 
ScottyDawgCommented:
have you looked at CDC::GetTextFace(...)
0
 
ctremblaAuthor Commented:
This is  was i was expecting, but was still hoping :))

thanks
0
 
nils pipenbrinckCommented:
ctrembla: that's life :)

btw.. for what do you need to get the facename? (just wondering).

Nils
0
 
ctremblaAuthor Commented:
I have explain it in previous comments :)
0
 
ctremblaAuthor Commented:
I have explain it in previous comments :)
0
 
nils pipenbrinckCommented:
hm.. just an idea..

why don't you install a very uncommon ttf (to make sure it can't be mapped), and export to .ai with a different program... then take a look how the program named the font.

This won't solve your problem, but at least your exporter behaves like the others. :)

Nils
0
 
ctremblaAuthor Commented:
I know,

this was the original plan, i was looking for a "better
solution but ...". Anyway i will create a mapping ascii file when reading the True Type fonts.

do you have an idea of a good mapping solution


 
0
 
nietodCommented:
And what does that have to do with the problem?
0
 
auk_ieCommented:
Hello

I'm also stuck with the same problem i.e I can't get the face name of the font

ex . the face name of  the font Avant Garde is
AvantGarde-Book. As mentioned above.  

however I can't find the above article Q130459 on MSDN, 2 years later have you still got that article you could pass on to me or even a link.
0
All Courses

From novice to tech pro — start learning today.