Hello Guest it is March 29, 2024, 02:23:38 AM

Author Topic: Why does mc.mcCtrlLoadGcodeString change the font size of the Gcode window to 32  (Read 447 times)

0 Members and 1 Guest are viewing this topic.

Why does mc.mcCtrlLoadGcodeString change the font size of the Gcode display to 32.  It enters the Gcode just fine but it changes the font size to 32 for the g code window.  If I edit it and change it back it changes the font size immediately upon reloading the window.
Hi,
I think the Gcode that results from reading a string is just a series of Ascii characters, they do not have a font size.
It is only when the string is displayed that those characters get fleshed out into screen readable symbols.....and the size of each symbol is a property
of the display Window, not the character string itself.

May I suggest you alter the properties of the Gcode window in Mach to have the font size of your choice.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
I have multiple times.  Every time the lua script writes to the gcode window it changes the font size.
I figured it out.  The font size of the g code window is controlled by the number of lines you have the window set to.  Setting the font size parameter does nothing. If you leave the lines parameter blank it will default to a font size of 32 (for my window size).  The higher the lines count the lower the font size the window will have.
Hi,
kool.

I was going to suggest that after making an edit of the window properties that you shut down Mach and then restart. A shutdown will flush any changes made in the Mach session
to the .ini file.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
I figured it out.  The font size of the g code window is controlled by the number of lines you have the window set to.  Setting the font size parameter does nothing. If you leave the lines parameter blank it will default to a font size of 32 (for my window size).  The higher the lines count the lower the font size the window will have.

Correct.  In the beginning, to make Mach cross platform, we used cross platform fonts that you selected from a dropdown list.  They had no point sizes and the number of lines in the display is what "sized" the fonts.  But people wanted to use Windows provided fonts at the expense of the cross platform ability of the original GUI.  So we added that in and the standard Windows Font dialog was used to select the font.  Everything in the font dialog is used with the exception of the point size on screen elements that used the line sizing before for backwards compatibility.

Steve