I was using custom CSS font by doing the following:
@font-face {
font-family: "airborne";
src: url(fonts/Airborne.ttf);
}
:root {
--styled-text: "airborne";
}
PillButtonText{
color: white;
font-size: 10pt;
font-weight: bold;
font-family: var(--styled-text);
}
val bookTableButton = Label("Book a table".toUpperCase())
bookTableButton.uiid = "PillButtonText"
The custom font is displayed but with some caveat.
It renders the default font at first then it changes to the new font after that.
What is the right way to load font before rendering the component so that we do not see this flicker?