Kaydet (Commit) 4c30eb7a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Zero font width means non-scaled

...so make sure to always round small width of a scaled font to one, not zero.

Change-Id: I032b28e7f7183770db134f5891393ceaf39e0103
üst 093d5432
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <sal/config.h>
#include <algorithm>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx> #include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/scoped_disposing_ptr.hxx> #include <comphelper/scoped_disposing_ptr.hxx>
...@@ -394,7 +398,7 @@ namespace drawinglayer ...@@ -394,7 +398,7 @@ namespace drawinglayer
vcl::Font aRetval( vcl::Font aRetval(
rFontAttribute.getFamilyName(), rFontAttribute.getFamilyName(),
rFontAttribute.getStyleName(), rFontAttribute.getStyleName(),
Size(bFontIsScaled ? nWidth : 0, nHeight)); Size(bFontIsScaled ? std::max<sal_uInt32>(nWidth, 1) : 0, nHeight));
#endif #endif
// define various other FontAttribute // define various other FontAttribute
aRetval.SetAlign(ALIGN_BASELINE); aRetval.SetAlign(ALIGN_BASELINE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment