[Scilab-users] How to know which is the system's font?
Samuel Gougeon
sgougeon at free.fr
Thu Oct 31 12:15:51 CET 2019
Hello Chin Luh,
Le 30/10/2019 à 03:17, Chin Luh Tan a écrit :
> 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 !
As far as i have understood (before opening this thread) how the
XConfiguration file works wrt the preferences settings, when "system" is
true, the system font is used as Desktop Font, instead of the given one.
It's the case here, and then the "plain Monospaced 13" is NOT used as
Desktop font.
In the Preferences GUI, it is greyed when "Use system font" is checked:
But i don't know what the "item" stands for in this tag. It could set
the preselected item Console|Scinotes of the "Custom font" section, but,
after checking, it's not the case.
Next tags are used for the Custom font section. If their "desktop"
attribute was set to "true", then for instance the Console font would be
the Desktop one (defined in the previous section) instead of the given
one (then greyed in the GUI).
All these settings are conditionally nested... Not really trivial.
At the end, the system font is still implicit. XConfiguration does not
provides its name, and it does not have to, since this would be only for
information, in read-only mode, that is meaningless in a settings file.
Regards
Samuel
>
> --> 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 !
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191031/998c3972/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcdhofaadhaejifc.png
Type: image/png
Size: 41939 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20191031/998c3972/attachment.png>
More information about the users
mailing list