====== fonts.js ====== The Fonts JavaScript library ([[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/exec/load/fonts.js|fonts.js]]) parses the ''[[dir:ctrl]]/[[config:fonts.ini]]'' file and loads and/or activates one or more fonts into the user's terminal (e.g. [[http://syncterm.net|SyncTERM]]) applicable to the specified font names or sections, passed as arguments. Example: load("fonts.js", "default"); The ''[[dir:exec]]/loadfonts.js'' script will execute ''fonts.js'' and have it load the specified fonts from the relevant ''preload'' and ''default'' sections, if present in the ''fonts.ini'' file. The purpose of the ''loadfonts.js'' script is to load and possibly activate these fonts before displaying any answer/login files, if desired, by using adding ''@EXEC:LOADFONTS@'' to one of the early display files (e.g. ''[[dir:text]]/answer.msg'') so the fonts may be used in that file or any other files displayed before user logon. The stock [[module:logon]] module also invokes the ''fonts.js'' library, loading the same ''preload'' and ''default'' font sets (if not already loaded) during the logon process. The [[module:xtrn_sec]] module uses ''fonts.js'' to load custom per-door fonts, if so-configured and applicable to the user's terminal, and then revert back to the ''default'' fonts upon returning from such doors. ===== See Also ===== * [[:custom:javascript:lib:|JavaScript Libraries]] * [[:module:Logon]] module * [[:module:xtrn_sec|External Program Section module]] * [[:config:fonts.ini]] {{tag>javascript fonts}}