Entering extended characters with the text tool

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Entering extended characters with the text tool

Julian Cooper
Dear All,

I am trying to enter the degree symbol ° after some text (usually a number)
using the text tool on an image. On Windows, in most applications, I would
use Alt+0176 (from the numeric keypad) to insert this character, but this
doesn't work on ImageJ on Windows (the text 0176 appears instead of the
symbol). The same goes for other characters like — (em-dash, Alt+0151). This
is the same on every version of Windows I can get my hands on.

I can get round this with simple macros, but this seems a bit clunky:

macro "Degrees" {
        getCursorLoc(x, y, z, flags);
        txt = getString("Enter text before degree symbol", 0);
        makeText(txt + fromCharCode(176), x, y);
}

macro "Extended" {
        getCursorLoc(x, y, z, flags);
        code = getNumber("Enter character code", 151);
        txt = getString("Enter text before symbol", 0);
        makeText(txt + fromCharCode(code), x, y);
}

Does anyone have a method for entering such extended characters more
directly with the text tool?

Many thanks,

Julian