<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">OK: this issue has already been
reported @ <a class="moz-txt-link-freetext" href="http://bugzilla.scilab.org/15612">http://bugzilla.scilab.org/15612</a><br>
It was already the same with Scilab 5.<br>
Apparently, font* properties have not been implemented for tables.</div>
<div class="moz-cite-prefix">This would deserve at least to be
documented..</div>
<div class="moz-cite-prefix"><br>
Samuel</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 11/08/2020 à 17:37, Samuel Gougeon a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:e3b6a387-19ec-972a-ecfb-5ac0e90f09f4@free.fr">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p><font face="Arial">Dear all,</font></p>
<p>I am struggling with changing the .fontname property for the
content of a table uicontrol.<br>
The default font is "Tahoma", that is not monospaced. I would
like to set a monospaced font,<br>
like "Monospaced", "Consolas", etc that are available on my
system,<br>
as reported by xlfont("AVAILABLE_FONTS").</p>
<p><tt>xlfont("Consolas") // works well:</tt></p>
<p><tt>--> xlfont</tt><tt><br>
</tt><tt> ans =</tt><tt><br>
</tt><tt> column 1 to 7</tt><tt><br>
</tt><tt> <b>"Monospaced"</b> "ScilabSymbols" "Serif"
"Serif Italic" "Serif Bold" "Serif Bold Italic" "SansSerif"</tt><tt><br>
</tt><tt> column 8 to 11</tt><tt><br>
</tt><tt> "SansSerif Italic" "SansSerif Bold" "SansSerif Bold
Italic" "SansSerif Bold Italic"</tt><tt><br>
</tt><tt><br>
</tt><tt>--> xlfont("Consolas");</tt><tt><br>
</tt><tt>--> xlfont</tt><tt><br>
</tt><tt> ans =</tt><tt><br>
</tt><tt> column 1 to 7</tt><tt><br>
</tt><tt> </tt><tt><b>"Monospaced" </b></tt><tt>
"ScilabSymbols" "Serif" "Serif Italic" "Serif Bold" "Serif
Bold Italic" "SansSerif"</tt><tt><br>
</tt><tt> column 8 to 12</tt><tt><br>
</tt><tt> "SansSerif Italic" "SansSerif Bold" "SansSerif Bold
Italic" "SansSerif Bold Italic" <b>"Consolas"</b></tt><br>
</p>
<p>But the, when i set it to the uicontrol, the rendering does not
change:<br>
</p>
<p>xlfont()<br>
<br>
</p>
<pre style="font-family:Monospaced;font-style:normal;font-size:15.0;"><span style="color:rgb(0,0,0);">table</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(74,85,219);">[</span>
<span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">A</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">B</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">C</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">D</span><span style="color:rgb(188,143,143);">"</span>
<span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">try</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">catch</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">abs</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">evstr</span><span style="color:rgb(188,143,143);">"</span>
<span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">do</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">members</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">while</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">sin</span><span style="color:rgb(188,143,143);">"</span>
<span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">3</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">cos</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">isascii</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">linspace</span><span style="color:rgb(188,143,143);">"</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">tan</span><span style="color:rgb(188,143,143);">"</span>
<span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">f</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">gcf</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span> <span style="color:rgb(0,0,0);">clf</span>
<span style="color:rgb(0,0,0);">as</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">f</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">axes_size</span><span style="color:rgb(0,0,0);">;</span> <span style="color:rgb(100,174,100);font-style:italic;">// [width height]</span>
<span style="color:rgb(0,0,0);">ut</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">uicontrol</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">style</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">table</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">string</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);"> table</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(255,170,0);"></span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">FontName</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">Consolas</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(255,170,0);">..</span>
<span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">position</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">5</span> <span style="color:rgb(0,0,0);">as</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(188,143,143);">100</span> <span style="color:rgb(188,143,143);">300</span> <span style="color:rgb(188,143,143);">100</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span> <span style="color:rgb(100,174,100);font-style:italic;">// =</span><span style="color:rgb(100,174,100);font-style:italic;">></span><span style="color:rgb(100,174,100);font-style:italic;"> @top left corner of figure
</span><pre style="font-family:Monospaced;font-style:normal;font-size:15.0;"><tt>// No change in the display, even after resizing a bit the figure (sometimes required to update the display).
Yet, the property has well been assigned:
--> ut.fontname</tt><tt>
</tt><tt> ans =</tt><tt>
</tt><tt> "Consolas"</tt>
Does anyone experiment the same, or succeed by doing it in another way?
Using "<html><p style=""font-family:Consolas">...</p>" in each cell works,
but is so unhandy while a property is theoretically available to do the job...
Thanks
Samuel
</pre>
<span style="color:rgb(100,174,100);font-style:italic;"></span></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>