diff options
Diffstat (limited to 'vcl/unx/headless/svptext.cxx')
-rw-r--r-- | vcl/unx/headless/svptext.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/unx/headless/svptext.cxx b/vcl/unx/headless/svptext.cxx index ecb8b11b7e04..34941fc777db 100644 --- a/vcl/unx/headless/svptext.cxx +++ b/vcl/unx/headless/svptext.cxx @@ -240,12 +240,15 @@ USHORT SvpSalGraphics::SetFont( ImplFontSelectData* pIFSD, int nFallbackLevel ) // --------------------------------------------------------------------------- -void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric ) +void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLevel ) { - if( m_pServerFont[0] != NULL ) + if( nFallbackLevel >= MAX_FALLBACK ) + return; + + if( m_pServerFont[nFallbackLevel] != NULL ) { long rDummyFactor; - m_pServerFont[0]->FetchFontMetric( *pMetric, rDummyFactor ); + m_pServerFont[nFallbackLevel]->FetchFontMetric( *pMetric, rDummyFactor ); } } |