Fix font engine not available on sub-page processing
The font engine was only initialised in the primary page and not available in sub pages. This is fixed by making it a static var.
Also fixed the upsidedown text problem in patterns which is caused by the text's own internal matrix being unaware of the initial state. Primary pages are flipped in their state, while sub-pages are not.
Fixes #3886 (closed)