Showing the user one screen at a time (or allowing him to scroll freely) the system will always have the variables:
top line visible. lines visible in the screen. total lines.
What’s the best approach to tell the user of it’s progress in the text?
If the system uses line 1 as 0% topLine * 100 / totalLines then at the end of the text, it will be something <100%, e.g. 97.5%
If the system accounts for the visible line in the screen (topLine + linesVisible) * 100 / totalLines, it would start at something >0%, e.g. 11%
If the system uses a curve to start at 0% and end at 100%, everytime he swtiches devices or resized font/screen size the percentage would change.
Is there a common pattern for this problem?
I don’t think there would be a common pattern for this. The task is device-specific and application specific.
You should count all three variables
top line visible,lines visible in the screenandtotal lineswhen user changes font or font-size. And when user scrolls onlytop line visibleandlines visible in the screenshould be counted.Take a look on how MS Word or even Amazon Kindle deal with the issue. MS Word shows progress when you hold the mouse on the scroll. And Amazon Kindle shows the progress at the bottom of the page.
They both show the page number or percentage of the pages and not lines, but their approach could be applied for lines too.
Also if your document isn’t really huge it wouldn’t be pleasant to show float numbers as progress. The rounded percentage would do in that case.