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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to print copyright character 2

Status
Not open for further replies.

Hemo

Programmer
Apr 9, 2003
190
US
ARgh.

How can I get the copyright or trademark font characters to print?

Do I need a special font? I have a string of text and I'd like to print the little R in the circle (registered trade mark) right after this text.
 
Hemo,

You have choices! The glyph (PostScript drawing of the character) is in the font, it just isn't encoded.

So, you can

1) use glyphshow with the glyph name:

/copyright glyphshow

2) re-encode the font, which isn't as tough as it sounds. Switch the encoding to ISOLatin1, and you'll gain the copyright symbol and accented characters.

Code:
/HelveticaLatin
  << /Helvetica findfont {} forall >>
  begin
    /Encoding ISOLatin1Encoding 256 array copy def currentdict
  end
definefont pop

/HelveticaLatin 48 selectfont

Then you can build your strings the standard way. The ASCII code for the copyright sybmol is now matches the font encoding (and HTML). So if you can get the &quot;©&quot; sybmol directly in your string, it'll work.

Otherwise, you have to use the octal encoding:

(\251 Thomas D. Greer)

That's all there is to it! All the accented characters will work the same way. Page E.7 in the PostScript Reference, 3rd edition, shows you all the encoded characters and their octals in the ISOLatin1 encoding vector.



Thomas D. Greer
 
P.S. The name of the register mark is &quot;registered&quot;, so

/registered glyphshow

will work just fine. Octal code is \256.



Thomas D. Greer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top