Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP: Changing character set/encoding

Status
Not open for further replies.

Petri

Programmer
Jul 31, 2000
6
SE
<br>How do I easily change the character set/encoding<br>to gain the scandinavian characters for my PS-document.<br><br>I've tried to find out how to do this, but failed.<br><br>Please help me somebody.<br><br>Thank you in advance,<br>/Petri
 
Again, I know this is a very old post, but wanted to provide the answer for anyone browsing around for a solution.

Fonts are readonly, and contain readonly dictionaries. So you have to copy them into your own dictionary to make modifications. That said, changing the encoding is simple if you want to use one of the built-in encoding vectors, such as ISOLatin1.

The code:

/NewFontName
<< %start a new dict
/Encoding ISOLatin1Encoding % change encoding vector
/OldFontName findfont {} forall % copy old font
>> definefont pop

Now when you want to use the reencoded font, just use /NewFontName like you would any other font.

tgreer@choicesolutions.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top