tremolux66

SciTE font size off by one

13 posts in this topic

#1 ·  Posted

I use a monospace font for editing AutoIt scripts in SciTE (currently, CourierNew 9pt). Regardless of what font size I set in the configuration, when I start SciTE to resume editing the script text is one size smaller than I specified. When I type Ctrl+<numpad-slash> the text changes to the desired size. The same is true of the output pane, and I have to reset the size for both areas every time I start SciTE.

IIRC, I've made few other changes to the configuration (e.g., changed the search highlight color and disabled Tidy), so this behavior seems odd. About SciTE says it's version 3.6.0 (Aug. 4, 2015).

Any idea how to fix this?


When the going gets tough, the tough start coding.

Share this post


Link to post
Share on other sites



#3 ·  Posted

I set the font from Tools > SciTE Config > General 1 tab's monospace font Change button, followed by Save+Apply. In the most recent config change, I set the font to Inconsolata 10. I also changed some of the editor colors and the number of backups (in addition to some previous changes), and save-applied.

When I start SciTE and check the config, the General 1 tab shows the monospace font set to Inconsolata 10, but the script and output text are the wrong size until I reset them (Ctrl+<numpad-slash>).

The %HOMEPATH%\AppData\Local\AutoIt v3\SciTE\SciTEUser.properties file (with personal info redacted):

font.base=font:Arial,size:10,$(font.override)
font.monospace=font:Inconsolata,size:10
backup.files=2
proper.case=1
error.inline=1
highlight.current.word=1
highlight.current.word.by.style=1
highlight.current.word.autoselectword=0
highlight.current.word.wholeword=0
highlight.current.word.matchcase=0
highlight.current.word.minlength=3
use.tabs=1
indent.size=4
indent.size.*.au3=4
tabsize=4
style.au3.32=style.*.32=$(font.base),back:#E7E7E7
caret.line.back=#FFFD99
caret.line.back.alpha=256
selection.fore=#000000
selection.alpha=70
selection.back=#00FF00
style.error.1=fore:#FF0000,back:#FFFF00
style.error.2=fore:#FFFFFF,back:#FF0000
highlight.current.word.colour=#00FF00
indicators.alpha=63
calltips.set.above=0
style.au3.38=fore:#050505,back:#FFFFC8
calltips.color.highlight=#FF0000
visible.policy.strict=1
visible.policy.lines=0
style.au3.34=fore:#0000FF,back:#E7E7E7
style.au3.35=fore:#008000,italics,back:#E7E7E7
style.au3.0=fore:#000000,back:#E7E7E7
style.au3.1=fore:#008000,italics,back:#E7E7E7
style.au3.2=fore:#008000,italics,back:#E7E7E7
style.au3.3=fore:#0000FF,back:#E7E7E7
style.au3.4=fore:#000090,back:#E7E7E7
style.au3.5=fore:#0000FF,back:#E7E7E7
style.au3.6=fore:#808000,back:#E7E7E7
style.au3.7=fore:#FF0000,back:#E7E7E7
style.au3.8=fore:#FF8000,back:#E7E7E7
style.au3.9=fore:#000000,back:#E7E7E7
style.au3.10=fore:#808080,back:#E7E7E7
style.au3.11=fore:#808000,back:#E7E7E7
style.au3.12=fore:#DC143C,back:#E7E7E7
style.au3.13=fore:#FF0000,back:#E7E7E7
style.au3.14=fore:#993399,back:#E7E7E7
style.au3.15=fore:#0080FF,back:#E7E7E7
style.au3.16=fore:#0080FF,back:#E7E7E7
command.name.19.*=
command.name.33.*=
openpath.$(au3)=$(SciteDefaultHome)\..\include;C:\Users\%USERNAME%\%PROJECT%\%PROJECT%-sw\src
command.name.9.$(au3)=
calltip.*.use.escapes=1
command.19.beta=
command.33.beta=
title.full.path=1

 


When the going gets tough, the tough start coding.

Share this post


Link to post
Share on other sites

#5 ·  Posted

Yes, I did. I think the only change I made to SciTEGlobal.properties was to show the Output pane by default and to set its size; I made that change long after the font-size problem appeared.

SciTEGlobal.properties modification fragment:

:
:
#output.horizontal.size=200
#output.vertical.size=60
#output.initial.hide=1
output.horizontal.size=200
output.vertical.size=150
output.initial.hide=0
:
:

 


When the going gets tough, the tough start coding.

Share this post


Link to post
Share on other sites

#6 ·  Posted

