tags:

views:

40

answers:

2

How can I display the graphical "enter symbol" within java applet ?

I want to show exactly "↵", which is U+21B5 DOWNWARDS ARROW WITH CORNER LEFTWARDS. –

I want to draw this to applet's screen so that it works in WIN, LINUX, MACOSX, etc.

Is there a font available that makes this possible or should I draw it somehow, how ?

g2d.setFont("SymbolFont??which one");
g2d.drawString(myenterSymbolHere,x,Y);
+2  A: 

CRLF is not a single character. They are CR (carriage return) and LF (line feed) characters that together represent a newline in the Windows world (most other systems use just LF).

They don't have any "official" graphical representation, because they are control characters.

You might be referring to the Pilcrow (¶, U+00B6), which is sometimes used to represent a newline (even though it actually indicates the end of a paragraph). Whether or not this character is available depends entirely on the font, but it is fairly widely available.

Joachim Sauer
is there a website listing all these characters available? with their U+codes
Tom
I am looking after a character that looks like <- enter symbol used in keyboard, there is one e.g. in Windows SYMBOL font #191
Tom
Start here: http://en.wikipedia.org/wiki/Unicode, the page contains a lot of links to tables and overviews
Andreas_D
You might want "↵", which is U+21B5 DOWNWARDS ARROW WITH CORNER LEFTWARDS.
Joachim Sauer
U+21B5 sounds excellent, but how can I draw it to java applet's screen with drawString()
Tom
I get just a box with drawscreen("\u21b5")
Tom
Use `"\u21b5"` as the String literal. You can represent any Unicode anywhere in your source code using the `\u` escapes.
Joachim Sauer
If you get a box, then the font just doesn't support it. Use another font (or another character).
BalusC
any ideas what font will support this 21b5 ? a font that is found from all computers running java, WIN, MAC, LINUX
Tom
@Tom: when you get a box that means that the font you use doesn't provide a glyph for that codepoint. Switch to another font or draw the symbol manually.
Joachim Sauer
@Tom: i don't think there's even a single font that's available on all platforms, let alone one that supports a wide array of unicode glyphs.
Joachim Sauer
OK; I will adjust my question a little
Tom
+1  A: 

Are you looking for something like this,

␍␊

It's part of Unicode control symbols and you can find it here,

http://unicode.org/charts/PDF/U2400.pdf

ZZ Coder