diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-05-09 11:26:55 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-05-09 11:26:55 +0000 |
commit | d5eeaf33e07209ff83c499cf11327d81a4f468ec (patch) | |
tree | 6d655149f661eebc52001722813f01d68178a56c /psprint | |
parent | ca117a77503adee23f3750ec1517bfbd9598c661 (diff) |
symbol font compatibility fallback
Diffstat (limited to 'psprint')
-rw-r--r-- | psprint/source/printergfx/text_gfx.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/psprint/source/printergfx/text_gfx.cxx b/psprint/source/printergfx/text_gfx.cxx index 60369102d35c..063ebf7bca78 100644 --- a/psprint/source/printergfx/text_gfx.cxx +++ b/psprint/source/printergfx/text_gfx.cxx @@ -2,9 +2,9 @@ * * $RCSfile: text_gfx.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: pl $ $Date: 2001-05-08 11:46:09 $ + * last change: $Author: pl $ $Date: 2001-05-09 12:26:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -457,8 +457,16 @@ PrinterGfx::getFontSubstitute () sal_Int32 PrinterGfx::GetCharWidth (sal_Unicode nFrom, sal_Unicode nTo, long *pWidthArray) { - fontID pFont3[3] = { getFontSubstitute(), mnFontID, mnFallbackID }; + // XXX compatibility code, symbol area is 0xf020 and up but application is + // perhaps not aware of this and ask metrics in the range of 0 ... 256 + rtl_TextEncoding nEnc = mrFontMgr.getFontEncoding( mnFontID ); + if ( nEnc == RTL_TEXTENCODING_SYMBOL && nTo < 256 ) + { + nTo += 0xf000; + nFrom += 0xf000; + } + fontID pFont3[3] = { getFontSubstitute(), mnFontID, mnFallbackID }; int nScale = mnTextWidth ? mnTextWidth : mnTextHeight; for( int n = 0; n < (nTo - nFrom + 1); n++ ) { |