Respect fixed pitch request when font family is not available

In particular, if you have a <pre> tag in your HTML, this will
become a QFont with family "Courier New" and fixedPitch==true.
On Android, there's no "Courier New" font, and since the
style hint is AnyStyle, we will just return Roboto, which is
a proportional font.

Note that this exactly matches the condition when fetching the
fallback families for the font in the loadEngine() function,
which was introduced by 06568ff89c48dee8aab278b8b0538c331aa84595
in Qt 4.

[ChangeLog][Text] Respect QFont::fixedPitch() for fallbacks
when font family cannot be matched.

Task-number: QTBUG-36083
Change-Id: I64787c547dc492b9dd3c49f1edf0d9626d198260
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
QTextLayout: Fix cursor position calculation for BiDi text

Due excess 'break' in loop, function xToCursor() with "CursorOnCharacter" option
for BiDI text returns wrong cursor position (start glyph position) all time.

Task-number: QTBUG-38846
Change-Id: Iba6671905e0785da6f343db19d6c3bb3e2cf5e8a
Reviewed-by: Andrey Volykhin <andrey.volykhin@lge.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Direct2D QPA: Never queue more than one frame

Microsoft recommends setting the maximum frame latency to 1:

http://blogs.windows.com/windows/b/appbuilder/archive/2013/12/18/optimizing-directx-apps-for-low-latency-input-and-longer-battery-life.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx

Apparently it slightly reduces power consumption and it also slightly
increases performance. So let's set it.

Change-Id: I8a540f1e54e83d6dc13f25564e10b751e202ce66
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Direct2D QPA: Choose linear interpolation for smooth pixmap transform

Let's do the same thing the raster engine does. Much faster too.

Change-Id: I88ea9d2c2ac78feee1193b75a9e96c62a7bd5979
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Allow QFont lookups using localized family names by adding family alias

After fbaa6d3ca6fc269 QFont family names are non-localized on iOS/OS X,
which means applications that try to initialize QFont with a localized
family name (explicitly, or from user input), will fail, and get the
fallback font instead.

We now add font family aliases for the localized family names, so that
font matching will work even for localized family names. Note that
QFontDatabase::families() still returns a non-localized list.

Task-number: QTBUG-38628
Change-Id: Id351befa69916ce162c939733bbfcc774f075120
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
CoreText: Prevent creation of CGContext for glyphs with empty bounding box

If the alphaMapBoundingBox of a glyph is empty we don't want to create
a CGBitmapContext on it, as that will fail, and any further operations
on the invalid context will result in possibly fatal errors from CG.

This issue can be observed when drawing some glyphs of the Apple Color
Emoji font.

Change-Id: Ia45ba858b5fb6afa91e6d686a9c55e350d4095f3
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
[QNX]Clear transparent regions

If a region gets painted the buffer beneath needs
to be cleared, as it could be that there are
leftovers from the last blit.

Change-Id: I51f19aa010015059e9a6d9d5e5e4f25fb9532d4e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
QNX: Don't build QNX-only parts on BlackBerry

Only really required source files will be included when building for
BlackBerry.

Change-Id: Ic66b09221c48672358bba7601bc18663ad7fa07a
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>