From dd4e0446084435e1d051cb169c26993b6344b3ad Mon Sep 17 00:00:00 2001 From: daboe01 Date: Thu, 15 Sep 2016 22:26:20 +0200 Subject: [PATCH] fixed: various tab related line height issues --- AppKit/CPTextView/CPTypesetter.j | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AppKit/CPTextView/CPTypesetter.j b/AppKit/CPTextView/CPTypesetter.j index cd2665a95..475e65f87 100644 --- a/AppKit/CPTextView/CPTypesetter.j +++ b/AppKit/CPTextView/CPTypesetter.j @@ -300,9 +300,6 @@ var CPSystemTypesetterFactory, currentFontLineHeight = ascent - descent + leading; - if (ascent > _lineBase) - _lineBase = ascent; - if (previousFont !== currentFont) { measuringRange = CPMakeRange(glyphIndex, 0); @@ -315,6 +312,9 @@ var CPSystemTypesetterFactory, if (currentFontLineHeight > _lineHeight) _lineHeight = currentFontLineHeight; + if (ascent > _lineBase) + _lineBase = ascent; + lineRange.length++; measuringRange.length++; @@ -401,14 +401,14 @@ var CPSystemTypesetterFactory, numLines++; isNewline = NO; _lineFragments = []; + _lineHeight = 0; + _lineBase = ascent; } _lineWidth = 0; advancements = []; currentAnchor = 0; prevRangeWidth = 0; - _lineHeight = 0; - _lineBase = ascent; lineRange = CPMakeRange(glyphIndex + 1, 0); measuringRange = CPMakeRange(glyphIndex + 1, 0); wrapRange = CPMakeRange(0, 0);