diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-10-20 10:38:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-10-20 12:53:34 +0200 |
commit | 0cc9d19db04fae6e5e1bd4d1020863ec76894300 (patch) | |
tree | a2232d59d9f389557322c71a8c47c6e8aaea8555 /vcl/unx | |
parent | 0dd37854627aea025aa7bdae3b3bf9ca2d893943 (diff) |
ofz#52537 Abrt
Change-Id: I3362e0a78d29084d49389ed8f0f3173869850451
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141552
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 89f74f8298c7..6f462b4e3377 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -215,6 +215,12 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG } int nRatio = nWidth * 10 / nHeight; + if (nRatio >= 5120) + { + // as seen with freetype 2.12.1, so cairo surface status is "fail" + SAL_WARN("vcl", "rendering text would fail with stretch of: " << nRatio / 10.0); + return; + } /* * It might be ideal to cache surface and cairo context between calls and |