summaryrefslogtreecommitdiff
path: root/vcl/inc/outfont.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-10-27 12:24:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-10-27 12:49:14 +0100
commit58b48f188bbfd9a3382460d6de63848eb3db416d (patch)
tree37d09873eec39ff18a5f9cdb910ea6fe4a1f38cc /vcl/inc/outfont.hxx
parentd9d82ffc6b16051f002e297109509488972a9c92 (diff)
Resolves: fdo#32665 handle that FreeSerif lacks some glyphs in bold/italic
FreeSerif lacks glyphs in bold/italic variants that it has in the normal one. A lot of our glyph fallback infrastructure, especially the caches don't expect that a normal variant of a font with extra emboldening or extra font skew can be a fallback for a bold/italic variant of itself which exists, but doesn't have the missing glyphs that the normal one does. We really need to improve our glyph/font caching, but we can get 90% of the way there by excluding such cases from the caches.
Diffstat (limited to 'vcl/inc/outfont.hxx')
-rw-r--r--vcl/inc/outfont.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index faf2b00793f2..857d94416925 100644
--- a/vcl/inc/outfont.hxx
+++ b/vcl/inc/outfont.hxx
@@ -156,6 +156,22 @@ friend class ImplDevFontListData;
// - ImplFontSelectData -
// ----------------------
+struct ItalicMatrix
+{
+ double xx, xy, yx, yy;
+ ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
+};
+
+inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
+{
+ return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
+}
+
+inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
+{
+ return a.xx != b.xx || a.xy != b.xy || a.yx != b.yx || a.yy != b.yy;
+}
+
class ImplFontSelectData : public ImplFontAttributes
{
public:
@@ -175,6 +191,9 @@ public: // TODO: change to private
bool mbVertical; // vertical mode of requested font
bool mbNonAntialiased; // true if antialiasing is disabled
+ bool mbEmbolden; // Force emboldening
+ ItalicMatrix maItalicMatrix; // Force matrix for slant
+
const ImplFontData* mpFontData; // a matching ImplFontData object
ImplFontEntry* mpFontEntry; // pointer to the resulting FontCache entry
};