Re: How to display symbolic fonts
"juergen" <ffm1234@gmx.de> wrote in message
news:1156327513.339192.89090@74g2000cwt.googlegroups.com...
Oliver:
Thank your for your two ideas, but I need further help.
Rather than expect the end user to always copy the font to the
appropriate directory and editing their font.dir file, consider using the
createFont() method to dynamically load a font at runtime:
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Font.html#createFont(int,
java.io.File)
I am using the createFont method, but the Symbols are displayed as
little
boxes.
This is an indication, I think, that the font you're using doesn't have
the visual glyphs to represent the characters you're trying to display.
Additionally, rather than using a special font that maps musical
symbols
to other characters, consider using the Unicode characters specifically
designed for this purpose:
Western Musical Symbols: http://www.unicode.org/charts/PDF/U1D100.pdf
Byzantine Musical Symbols: http://www.unicode.org/charts/PDF/U1D000.pdf
Ancient Greek Musical Symbols:
http://www.unicode.org/charts/PDF/U1D200.pdf
Thank you, this seems to be a very valuable approach.
I looked for a font that would support those characters.
When looking at this website:
http://www.alanwood.net/unicode/fontsbyrange.html#u1d100
Byzantine Musical Symbols U+1D000 - U+1D0FF (118784-119039)
Windows: Code2001
Musical Symbols U+1D100 - U+1D1FF (119040-119295)
Windows: Code2001
Ancient Greek Musical Notation U+1D200 - U+1D24F
(119296-119375)
Windows: ALPHABETUM Unicode, Cardo, New Athena Unicode
There is none font listed for linux.
What can I do?
I didn't know there was an issue between Windows fonts vs Linux fonts.
AFAIK, as long as it's in the TTF format, Java can read it.
- Oliver