Question

I have an application which uses a lot of HTML to display content within each "page" of content. Suddenly, just by running on iOS 7, the HTML has started displaying incorrectly. All of the interword spacing is enlarged, causing the text to overflow off the end of the page. Does anyone know about anything that has changed that would cause this strange rendering to happen (all HTML files use embedded fonts)? The word spacing is controlled by the word-spacing CSS attribute (all defined in em). Have there been any webkit rendering changes in this regard?

Was it helpful?

Solution

Well since no one seems to be answering this question, the answer seems to be (one way or the other) YES. There are two things that affect the rendering of the HTML I use.

1) The word-spacing (when specified in em) is increased exactly by a factor of two. The only solution for me was to alter the word-spacing at runtime on iOS 7.0+.

2) Two non-breaking spaces ( ) at the beginning of a span causes an abnormally large gap. Changing this to one non-breaking space and a regular space fixes this.

There have been a lot of changes to CoreText in iOS 7.0 so I guess these artifacts are a result of that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top