Recent

Author Topic: IDE Display changed to 'fixed pitch' ???  (Read 7867 times)

J-G

  • Hero Member
  • *****
  • Posts: 992
IDE Display changed to 'fixed pitch' ???
« on: March 11, 2017, 11:54:06 am »
Had a 'power out' two days ago and, when it returned, my IDE display had changed to 'Courier New' (an awful typeface!)  but when I tried to reset it to anything else it is always fixed pitch.

In desperation I've just tried "Build Lazarus with Profile Normal IDE" but the display is still fixed pitch.

I've searched for a switch for 'Variable Pitch' (which ought to be the default) without success. Can anyone suggest what I'm missing?
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

fred

  • Full Member
  • ***
  • Posts: 208
Re: IDE Display changed to 'fixed pitch' ???
« Reply #1 on: March 11, 2017, 12:22:50 pm »
Does this help? : menu Tools, Options, Editor, Display, Default editor font

J-G

  • Hero Member
  • *****
  • Posts: 992
Re: IDE Display changed to 'fixed pitch' ???
« Reply #2 on: March 11, 2017, 12:28:24 pm »
Does this help? : menu Tools, Options, Editor, Display, Default editor font

Regrettably no  -  that is exactly where I would expect to find the option to select fixed or variable pitch if it were an option.

I've even checked that my fonts in other programs are not affected - which would indicate a 'Windows' setting problem  -  but they are 'normal'.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

Thaddy

  • Hero Member
  • *****
  • Posts: 18944
  • Glad to be alive.
Re: IDE Display changed to 'fixed pitch' ???
« Reply #3 on: March 11, 2017, 12:33:25 pm »
Looks like the file where Lazarus stores its font settings is damaged, since Lazarus runs. I dunno which one that is, though.
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

fred

  • Full Member
  • ***
  • Posts: 208
Re: IDE Display changed to 'fixed pitch' ???
« Reply #4 on: March 11, 2017, 12:44:42 pm »
Seems the setting is stored in editoroptions.xml

J-G

  • Hero Member
  • *****
  • Posts: 992
Re: IDE Display changed to 'fixed pitch' ???
« Reply #5 on: March 11, 2017, 01:02:59 pm »
Seems the setting is stored in editoroptions.xml
My system tells me that that file was last modified on 14/2/2016 which predates my installation of Lazarus (August 2016) but it does show :
Display EditorFont="-adobe-courier-medium-r-normal-*-*-*-*-*-*-*-iso10646-1" ExtraLineSpacing="2"

...whereas my current options has 'extra line spacing' = 0.

It also has extra char spacing = 0 but I now suspect that rather than using 'Fixed Pitch', I think it might be that Extra Char Spacing is 1 or even 2.

This is what the editor windows looks like  :(
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

fred

  • Full Member
  • ***
  • Posts: 208
Re: IDE Display changed to 'fixed pitch' ???
« Reply #6 on: March 11, 2017, 01:25:02 pm »
Mine is dated today (perhaps by using the options) and has:
  <EditorOptions Version="11">
    <Display DoNotWarnForFont="Courier New"/>

J-G

  • Hero Member
  • *****
  • Posts: 992
Re: IDE Display changed to 'fixed pitch' ???
« Reply #7 on: March 11, 2017, 01:29:24 pm »
Further investigation shows that Fonts that are 'fixed' pitch  -  Courier, Terminal, OCR-A -  display correctly but 'Variable pitch' fonts   - ZapfCalligr, Times, Garamond -  display with extra space!
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

fred

  • Full Member
  • ***
  • Posts: 208
Re: IDE Display changed to 'fixed pitch' ???
« Reply #8 on: March 11, 2017, 01:45:54 pm »
No idea why that is, normally is use fixed fonts for programming (often Dina), the editor Code Browser can use monospaced or not.
But is you have used your font it's strange why it's now different.

J-G

  • Hero Member
  • *****
  • Posts: 992
Re: IDE Display changed to 'fixed pitch' ???
« Reply #9 on: March 11, 2017, 01:56:00 pm »
Mine is dated today (perhaps by using the options) and has:
  <EditorOptions Version="11">
    <Display DoNotWarnForFont="Courier New"/>

I've looked harder and found the 'current' .XML file  :-[

My original search was limited to the Lazarus directory whereas the current file is naturally in the Windows AppData directory.

I had of course made changes in options and was searching for files that had been modified 'Today'.

I can force an entry in the <Display section   for  ExtraCharSpacing="1"  by selecting that option in the options editor of course but if it is 0 then there is no entry.

Using 'Terminal' is  just about usable but I would much prefer to return to ZapfCalligra  :(
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

fred

  • Full Member
  • ***
  • Posts: 208
Re: IDE Display changed to 'fixed pitch' ???
« Reply #10 on: March 11, 2017, 02:11:59 pm »
I have tried ZapfCalligra and get the same results as you.
Perhaps a proportional font is made fixed?
Others will have a deeper understanding of the editor I hope.

found more about it...
http://forum.lazarus-ide.org/index.php?topic=27385.0
http://forum.lazarus.freepascal.org/index.php?topic=31793.0
http://forum.lazarus.freepascal.org/index.php?topic=6960.0

« Last Edit: March 11, 2017, 02:21:41 pm by fred »

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1945
Re: IDE Display changed to 'fixed pitch' ???
« Reply #11 on: March 11, 2017, 02:26:49 pm »
And here... http://forum.lazarus.freepascal.org/index.php?topic=4013.0

Synedit supports Monospaced (Fixed) Fonts only.

fred

  • Full Member
  • ***
  • Posts: 208
Re: IDE Display changed to 'fixed pitch' ???
« Reply #12 on: March 11, 2017, 02:44:53 pm »
I don't know if you can change this without breaking things but I found this in \Lazarus\components\synedit\synedittextsystemcharwidth.pas

Code: Pascal  [Select][+][-]
  1. procedure TSynEditStringSystemWidthChars.DoGetPhysicalCharWidths(Line: PChar; LineLen,
  2.   Index: Integer; PWidths: PPhysicalCharWidth);
  3.  
  4. {$IFDEF WindowsDesktop}
  5. procedure TSynEditStringSystemWidthChars.DoGetPhysicalCharWidths(Line: PChar; LineLen,
  6.   Index: Integer; PWidths: PPhysicalCharWidth);
  7.  
  8.           PWidths^ := 2; // assums that is the max size, if font is proportional

If I would be stupid enough to try something I would make sure that I have a backup and a backup of program and settings :)



Fungus

  • Sr. Member
  • ****
  • Posts: 354
Re: IDE Display changed to 'fixed pitch' ???
« Reply #13 on: March 11, 2017, 03:06:10 pm »
Syntax highlighting works really bad with non-fixed fonts in an editor (for viewing / displaying it's OK). If a letter is 10px wide normally and 12px wide as bold then consider this: "procedur" normal 80px wide, "e" appended and becomes reserved / bold and is now 108px wide. This would cause the line to "jump" erratically by 18px. Also mind that indentation would look horrible since it would be impossible to make nice tabs / vertical columns.

fred

  • Full Member
  • ***
  • Posts: 208
Re: IDE Display changed to 'fixed pitch' ???
« Reply #14 on: March 11, 2017, 03:41:38 pm »
Yes, selecting a rectangle of text would also be difficult :)
But making "tables" is not impossible, see http://tibleiz.net/code-browser/elastic-tabstops.html
But this is drifting away from the original topic :)

 

TinyPortal © 2005-2018