[Java] How to display Wingdings




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.

Survey results

I used awt's Font class to check the range that can be displayed in the corresponding font.


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)

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

[Java] How to display Wingdings
[Java] How to use Map
How to lower java version
[Java] How to use Map
How to uninstall Java 8 (Mac)
Java --How to make JTable
How to use java Optional
How to minimize Java images
How to write java comments
[Java] How to use Optional ②
[Java] How to use removeAll ()
[Java] How to use string.format
How to use Java Map
How to set Java constants
How to use Java variables
How to convert Java radix
[Java] How to implement multithreading
[Java] How to use Optional ①
How to initialize Java array
How to study Java Silver SE 8
How to use Java HttpClient (Get)
[rails] How to display db information
Studying Java # 6 (How to write blocks)
[Java] How to update Java on Windows
How to make a Java container
How to disassemble Java class files
How to use Java HttpClient (Post)
How to learn JAVA in 7 days
[Processing × Java] How to use variables
[Java] How to create a folder
How to decompile java class files
[Java] How to use LinkedHashMap class
[JavaFX] [Java8] How to use GridPane
How to write Java variable declaration
How to use class methods [Java]
[Java] How to use List [ArrayList]
How to use classes in Java?
How to name variables in Java
How to pass Oracle Java Silver
How to turn Iterator Dojo (Java)
java Eclipse How to debug javaScript
[Processing × Java] How to use arrays
How to make a Java array
How to use Java lambda expressions
[Java] How to use Math class
How to find Java prime numbers
How to use Java enum type
How to concatenate strings in java
How to check Java installed on Mac
How to make a Java calendar Summary
How to implement Kalman filter in Java
[Java] How to use the File class
[Java] How to use the hasNext function
[Java] How to compare with equals method
[java] Summary of how to handle char
[Java] How to add data to List (add, addAll)
How to use submit method (Java Silver)
[Java] How to use the HashMap class
[Java] How to calculate age using LocalDate
[Easy-to-understand explanation! ] How to use Java instance
[Introduction to Java] How to write a Java program