Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Font name

Posted on 2000-02-17
13
702 Views
Last Modified: 2013-12-03
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
Comment
Question by:ctrembla
  • 5
  • 3
  • 2
  • +3
13 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2531393
Did you check the lfFaceName of the LOGFONT in an ENUMLOGFONT structure?

Why do you need this?
0
 

Author Comment

by:ctrembla
ID: 2531497
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
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 2531528
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
LVL 1

Expert Comment

by:ScottyDawg
ID: 2531546
have you looked at CDC::GetTextFace(...)
0
 

Author Comment

by:ctrembla
ID: 2531635
This is  was i was expecting, but was still hoping :))

thanks
0
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 2531671
ctrembla: that's life :)

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

Nils
0
 

Author Comment

by:ctrembla
ID: 2531682
I have explain it in previous comments :)
0
 

Author Comment

by:ctrembla
ID: 2531684
I have explain it in previous comments :)
0
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 2531740
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
 

Author Comment

by:ctrembla
ID: 2531786
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
 
LVL 2

Accepted Solution

by:
PIG earned 200 total points
ID: 2532858
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
 
LVL 22

Expert Comment

by:nietod
ID: 2532873
And what does that have to do with the problem?
0
 

Expert Comment

by:auk_ie
ID: 8748327
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question