diff options
author | Albert Astals Cid <aacid@kde.org> | 2011-02-25 20:33:39 +0000 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-02-25 20:33:39 +0000 |
commit | 97e7ab1a4eea2160f3f0847d10f6c16f2d66ef11 (patch) | |
tree | ce6060b2b7e067fa1947149ba9995a35e8157ca5 /splash/SplashFTFont.cc | |
parent | 3590a2d38082fc705040cdb31bf0b22ff12dd3e4 (diff) |
Do not ask freetype for a font of size 0x0
Fixes rendering bug at 34602
Diffstat (limited to 'splash/SplashFTFont.cc')
-rw-r--r-- | splash/SplashFTFont.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/splash/SplashFTFont.cc b/splash/SplashFTFont.cc index a69da6e5..eea3d641 100644 --- a/splash/SplashFTFont.cc +++ b/splash/SplashFTFont.cc @@ -11,7 +11,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2005, 2007-2010 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2005, 2007-2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2006 Kristian Høgsberg <krh@bitplanet.net> // Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com> // Copyright (C) 2010 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> @@ -71,6 +71,9 @@ SplashFTFont::SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA, } face->size = sizeObj; size = splashSqrt(mat[2]*mat[2] + mat[3]*mat[3]); + if ((int)size < 1) { + size = 1; + } if (FT_Set_Pixel_Sizes(face, 0, (int)size)) { return; } |