Bugzilla – Attachment 42777 Details for
Bug 33510
Preview some sample Arabic text in the font list when the font is designed for Arabic.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
stash this here for a bit
font.preview.sample.script.text.patch (text/plain), 21.42 KB, created by
Caolán McNamara
on 2011-01-31 13:23:52 UTC
(
hide
)
Description:
stash this here for a bit
Filename:
MIME Type:
Creator:
Caolán McNamara
Created:
2011-01-31 13:23:52 UTC
Size:
21.42 KB
patch
obsolete
>diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx >index ada48f9..1cdce0e 100644 >--- a/svtools/source/control/ctrlbox.cxx >+++ b/svtools/source/control/ctrlbox.cxx >@@ -47,12 +47,17 @@ > #include <basegfx/polygon/b2dpolygon.hxx> > #include <basegfx/polygon/b2dpolygontools.hxx> > >+#include <com/sun/star/lang/XMultiServiceFactory.hpp> >+#include <com/sun/star/i18n/XBreakIterator.hpp> >+ > #define IMGTEXTSPACE 2 > #define EXTRAFONTSIZE 5 > > static sal_Unicode aImplSymbolFontText[] = {0xF021,0xF032,0xF043,0xF054,0xF065,0xF076,0xF0B7,0xF0C8,0}; > static sal_Unicode aImplStarSymbolText[] = {0x2706,0x2704,0x270D,0xE033,0x2211,0x2288,0}; > >+using namespace ::com::sun::star; >+ > // ======================================================================== > // ColorListBox > // ======================================================================== >@@ -892,6 +897,113 @@ void FontNameBox::ImplCalcUserItemSize() > SetUserItemSize( aUserItemSz ); > } > >+#define MKTAG(s) ((((((s[0]<<8)+s[1])<<8)+s[2])<<8)+s[3]) >+ >+namespace >+{ >+ //See: http://en.wikipedia.org/wiki/List_of_pangrams >+ bool makeShortRepresentativeText(uno::Reference< lang::XMultiServiceFactory >& rxMSF, rtl::OUString &rSampleText, sal_Int32 nMaxLen, sal_uInt32 nScript) >+ { >+ bool bRet = true; >+ >+ switch (nScript) >+ { >+ case MKTAG("arab"): >+ rSampleText = rtl::OUString("ﺺÙï» ïº¦Ùï» ï»Ù ﺥÙï»ïº©Ù ï»ÙﻤÙïºï»Ù ïºï» ﺸÙﻤﺳ٠ïºÙﺫ ïºÙﺰÙï»Ùïº ï»²Ùﺤï»ï»¯ ïºï» ï»Ùïº ï»´ï»Ù ïºÙï»«ïº ï»¦Ùïºï»»ïºÙ ﻢÙï»ï»ïºïºÙ ", strlen("ﺺÙï» ïº¦Ùï» ï»Ù ﺥÙï»ïº©Ù ï»ÙﻤÙïºï»Ù ïºï» ﺸÙﻤﺳ٠ïºÙﺫ ïºÙﺰÙï»Ùïº ï»²Ùﺤï»ï»¯ ïºï» ï»Ùïº ï»´ï»Ù ïºÙï»«ïº ï»¦Ùïºï»»ïºÙ ﻢÙï»ï»ïºïºÙ "), RTL_TEXTENCODING_UTF8); >+ break; >+ case MKTAG("ethi"): >+ { >+ sal_Unicode aEthi[] = { >+ 0x1200, 0x1201, 0x1202, 0x1203, 0x1204, 0x1205, 0x1206, 0x1207, 0x1208, 0x1209, 0x120A, 0x120B, 0x120C, 0x120D, 0x120E, 0x120F, >+ 0x1210, 0x1211, 0x1212, 0x1213, 0x1214, 0x1215, 0x1216, 0x1217, 0x1218, 0x1219, 0x121A, 0x121B, 0x121C, 0x121D, 0x121E, 0x121F >+ }; >+ rSampleText = rtl::OUString(aEthi, SAL_N_ELEMENTS(aEthi)); >+ break; >+ } >+ case MKTAG("hebr"): >+ rSampleText = rtl::OUString("×× ×¡×§×¨× ×©× ××× ×××××× ××פתע ××¦× ×××¨× ", strlen("×× ×¡×§×¨× ×©× ××× ×××××× ××פתע ××¦× ×××¨× "), RTL_TEXTENCODING_UTF8); >+ break; >+ case MKTAG("khmr"): >+ { >+ sal_Unicode aKhmr[] = { >+ 0x1780, 0x1781, 0x1782, 0x1783, 0x1784, 0x1785, 0x1786, 0x1787, 0x1788, 0x1789, 0x178A, 0x178B, 0x178C, 0x178D, 0x178E, 0x178F, >+ 0x1790, 0x1791, 0x1792, 0x1793, 0x1794, 0x1795, 0x1796, 0x1797, 0x1798, 0x1799, 0x179A, 0x179B, 0x179C, 0x179D, 0x179E, 0x179F >+ }; >+ rSampleText = rtl::OUString(aKhmr, SAL_N_ELEMENTS(aKhmr)); >+ break; >+ } >+ case MKTAG("grek"): >+ rSampleText = rtl::OUString(" ΤάÏιÏÏη αλÏÏηξ βαÏÎ®Ï ÏημÎνη γη, δÏαÏκελίζει Ï ÏÎÏ Î½ÏθÏÎ¿Ï ÎºÏ Î½ÏÏ", strlen(" ΤάÏιÏÏη αλÏÏηξ βαÏÎ®Ï ÏημÎνη γη, δÏαÏκελίζει Ï ÏÎÏ Î½ÏθÏÎ¿Ï ÎºÏ Î½ÏÏ"), RTL_TEXTENCODING_UTF8); >+ break; >+ case MKTAG("latn"): >+ rSampleText = rtl::OUString(" The quick brown fox jumps over the lazy dog", strlen(" The quick brown fox jumps over the lazy dog"), RTL_TEXTENCODING_UTF8); >+ break; >+ case MKTAG("mymr"): >+ rSampleText = rtl::OUString(" áá®ááá¯á á»áá¾ áá¬áá»áá½á®á¸áá¾áá»ááá» á¡á¬áá¯áááºáááá±á¸áá¾á¾áá»á¸á á¬ááᯠááá¾áá»áá±á¸áá±á¸áá¬áá¶ááá»ááá» á¡ááááºáá¬áá»ááá¼á» ááááááá»áá²á·ááá»á", strlen(" Tháá®ááá¯á á»áá¾ áá¬áá»áá½á®á¸áá¾áá»ááá» á¡á¬áá¯áááºáááá±á¸áá¾á¾áá»á¸á á¬ááᯠááá¾áá»áá±á¸áá±á¸áá¬áá¶ááá»ááá» á¡ááááºáá¬áá»ááá¼á» ááááááá»áá²á·ááá»á"), RTL_TEXTENCODING_UTF8); >+ break; >+ case MKTAG("thai"): >+ rSampleText = rtl::OUString(" à¹à¸à¹à¸à¸¡à¸à¸¸à¸©à¸¢à¹à¸ªà¸¸à¸à¸à¸£à¸°à¹à¸ªà¸£à¸´à¸à¹à¸¥à¸´à¸¨à¸à¸¸à¸à¸à¹à¸² à¸à¸§à¹à¸²à¸à¸£à¸£à¸à¸²à¸à¸¹à¸à¸ªà¸±à¸à¸§à¹à¹à¸à¸£à¸±à¸à¸à¸²à¸ à¸à¸à¸à¹à¸²à¸à¸±à¸à¸à¸±à¸à¸à¸²à¸§à¸´à¸à¸²à¸à¸²à¸£ à¸à¸¢à¹à¸²à¸¥à¹à¸²à¸à¸à¸¥à¸²à¸à¸¤à¹ à¹à¸à¹à¸à¸à¹à¸²à¸à¸µà¸à¸²à¹à¸à¸£ à¹à¸¡à¹à¸à¸·à¸à¹à¸à¸©à¹à¸à¸£à¸à¹à¸à¹à¸à¸à¸±à¸à¸®à¸¶à¸à¸®à¸±à¸à¸à¹à¸² หัà¸à¸à¸ ัยà¹à¸«à¸¡à¸·à¸à¸à¸à¸µà¸¬à¸²à¸à¸±à¸à¸à¸²à¸ªà¸±à¸¢ à¸à¸à¸´à¸à¸±à¸à¸´à¸à¸£à¸°à¸à¸¤à¸à¸´à¸à¸à¸à¸³à¸«à¸à¸à¹à¸ à¸à¸¹à¸à¸à¸²à¹à¸«à¹à¸à¹à¸°à¹ à¸à¹à¸²à¹ à¸à¹à¸²à¸à¸±à¸à¹à¸à¸¢à¸¯", strlen(" à¹à¸à¹à¸à¸¡à¸à¸¸à¸©à¸¢à¹à¸ªà¸¸à¸à¸à¸£à¸°à¹à¸ªà¸£à¸´à¸à¹à¸¥à¸´à¸¨à¸à¸¸à¸à¸à¹à¸² à¸à¸§à¹à¸²à¸à¸£à¸£à¸à¸²à¸à¸¹à¸à¸ªà¸±à¸à¸§à¹à¹à¸à¸£à¸±à¸à¸à¸²à¸ à¸à¸à¸à¹à¸²à¸à¸±à¸à¸à¸±à¸à¸à¸²à¸§à¸´à¸à¸²à¸à¸²à¸£ à¸à¸¢à¹à¸²à¸¥à¹à¸²à¸à¸à¸¥à¸²à¸à¸¤à¹ à¹à¸à¹à¸à¸à¹à¸²à¸à¸µà¸à¸²à¹à¸à¸£ à¹à¸¡à¹à¸à¸·à¸à¹à¸à¸©à¹à¸à¸£à¸à¹à¸à¹à¸à¸à¸±à¸à¸®à¸¶à¸à¸®à¸±à¸à¸à¹à¸² หัà¸à¸à¸ ัยà¹à¸«à¸¡à¸·à¸à¸à¸à¸µà¸¬à¸²à¸à¸±à¸à¸à¸²à¸ªà¸±à¸¢ à¸à¸à¸´à¸à¸±à¸à¸´à¸à¸£à¸°à¸à¸¤à¸à¸´à¸à¸à¸à¸³à¸«à¸à¸à¹à¸ à¸à¸¹à¸à¸à¸²à¹à¸«à¹à¸à¹à¸°à¹ à¸à¹à¸²à¹ à¸à¹à¸²à¸à¸±à¸à¹à¸à¸¢à¸¯"), RTL_TEXTENCODING_UTF8); >+ break; >+ case MKTAG("tibt"): >+ { >+ sal_Unicode aTibt[] = { >+ 0x0F00, 0x0F01, 0x0F02, 0x0F03, 0x0F04, 0x0F05, 0x0F06, 0x0F07, 0x0F08, 0x0F09, 0x0F0A, 0x0F0B, 0x0F0C, 0x0F0D, 0x0F0E, 0x0F0F, >+ 0x0F10, 0x0F11, 0x0F12, 0x0F13, 0x0F14, 0x0F15, 0x0F16, 0x0F17, 0x0F18, 0x0F19, 0x0F1A, 0x0F1B, 0x0F1C, 0x0F1D, 0x0F1E, 0x0F1F >+ }; >+ rSampleText = rtl::OUString(aTibt, SAL_N_ELEMENTS(aTibt)); >+ break; >+ } >+ case MKTAG("sinh"): >+ { >+ sal_Unicode aSinh[] = { >+ 0x0D85, 0x0D86, 0x0D87, 0x0D88, 0x0D89, 0x0D8A, 0x0D8B, 0x0D8C, 0x0D8D, 0x0D8E, 0x0D8F, 0x0D90, 0x0D91, 0x0D92, 0x0D93, 0x0D94, >+ 0x0D95, 0x0D96, 0x0D9A, 0x0D9B, 0x0D9C, 0x0D9D, 0x0D9E, 0x0D9F, 0x0DA0, 0x0DA1, 0x0DA2, 0x0DA3, 0x0DA4, 0x0DA5, 0x0DA6, 0x0DA7 >+ }; >+ rSampleText = rtl::OUString(aSinh, SAL_N_ELEMENTS(aSinh)); >+ break; >+ } >+ default: >+ bRet = false; >+ break; >+ } >+ >+ if (nMaxLen < rSampleText.getLength()) >+ { >+ uno::Reference< i18n::XBreakIterator > xBreak(rxMSF->createInstance( >+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator"))),uno::UNO_QUERY); >+ >+ i18n::LineBreakHyphenationOptions aHyphOptions; >+ i18n::LineBreakUserOptions aUserOptions; >+ lang::Locale aLocale; >+ >+ i18n::LineBreakResults aResult = xBreak->getLineBreak(rSampleText, nMaxLen, aLocale, 0, aHyphOptions, aUserOptions); >+ >+ sal_Int32 nLen = aResult.breakIndex; >+ if (!nLen) >+ nLen = nMaxLen; >+ rSampleText = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) + rSampleText.copy(0, nLen); >+ } >+ >+ return bRet; >+ } >+ >+ sal_uInt32 getSingleNonLatnTag(const FontLayoutCapabilities &rFontLayoutCapabilities) >+ { >+ size_t nCount = 0; >+ sal_uInt32 nTag = 0; >+ for (FontLayoutCapabilities::const_iterator aI = rFontLayoutCapabilities.begin(), >+ aEnd = rFontLayoutCapabilities.end(); aI != aEnd; ++aI) >+ { >+ if (*aI != MKTAG("DFLT") && *aI != MKTAG("dflt") && *aI != MKTAG("latn")) >+ { >+ nTag = *aI; >+ ++nCount; >+ } >+ } >+ return nCount == 1 ? nTag : 0; >+ } >+} >+ > // ------------------------------------------------------------------- > > void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) >@@ -1009,6 +1121,41 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) > Point aPos( nX, aTopLeft.Y() + (nH-nTextHeight)/2 ); > rUDEvt.GetDevice()->DrawText( aPos, aString ); > >+ bool bNameIsLatinText = false; >+ if (!bSymbolFont) >+ { >+ bNameIsLatinText = true; >+ const String &rName = rInfo.GetName(); >+ const sal_Unicode *pChars = rName.GetBuffer(); >+ for (sal_Int32 i = 0; i < rName.Len(); i++) >+ { >+ if (pChars[i] > 'z') >+ { >+ bNameIsLatinText = false; >+ break; >+ } >+ } >+ } >+ >+ if (bNameIsLatinText) >+ { >+ //If this font is probably tuned to display a single non-Latin >+ //script and the font name is itself in Latin, then show a small >+ //chunk of representative text for that script >+ aPos.X() += rUDEvt.GetDevice()->GetTextWidth( aString ); >+ FontLayoutCapabilities aFontLayoutCapabilities; >+ rUDEvt.GetDevice()->SetFont( aFont ); >+ rUDEvt.GetDevice()->GetFontLayoutCapabilities( aFontLayoutCapabilities ); >+ rtl::OUString sSampleText; >+ uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); >+ sal_uInt32 nLangTag = getSingleNonLatnTag(aFontLayoutCapabilities); >+ if (nLangTag && makeShortRepresentativeText(xFactory, sSampleText, 15, nLangTag)) >+ { >+ if( STRING_LEN == rUDEvt.GetDevice()->HasGlyphs( aFont, sSampleText ) ) >+ rUDEvt.GetDevice()->DrawText( aPos, sSampleText ); >+ } >+ } >+ > rUDEvt.GetDevice()->SetFont( aOldFont ); > DrawEntry( rUDEvt, FALSE, FALSE); // draw seperator > } >diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx >index 9731440..e8e000e 100644 >--- a/vcl/inc/vcl/glyphcache.hxx >+++ b/vcl/inc/vcl/glyphcache.hxx >@@ -57,6 +57,8 @@ class CmapResult; > class ServerFontLayout; > #include <vcl/sallayout.hxx> > >+typedef std::vector< sal_uInt32 > FontLayoutCapabilities; >+ > // ======================================================================= > > class VCL_DLLPUBLIC GlyphCache >@@ -192,6 +194,7 @@ public: > virtual ULONG GetKernPairs( ImplKernPairData** ) const { return 0; } > virtual int GetGlyphKernValue( int, int ) const { return 0; } > virtual bool GetFontCodeRanges( CmapResult& ) const { return false; } >+ virtual bool GetFontLayoutCapabilities(FontLayoutCapabilities &) const { return false; } > Point TransformPoint( const Point& ) const; > > GlyphData& GetGlyphData( int nGlyphIndex ); >diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx >index e975de6..87fdd57 100644 >--- a/vcl/inc/vcl/outdev.hxx >+++ b/vcl/inc/vcl/outdev.hxx >@@ -104,6 +104,8 @@ namespace awt { > > typedef std::vector< Rectangle > MetricVector; > >+typedef std::vector< sal_uInt32 > FontLayoutCapabilities; >+ > namespace vcl > { > class PDFWriterImpl; >@@ -1074,6 +1076,7 @@ public: > FontMetric GetFontMetric() const; > FontMetric GetFontMetric( const Font& rFont ) const; > BOOL GetFontCharMap( FontCharMap& rFontCharMap ) const; >+ bool GetFontLayoutCapabilities( FontLayoutCapabilities& rFontLayoutCapabilities ) const; > > xub_StrLen HasGlyphs( const Font& rFont, const String& rStr, > xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN ) const; >diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx >index 15b2c70..1d73f2f 100644 >--- a/vcl/inc/vcl/salgdi.hxx >+++ b/vcl/inc/vcl/salgdi.hxx >@@ -241,6 +241,8 @@ public: > virtual ULONG GetKernPairs( ULONG nMaxPairCount, ImplKernPairData* ) = 0; > // get the repertoire of the current font > virtual ImplFontCharMap* GetImplFontCharMap() const = 0; >+ // get the layout capabilities of the current font >+ virtual bool GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const = 0; > // graphics must fill supplied font list > virtual void GetDevFontList( ImplDevFontList* ) = 0; > // graphics should call ImplAddDevFontSubstitute on supplied >diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx >index 567a63a..9f7f76a 100644 >--- a/vcl/source/gdi/outdev3.cxx >+++ b/vcl/source/gdi/outdev3.cxx >@@ -7937,6 +7937,24 @@ BOOL OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, > return TRUE; > } > >+bool OutputDevice::GetFontLayoutCapabilities( FontLayoutCapabilities& rFontLayoutCapabilities ) const >+{ >+ rFontLayoutCapabilities.clear(); >+ >+ // we need a graphics >+ if( !mpGraphics && !ImplGetGraphics() ) >+ return false; >+ >+ if( mbNewFont ) >+ ImplNewFont(); >+ if( mbInitFont ) >+ ImplInitFont(); >+ if( !mpFontEntry ) >+ return false; >+ >+ return mpGraphics->GetImplFontLayoutCapabilities(rFontLayoutCapabilities); >+} >+ > // ----------------------------------------------------------------------- > > BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const >diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx >index 729b2e9..0798379 100644 >--- a/vcl/source/glyphs/gcach_ftyp.cxx >+++ b/vcl/source/glyphs/gcach_ftyp.cxx >@@ -1768,6 +1768,38 @@ bool FreetypeServerFont::GetFontCodeRanges( CmapResult& rResult ) const > return true; > } > >+bool FreetypeServerFont::GetFontLayoutCapabilities(FontLayoutCapabilities &rFontLayoutCapabilities) const >+{ >+ rFontLayoutCapabilities.clear(); >+ >+ // load GSUB table >+ ULONG nLength = 0; >+ const FT_Byte* const pGsubBase = mpFontInfo->GetTable("GSUB", &nLength); >+ if( !pGsubBase ) >+ return false; >+ >+ // parse GSUB header >+ const FT_Byte* pGsubHeader = pGsubBase; >+ const USHORT nOfsScriptList = GetUShort( pGsubHeader+4 ); >+ >+ // parse Script Table >+ const FT_Byte* pScriptHeader = pGsubBase + nOfsScriptList; >+ const USHORT nCntScript = GetUShort( pScriptHeader ); >+ pScriptHeader += 2; >+ for( USHORT nScriptIndex = 0; nScriptIndex < nCntScript; ++nScriptIndex ) >+ { >+ sal_uInt32 nTag = GetUInt(pScriptHeader); >+ char *tag = (char*)&(nTag); >+ fprintf(stderr, "%s\n", mpFontInfo->GetFontFileName()->getStr()); >+ fprintf(stderr, "%c%c%c%c\n", tag[3], tag[2], tag[1], tag[0]); >+ rFontLayoutCapabilities.push_back(nTag); // e.g. hani/arab/kana/hang >+ pScriptHeader += 6; >+ } >+ >+ return true; >+ >+} >+ > // ----------------------------------------------------------------------- > // kerning stuff > // ----------------------------------------------------------------------- >diff --git a/vcl/source/glyphs/gcach_ftyp.hxx b/vcl/source/glyphs/gcach_ftyp.hxx >index 9dded55..fff9a06 100644 >--- a/vcl/source/glyphs/gcach_ftyp.hxx >+++ b/vcl/source/glyphs/gcach_ftyp.hxx >@@ -205,6 +205,7 @@ protected: > int ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_*, bool ) const; > virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const; > virtual bool GetFontCodeRanges( CmapResult& ) const; >+ virtual bool GetFontLayoutCapabilities(FontLayoutCapabilities &) const; > bool ApplyGSUB( const ImplFontSelectData& ); > virtual ServerFontLayoutEngine* GetLayoutEngine(); > >diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx >index ed3396e..233b915 100644 >--- a/vcl/unx/headless/svpgdi.hxx >+++ b/vcl/unx/headless/svpgdi.hxx >@@ -90,6 +90,7 @@ public: > virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); > virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ); > virtual ImplFontCharMap* GetImplFontCharMap() const; >+ virtual bool GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const; > virtual void GetDevFontList( ImplDevFontList* ); > virtual void GetDevFontSubstList( OutputDevice* ); > virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); >diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx >index 7c3df8b..b014081 100644 >--- a/vcl/unx/headless/svppspgraphics.cxx >+++ b/vcl/unx/headless/svppspgraphics.cxx >@@ -696,6 +696,13 @@ ImplFontCharMap* PspGraphics::GetImplFontCharMap() const > return new ImplFontCharMap( aCmapResult ); > } > >+bool PspGraphics::GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const >+{ >+ if (!m_pServerFont[0]) >+ return NULL; >+ return !m_pServerFont[0]->GetFontLayoutCapabilities(rGetImplFontLayoutCapabilities); >+} >+ > USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) > { > // release all fonts that are to be overridden >diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx >index a438ef3..095f294 100644 >--- a/vcl/unx/headless/svppspgraphics.hxx >+++ b/vcl/unx/headless/svppspgraphics.hxx >@@ -109,6 +109,7 @@ public: > virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); > virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ); > virtual ImplFontCharMap* GetImplFontCharMap() const; >+ virtual bool GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const; > virtual void GetDevFontList( ImplDevFontList* ); > virtual void GetDevFontSubstList( OutputDevice* ); > virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); >diff --git a/vcl/unx/headless/svptext.cxx b/vcl/unx/headless/svptext.cxx >index 8701a7f..de746eb 100644 >--- a/vcl/unx/headless/svptext.cxx >+++ b/vcl/unx/headless/svptext.cxx >@@ -284,6 +284,14 @@ ImplFontCharMap* SvpSalGraphics::GetImplFontCharMap() const > return new ImplFontCharMap( aCmapResult ); > } > >+bool SvpSalGraphics::GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const >+{ >+ if (!m_pServerFont[0]) >+ return NULL; >+ >+ return !m_pServerFont[0]->GetFontLayoutCapabilities( rGetImplFontLayoutCapabilities); >+} >+ > // --------------------------------------------------------------------------- > > void SvpSalGraphics::GetDevFontList( ImplDevFontList* pDevFontList ) >diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h >index 275c3a9..16f206e 100644 >--- a/vcl/unx/inc/pspgraphics.h >+++ b/vcl/unx/inc/pspgraphics.h >@@ -106,6 +106,7 @@ public: > virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); > virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* ); > virtual ImplFontCharMap* GetImplFontCharMap() const; >+ virtual bool GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const; > virtual void GetDevFontList( ImplDevFontList* ); > virtual void GetDevFontSubstList( OutputDevice* ); > virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); >diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h >index 938e220..cf67715 100644 >--- a/vcl/unx/inc/salgdi.h >+++ b/vcl/unx/inc/salgdi.h >@@ -257,6 +257,7 @@ public: > virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); > virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* ); > virtual ImplFontCharMap* GetImplFontCharMap() const; >+ virtual bool GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const; > virtual void GetDevFontList( ImplDevFontList* ); > virtual void GetDevFontSubstList( OutputDevice* ); > virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); >diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx >index 5c30d53..0b6db67 100644 >--- a/vcl/unx/source/gdi/pspgraphics.cxx >+++ b/vcl/unx/source/gdi/pspgraphics.cxx >@@ -780,6 +780,13 @@ ImplFontCharMap* PspGraphics::GetImplFontCharMap() const > return new ImplFontCharMap( aCmapResult ); > } > >+bool PspGraphics::GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const >+{ >+ if (!m_pServerFont[0]) >+ return NULL; >+ return !m_pServerFont[0]->GetFontLayoutCapabilities(rGetImplFontLayoutCapabilities); >+} >+ > USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) > { > // release all fonts that are to be overridden >diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx >index 767c91d..50aec52 100644 >--- a/vcl/unx/source/gdi/salgdi3.cxx >+++ b/vcl/unx/source/gdi/salgdi3.cxx >@@ -1499,6 +1499,13 @@ ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const > return new ImplFontCharMap( aCmapResult ); > } > >+bool X11SalGraphics::GetImplFontLayoutCapabilities(FontLayoutCapabilities &rGetImplFontLayoutCapabilities) const >+{ >+ if (!mpServerFont[0]) >+ return NULL; >+ return !mpServerFont[0]->GetFontLayoutCapabilities(rGetImplFontLayoutCapabilities); >+} >+ > // ---------------------------------------------------------------------------- > // > // SalGraphics
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 33510
:
42752
| 42777 |
42987