Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Fix formattedheight to return a realistic value #3589

Merged
merged 3 commits into from
Feb 16, 2016

Conversation

livecodefraser
Copy link
Contributor

Contains 3 fixes that allows livecode/livecode-ide#851 to work properly:

  1. Don't draw carets so low they descend outside the formattedheight
  2. Correct the metrics used for Windows fonts
  3. Fix the "magic" factor used when calculating formattedHeight for fields

Doing this makes the caret look too low in comparison to the caret
position in modern UIs.
Not accounting for this meant that the height of text was being
calculated incorrectly.
With the new text metrics, the formattedHeight value bore only a
passing relationship with reality. By tweaking the calculation
slightly (and, as a side-effect, better matching how heights for
field scrollbars are calculated), the formattedHeight now returns
a value that works for auto-sizing fields to match the height of
their contents.
@livecodefraser livecodefraser added this to the 8.0.0-dp-15 milestone Feb 15, 2016
@peter-b
Copy link
Contributor

peter-b commented Feb 16, 2016

@livecode-vulcan review ok 70d21c1

@livecode-vulcan
Copy link
Contributor

💙 review by @peter-b ok 70d21c1

livecode-vulcan added a commit that referenced this pull request Feb 16, 2016
Fix formattedheight to return a realistic value

Contains 3 fixes that allows livecode/livecode-ide#851 to work properly:

1. Don't draw carets so low they descend outside the formattedheight
2. Correct the metrics used for Windows fonts
3. Fix the "magic" factor used when calculating formattedHeight for fields
@livecode-vulcan
Copy link
Contributor

😎 test success 70d21c1

livecodefraser added a commit that referenced this pull request Feb 16, 2016
Fix formattedheight to return a realistic value
@livecodefraser livecodefraser merged commit b3cde75 into livecode:develop Feb 16, 2016
@livecodefraser livecodefraser deleted the fix-formattedheight branch February 16, 2016 10:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants