I was using an old Java app and it didn't display well in Wingdings.
Specifically, various sites stated that !
(0x21) would be a pencil mark, but it was not displayed properly (it was displayed as a square in the app. It is treated as a character that cannot be converted).
I wondered if it was due to an old app (it was a Swing-based app, so it's probably Java7 or earlier), but apparently neither Java8 or Java11 nor JavaFX can display the symbols well.
I used awt's Font class to check the range that can be displayed in the corresponding font.
WingdingsTest.java
import java.awt.Font;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class WingdingsTest {
public static void main(String[] args) {
final Font font = new Font("wingdings", Font.PLAIN, 32);
final String codes = IntStream.range(0, 0x10000)
.filter(font::canDisplay)
.mapToObj(Integer::toHexString)
.collect(Collectors.joining(","));
System.out.println(codes);
}
}
Looking at the results, it seems that U + 0009 (TAB), U + 000a (LF), U + 000d (CR), around U + 20xx, and around U + f0xx can be displayed.
When I actually tried it, the area around U + f021 to U + f0ff was the Wingdings symbol. In other words, if you want to display the 0x21 pencil mark, you can display the U + f021 code point.
This area seems to be the so-called Gaiji area (Private Use Area) of Unicode.
If you look at the explanation of "Gaiji in JIS X 0221 (Unicode)" in "Gaiji" on wikipedia, it says as follows.
Symbol font glyphs such as Wingdings are associated with some of U + F020 to U + F0FF in Unicode
When I tried it, not only Wingdings but also Webdings and Symbol fonts looked similar.
Recommended Posts