Hello,
I am using vaadin8. I wrote simple custom font. Here is my code.
public enum MyCustomFont implements FontIcon {
HOME;
@Override
public String getMIMEType() {
throw new UnsupportedOperationException(
FontIcon.class.getSimpleName()
+ " should not be used where a MIME type is needed.");
}
@Override
public String getFontFamily() {
return "sans-serif";
}
@Override
public int getCodepoint() {
return 0;
}
@Override
public String getHtml() {
return "<span class=\"v-icon fal fa-home\"></span>";
}
}
Button buttonTest = new Button("test", MyCustomFont.HOME);
When i am usign this font in button, getHtml() method never calls.
Only getFontFamily() method calls from vaadin. So in getHtmlMethod my fal and fa-home classes magically dissappears and replaced with getFontFamily method results. Please help. How can i ensure that MyCustomFont.getHtml() method will call.
Please Help, Thanks.