• Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Application
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Development
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Koda
Opened by Chris Haslam - 03.07.2011

FS#311 - TAEDIT: bad line wrapping with custom font

The attached .kxf file shows that for the dd code, zero fits easily on the line when the form is run. If I remove the \n\r in Strings Editor, they return when I close SE. SE does not seem to know that the font is Courier New 8pt.

Chris Haslam commented on 03.07.2011 17:10

While you are at it, it would be useful if String Editor showed the actual font, font size and width of the Edit control.

Admin
Admin commented on 06.07.2011 07:53

I'm don't know what to do with that. Autoit bug? I compared Courier New 8pt in Koda and in my regular text editor - they looks the same.

While you are at it, it would be useful if String Editor showed the actual font, font size and width of the Edit control.

Maybe, if String Editor even will be rewritten.

   font.png (3.7 KiB)
Chris Haslam commented on 06.07.2011 16:35

I have done some testing with Word and WordPerfect. They are consistent as to line length on the screen and when printed. But this doesn't help in our situation. I am inclined to think that there is a bug in AutoIt. I remember when I was writing a graphics editor some years back that font sizing was a pain. CreateFont() expects a height parameter that is something like 72/points, and height is an integer. There is a big difference in height between 8 and 9 points! I wonder whether AutoIt truncates or rounds?

I think a guiding principle for Koda is that it must do what AutoIt does. (This is causing me significant trouble in working on Styles with Presets.)

So Koda needs to simulate what AutoIt does with custom fonts. This probably means that your Delphi code needs to apply a fudge factor to font sizes when the font is other than the default. It is likely that the fudge factor is the same for a particular font size for all fonts.

It would be nice if SE were made wider, at least for Edit controls. Could it be resizable? A user could easily have line in a read-only edit box as long as mine.

I note that when I specify 8 points in Properties, Koda generates 8.5 points. I think Koda really needs half-point sizes; AutoIt says it handles half-point sizes.

Admin
Admin commented on 07.07.2011 09:58
I note that when I specify 8 points in Properties, Koda generates 8.5 points.

I tested, this rule applying not to all fonts. For example, Arial and Tahoma become smaller at 8 pt, but Courier (not "new") and MS Sans Serif are the same.

I think Koda really needs half-point sizes; AutoIt says it handles half-point sizes.

This is impossible, just similar with color issue.

Chris Haslam commented on 07.07.2011 12:31

The frustrations of Delphi! But all software packages are annoying in some ways. :-)

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing