Hello Scite-interest,

My request.
The Disadvantage of SciTE is that it is unable to change the size of
the font for printer simultaneously with change the screen font.
I use lua script:
 -----------------------------------------
  command.name.7.*=Magnify text size
  command.7.*=Zoom 1
  command.mode.7.*=subsystem:lua,savebefore:no
  command.shortcut.7.*=Ctrl+KeypadPlus

  command.name.8.*=Reduce text size
  command.8.*=Zoom -1
  command.mode.8.*=subsystem:lua,savebefore:no
  command.shortcut.8.*=Ctrl+KeypadMinus

  command.name.9.*=Restore text size to normal
  command.9.*=Zoom 0
  command.mode.9.*=subsystem:lua,savebefore:no
  command.shortcut.9.*=Ctrl+KeypadDivide
-----------------------------------------
function Zoom (i)
    if i == '1' then
        editor:ZoomIn()
    end
    if i == '-1' then
        editor:ZoomOut()
    end
    if i == '0' then
        editor.Zoom = 0
    end
    local zoom = editor.Zoom
    local font_base = props['font.base']
    local font_size = string.sub(font_base,string.find(font_base,'size:',1)+5)
    props["print.magnification"] = zoom
    props["font.current.size"] = font_size + zoom  -- Used in statusbar
--~     print ("Font Size: "..font_size + zoom.."px")
    editor:VCHome()  -- Used for statusbar update
end
-----------------------------------------
Good decision is to add this possibility in code SciTE to don't use lua

Remark:
There are no "Divide" and other gray keys in SciTE documentation.
Shortcut "Ctrl+KeypadDivide" isn't seen in menu Tools.
Use "command.shortcut.[1...8].*=Ctrl+KeypadDivide" to see this shortcut.
Is it SciTE Bug?

-- 
mozers
<http://scite.ruteam.ru>


_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to