To use material design icons I did the following:
1.Downloaded ttf font from https://materialdesignicons.com/
2.in my css file I added:
@font-face {
src: url('fonts/materialdesignicons-webfont.ttf');
}
.icon {
-fx-font-size: 15px;
-fx-font-family: 'Material Design Icons';
}
3.Here https://pictogrammers.github.io/@mdi/font/6.5.95/ I copied the first icon ( mdi-account-lock-open with codepoint F1960) and pasted this icon in my Java code:
4.After that I added icon class to button and everything is ok - I have a button with an icon.
The only problem is that in my java code I can't see what icon I use - I have everywhere empty rectangles. If it is possible, I would like to add icon using codepoints, for this example codepoint F1960. I tried
private final Button button = new Button("\uF1960");
but it didn't work. Could anyone say how to do it?
