f
This commit is contained in:
parent
f6a7c888fa
commit
a0618ad9ac
1 changed files with 4 additions and 2 deletions
|
@ -385,6 +385,8 @@ proc typeset*(
|
||||||
font.defaultLineHeight
|
font.defaultLineHeight
|
||||||
lineHeights[line] = max(lineHeights[line], fontLineHeight)
|
lineHeights[line] = max(lineHeights[line], fontLineHeight)
|
||||||
for runeIndex in start .. stop:
|
for runeIndex in start .. stop:
|
||||||
|
# This span could be many lines. This check can be made faster by
|
||||||
|
# hopping based on line endings instead of checking each index.
|
||||||
if line + 1 < result.lines.len and
|
if line + 1 < result.lines.len and
|
||||||
runeIndex == result.lines[line + 1][0]:
|
runeIndex == result.lines[line + 1][0]:
|
||||||
inc line
|
inc line
|
||||||
|
@ -401,8 +403,8 @@ proc typeset*(
|
||||||
let
|
let
|
||||||
font = result.fonts[spanIndex]
|
font = result.fonts[spanIndex]
|
||||||
lineHeight =
|
lineHeight =
|
||||||
if font.lineheight >= 0:
|
if font.lineHeight >= 0:
|
||||||
font.lineheight
|
font.lineHeight
|
||||||
else:
|
else:
|
||||||
font.defaultLineHeight
|
font.defaultLineHeight
|
||||||
for runeIndex in start .. stop:
|
for runeIndex in start .. stop:
|
||||||
|
|
Loading…
Reference in a new issue