I'm trying to add a new font to my UI, but get loads of errors like this:
- Code: Select all
WARNING:No font face defined on element #text < div#btn_Q3-HC < div#buttoncell_2C < div#main-button-container:hover < div#main-Hud-container:hover < body#FPS_Hud1:focus:hover < #root#guiEditorContext:hover. Please specify a font-family in your RCSS.
I have this in my rml file:
- Code: Select all
body{
font-family: Alagard;
font-weight: normal;
font-style: normal;
font-size:24px;
color: #69c9e9FF;
}
The font is called Alagard.otf, and it's family is called "Alagard" (checked with dp4 Font Viewer). I have placed the font in both the GUI folder of my Scene, and in the main "Asset Library/GUI/fonts" folder.
Any help would be greatly appreciated.
Regards
Shando
PS: I've also installed it on my laptop.
Sorry, forgot to add that you swap between the GUIs as follows:
- Code: Select all
if ( lang == "arSA" ) then
if ( guiID_AR ~= "X" ) then
guiID_Cur = guiID_AR;
gui.show ( guiID_Cur, guiID_Cur );
else
guiID_AR = gui.load ( "Chat_HUD_AR.rml", 0, 0 );
guiID_Cur = guiID_AR;
end
else
if ( guiID ~= "X" ) then
guiID_Cur = guiID;
gui.show ( guiID_Cur, guiID_Cur );
else
guiID = gui.load ( "Chat_HUD.rml", 0, 0 );
guiID_Cur = guiID;
end
end
The check for "X" is used so that you only create the GUI once, and simply "show" or "hide" each GUI once created. I have also used separate "guiIDs" for each required GUI (guiID = European, guiID_AR = Arabic in this example).
"guiID_Cur" is used to denote the current GUI.