Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 749
  • Last Modified:

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.
0
ctrembla
Asked:
ctrembla
  • 5
  • 3
  • 2
  • +3
1 Solution
 
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
 
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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
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
 
PIGCommented:
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:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 5
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now