I see the same happening, where the font size changes when typing Ctrl+/, but have difficulty to properly determine which font size each is.
Needs some more investigation.

Jos 


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Yes. It looks to me like the initially-displayed font is the next smaller one within the list of available sizes, but that's just based on trying out different typefaces and sizes. My vision isn't sharp enough to say with any real certainty what is being displayed. :) I wish I could select some text and display its properties, but there doesn't seem to be a way to do that.

Edited by tremolux66

When the going gets tough, the tough start coding.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

The Ctrl+ ; Ctrl- ; Ctrl/ are controlling zooming and not really the Font size directly. 
I don't know why yet but it looks like SciTE starts one click below the regular 100% zoom level at startup.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted

Ok... found the issue. The SciTEGlobal contains:

magnification=-1

Which does what I described in the previous post namely setting the zoomlevel one click lower.

Put this in your SciTEUSer.properties and all is fine:

magnification=0

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#10 ·  Posted

The zooming detail went in one eye and out the other. Thanks for the fix! B)


When the going gets tough, the tough start coding.

Share this post


Link to post
Share on other sites

#11 ·  Posted

Somehow I uncommented those 2 lines in the SciTEGlobal.properties in my distribution, but will fix that for the next version. :)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#12 ·  Posted

Great!

When I fixed the setting just now, I didn't notice

output.magnification=-1

but sorted it out quickly. (Had to change the Output pane size anyway.)


When the going gets tough, the tough start coding.

Share this post


Link to post
Share on other sites

#13 ·  Posted

50 minutes ago, Jos said:

Somehow I uncommented those 2 lines in the SciTEGlobal.properties in my distribution, but will fix that for the next version. :)

Jos

 

45 minutes ago, tremolux66 said:

Great!

When I fixed the setting just now, I didn't notice

output.magnification=-1

but sorted it out quickly. (Had to change the Output pane size anyway.)

 

Life does not like the vacuum. There will always be something to improve.

