tufanv Expert Licensed User Longtime User Jan 10, 2018 #1 Hello , is it possible to assign a custom font to a textfield ? I load the font with: fx.LoadFont(File.DirAssets,"TitilliumWeb-SemiBold.ttf",14) When I list the font family names it is "Titillium Web" and it works with labels. but when i try : CSSUtils.SetStyleProperty(txtlive,"-fx-font-family","Titillium Web") It does not work. What is my mistake? TY
Hello , is it possible to assign a custom font to a textfield ? I load the font with: fx.LoadFont(File.DirAssets,"TitilliumWeb-SemiBold.ttf",14) When I list the font family names it is "Titillium Web" and it works with labels. but when i try : CSSUtils.SetStyleProperty(txtlive,"-fx-font-family","Titillium Web") It does not work. What is my mistake? TY
besoft Active Member Licensed User Longtime User Jan 11, 2018 #2 txtlive.Font = fx.LoadFont(File.DirAssets,"TitilliumWeb-SemiBold.ttf",19) Try this Upvote 0
tufanv Expert Licensed User Longtime User Jan 11, 2018 #3 besoft said: txtlive.Font = fx.LoadFont(File.DirAssets,"TitilliumWeb-SemiBold.ttf",19) Try this Click to expand... There is no .font for textfield Upvote 0
besoft said: txtlive.Font = fx.LoadFont(File.DirAssets,"TitilliumWeb-SemiBold.ttf",19) Try this Click to expand... There is no .font for textfield
I inakigarm Well-Known Member Licensed User Longtime User Jan 12, 2018 #5 This way it displays the text wih the selected font B4X: Dim jo As JavaObject=txtlive jo.runMethod("setFont",Array(fx.LoadFont(File.DirAssets,"TitilliumWeb-SemiBold.ttf",14))) Upvote 0
This way it displays the text wih the selected font B4X: Dim jo As JavaObject=txtlive jo.runMethod("setFont",Array(fx.LoadFont(File.DirAssets,"TitilliumWeb-SemiBold.ttf",14)))