Skip to main content
Participant
May 20, 2022 5:46 PM UTC
Question

Postscript fonts

I am attempting to include a degree symbol data displayed using a courier font.  Is there a way to this to be implemented?

Currently degree displays as shown below.

 

    This topic is closed to new replies. Start a new post to keep the conversation going.

    6 replies

    Legend
    Jun 2, 2022 3:23 PM UTC

    You can't use Unicode code points. Use the Encoding for the font, or re-encode it. This is old school PostScript, from years before Unicode was invented. There is no Unicode in PostScript, it's been frozen 20 years now.

    Translate
    Participant
    Jun 3, 2022 8:46 PM UTC

    How does one Encode or re-encode a font (say Courier) to include a degree symbol?

    Translate
    Brad @ Roaring Mouse
    Community Expert
    Community Expert
    Jun 6, 2022 6:23 PM UTC

    In the Windows world, for example, to type a degree symbol you had to use an ALT code, which is where you would hold down the Alt key and type a number ON THE NUMBER PAD (i.e. not the keys at the top of your keyboard) then release. The Alt-code for a degree symbol was 0176, so you would hold down Alt, type 0176 then release.

    If you did this in a sample file, and export that to Postscript, you could find the code used to actually invoke the degree symbol from your font. e.g. in a Windows PS file, "Sample°" would appears as "Sample\260" (the \260 is the degree symbol). But this varies between systems, fonts and font formats, so you would need some testing.

    Translate
    Brad @ Roaring Mouse
    Community Expert
    Community Expert
    May 23, 2022 2:45 AM UTC

    How are you creating this text?

    The degree symbol can fall in various different charcter locations depending on the font, format and its encoding.

    With Unicode it's easier: you are looking for U +00B0

    Translate
    Participant
    May 23, 2022 2:49 PM UTC

    The degree symbol is copied into an alpha variable.  Maye created in word or updated from a source which contains the degree symbol.

    I am defining the Courier font shown

    /cour { /Courier findfont 10 scalefont setfont } def

    Courier is used because it is a fixed width font.

    How is U +00B0 font implemented in postscript?

    Is it a fixed witdh font?

    Translate