Thanks for your findings.

 


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • user4157124
      By user4157124
      As they're opinion-based to some degree; how are AutoIt's best practices decided and do suggestions get considered?
      Some suggestions :
      For...To...Step...Next -loop variable-naming like $iN ($i1, $i2, etc.) : conforms to recommended naming convention, identifies level (albeit inverted to ExitLoop and ContinueLoop's convention) and enables SciTE selection-highlighting (requires minimum of 3 characters). Minimize logic in global scope, separate data & settings from logic, use of vertical space, project organization (folder structure, resource- and include file management). Example (loop variable-naming, minimizing logic in global scope and separation of settings from logic) :
      #include <Array.au3> Global Enum $RANDOM_RETURNFLOAT, _ $RANDOM_RETURNINTEGER Global Enum $EXITCODE_NONE Global Const $g_sChar0 = '-' Global Const $g_sChar1 = '+' Global Const $g_iAmountX = 10 Global Const $g_iAmountY = $g_iAmountX Main() Func Main() Local $aArray[$g_iAmountY][$g_iAmountX] For $i1 = 0 To $g_iAmountY - 1 For $i2 = 0 To $g_iAmountX - 1 $aArray[$i1][$i2] = Random(0, 1, $RANDOM_RETURNINTEGER) ? $g_sChar1 : $g_sChar0 Next Next _ArrayDisplay($aArray) Exit $EXITCODE_NONE EndFunc Example (project organization) :
      + project_folder + bak [backup files] + bin [distributed binaries and dependencies] + inc [non-standard include files] + res [resource files (icons, file+install files, etc.)] + usr [configuration files, databases, etc.] - script.au3 - script.exe Example (use of vertical space) :
      Func _DigitalRoot($iNum) Local $sNum = '' Local $aNum While $iNum > 9 $sNum = String($iNum) $aNum = StringSplit($sNum, '') $iNum = 0 For $i1 = 1 To $aNum[0] $iNum += Int($aNum[$i1]) Next WEnd Return $iNum EndFunc
    • wimhek
      By wimhek
      LS
      Is it possible to open file(s) in scite in read only mode ?
      If so, How ?
       
      Thnx
       
    • Hoth2001
      By Hoth2001
      I installed AutoIt to my computer 3 days ago...and have invested the last 3 days learning how to use it.
      As learned in the tutorials, whenever opening I new file in Scite editor I'd immediatley save the file
      I left the Scite Editor open for the past 3 consecutive days on my laptop
       
      No problem
       
      Today I closed Autoit for the first time, restarted my computer, and opened up the Scite Editor
      Now whenever I try to save a file I am prevented from doing so because I apparently don't have permission!?  
      And whenever I try to run any of the programs I've created over the past 3 days now I keep getting annoying popup notifications before I run them
       
      Problem
       
      To go around the issue, I copied a program originally saved in the AUtoIt folder to another folder (since I was barred from saving it in it's original AutoIt location)
      NOw when I run the code the mouse coordiantes are all off
      and I still get that pesky notification whenever I try to run a program
       
      Big Problem!!!
      Anyone have any clue why I'm going through this BS?
       
      1. I checked my User settings and YES I am the administrator on this cpu
      2. I tried to de-select the "read only" attribute for the AutoIt folder (everytime after doing this successfully the folder immediately and automatically reverts back to "read only")
       
      Any help would be MOST appreciated. I've attached screen shots of the annoying bus I keep getting
       
       


    • algiuxas
      By algiuxas
      Hello everybody!
      I get these weird errors in SciTE console:
      [0801/210405:ERROR:tcp_socket_win.cc(335)] bind() returned an error: Only one usage of each socket address (protocol/network address/port) is normally permitted. (0x2740) [0801/210405:ERROR:devtools_http_handler.cc(229)] Cannot start http server for devtools. Stop devtools. [0801/210405:ERROR:browser_gpu_channel_host_factory.cc(119)] Failed to launch GPU process. [0801/210405:ERROR:browser_gpu_channel_host_factory.cc(119)] Failed to launch GPU process. My script:
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Misc.au3> #NoTrayIcon $title = "Hello" $txt = "..." ; TODO: Make 4 of them ;~ #Region ### START Koda GUI section ### Form= ;~ $1_GUI = GUICreate($title, 370, 120, -1, -1) ;~ GUISetBkColor(0xFFFFFF) ;~ $1_B1 = GUICtrlCreateButton("B1", 136, 80, 107, 25) ;~ GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") ;~ $1_B2 = GUICtrlCreateButton("B2", 248, 80, 107, 25) ;~ GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") ;~ GUICtrlCreateLabel($txt, 16, 24, 338, 52) ;~ GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") ;~ GUICtrlSetColor(-1, 0x000000) ;~ GUISetState(@SW_SHOW) ;~ #EndRegion ### END Koda GUI section ### #Region ### START Koda GUI section ### Form= $2_GUI = GUICreate($title, 370, 0?"Hi :)":120, -1, -1) GUISetBkColor(0xFFFFFF) $2_B1 = GUICtrlCreateButton("B1", 136, 80, 107, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $2_B2 = GUICtrlCreateButton(0?":D":"B2", 248, 80, 107, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlCreateLabel($txt, 16, 24, 338, 52) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $u32dll = DllOpen("user32.dll") ;~ Opt("GUIOnEventMode", 1) ;~ GUICtrlSetOnEvent(-3, "_Exit") ; TODO: Fix, doesn't work with 2 GUI at the same time ;~ GUICtrlSetOnEvent($B11, "_Exit") ;~ GUICtrlSetOnEvent($B21, "_Exit") ;~ GUICtrlSetOnEvent($B12, "_Exit") ;~ GUICtrlSetOnEvent($B22, "_Exit") ;~ $pos1 = WinGetPos($GUI1) ;~ $pos2 = WinGetPos($GUI1) While 1 ;~ $pos1 = WinGetPos($GUI1) ;~ $pos2 = WinGetPos($GUI1) ;~ $x = $pos1[0] - 370 ;~ $y = $pos1[1] ;~ WinMove($GUI2, "", $x, $y, $pos1[2], $pos1[3], 1) ; Press middle mouse button to close (it's gonna be a non malicious prank for my friend) If _IsPressed(4, $u32dll) Then Exit $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _Exit() ;~ Case $1_B1 ;~ _Exit() ;~ Case $1_B2 ;~ _Exit() Case $2_B1 _Exit() Case $2_B2 _Exit() EndSwitch WEnd Func _Exit() ; TODO: ... ;~ GUIDelete($1_GUI) GUIDelete($2_GUI) Exit EndFunc ;==>_Exit How to get rid of these errors?
    • Nareshm
      By Nareshm
      I create message box but i dont know how to add button action when i click it.

      Help for : Add script for Button : Left, Right, Right Finger
      example when i press Left finger button do Case $idNotepad
                      $iPID = WinActivate ( " :PS :: Version - 2.8.0.0  - [eFS Bill]")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:btnReset]", "{esc}")
                              ControlClick ( " :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]")
                              ControlSend(" :DS  - eF:: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "^v")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "{enter}")
      How to add like above ?
                    
                                                                sorry for my bad english