[Scilab-users] How to know which is the system's font?

Chin Luh Tan chinluh.tan at bytecode-asia.com
Wed Oct 30 03:17:07 CET 2019


Hi Samuel, 



I am not sure whether the information from the preference tab are the one you need, if so, perhaps it could be retrieved by:



--> my_font = xmlGetValues("//fonts/body/fonts", ["font-face", "font-name", "font-size", "item", "latex", "system"]) 

my_font  =



!plain  Monospaced  13  Console  15  true  !





--> my_font = xmlGetValues("//fonts/body/fonts/item", ["desktop", "font-face", "font-name", "font-size", "name"])

my_font  =



!false  bold  Monospaced  16  Console   !

!                                       !

!false  bold  Monospaced  16  Scinotes  !





---- On Wed, 30 Oct 2019 03:44:21 +0800 Samuel Gougeon <sgougeon at free.fr> wrote ----


Le 29/10/2019 à 18:16, Samuel Gougeon a écrit :
> Le 29/10/2019 à 02:22, ol.bond a écrit :
>> Dear Samuel,
>>
>> You may try to use buil in interpreter of Tcl/Tk.
>>
>> Try the following instruction: TCL_EvalStr("set s [font actual 
>> systemfont]")
>
> --> TCL_EvalStr("set s [font actual systemfont]")
>  ans  =
>  -family Arial -size 10 -weight normal -slant roman -underline 0 
> -overstrike 0


After some tests, this answer does not look (always) reliable.
In NW and NWNI mode on Windows, it is possible to change at any time the 
font used in the cmd.exe terminal homing the scilab session. This 
immediately changes the rendering in the Scilab console.
But this does not change the TCL_EvalStr() answer, that is always 
"Arial" on my system, even when actually setting "Consolas" or "Lucida 
console" as the actual font.

In Scilab STD mode, i don't know how to check if Arial is actually the 
system's font.

Samuel

_______________________________________________
users mailing list
mailto:users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191030/636ebc00/attachment.htm>


More information about the users mailing list