Horizontal lines behind the editor

Hello there,
Not sure if this is new or I just didn’t noticed it before, but here it goes. So, some horizontal lines appear at random times behind the editor, and they vanish and appear again as I scroll up and down with the mouse.
Here’s a short screen capture I did of it happening https://vimeo.com/62857227
Not a big thing, but I think this is not something that is supposed to happen, so here’s one for you to figure out :wink:

Thanks a lot

Do you have the editor zoomed? Zooming to some percentages produces such artefacts.
:slight_smile:

Mark

Hi Mark,
Indeed, I do! So that must be what’s causing this. Well, no worries then. I like my zoom, so I guess a few lines won’t harm that much :wink:

Thanks a lot for such quick reply!

Rui

My pleasure.

:slight_smile:

Mark

Hi,

Yes, unfortunately this is caused by “tearing” - when the editor is scaled, with certain fonts and at certain zoom sizes, the OS X text system that Scrivener uses seems to suffer from certain rounding errors which leads to single-pixel-line artefacts. Er, sorry, that was a bit technical. Essentially, say a line of text is 14 pixels high and you have it scaled by 125%, that makes the line 17.5 pixels high. But the OS X text system doesn’t like fractions, so it rounds up or down (to 17 or 18). This can leave a gap when drawing. You wouldn’t believe the amount of work I’ve done trying to avoid this, and indeed, I have managed to get rid of the worst of it, but the tearing does still happen from time to time, unfortunately - as far as I can make out, it’s coming from Apple’s code not liking being scaled.

Thanks and all the best,
Keith

Hey Keith,
Yes, extremely technical, but useful nevertheless :wink:

Thanks a lot for taking the time.
Rui

For what it’s worth, I see this all the time in Safari on my iPad Mini.

Interesting! I had assumed it was limited to the NSText engine. If you see it in iOS’s UIWebKit view, I wonder if it’s a more general problem with underlying Cocoa text-drawing methods.

More specifically: if I use a two-finger gesture to expand the text, then scroll up, I get a thick line that runs from the left margin about three-quarters of the way across the screen right where the bottom of the view was before I scrolled; it doesn’t go away as I scroll further. Something to check for in Scrivener for iOS.