B4J Question Font Specified in the Layout File is Overridden by CSS

xulihang

Well-Known Member
Licensed User
Longtime User
I want to change the default font with the following CSS and code:

CSS: Copy
.text {
    -fx-font-family: "SimSun";
}

B4X: Copy
MainForm.Stylesheets.Add(File.GetUri(File.DirApp,"font.css"))


But the font specified in the layout file is been overridden.

1730180869486.png


1730180990488.png
->
1730180971561.png



How can I change the default font while keeping the font specified in the layout?
 
So there is not a good way to modify the default font without overriding the font specified in the layout file?
 
Upvote 0
This is a way. It's just that I have to specify the CSS for all the special ones.
 
Last edited:
Upvote 0
Back
Top