--- svx/source/items/textitem.cxx.orig	2007-06-28 02:31:25.000000000 +0800
+++ svx/source/items/textitem.cxx	2007-07-30 09:40:33.000000000 +0800
@@ -3717,7 +3717,7 @@ void SvxScriptSetItem::PutItemForScriptT
 {
 	USHORT nLatin, nAsian, nComplex;
 	GetWhichIds( nLatin, nAsian, nComplex );
-
+	
 	SfxPoolItem* pCpy = rItem.Clone();
 	if( SCRIPTTYPE_LATIN & nScriptType )
 	{
@@ -3726,8 +3726,19 @@ void SvxScriptSetItem::PutItemForScriptT
 	}
 	if( SCRIPTTYPE_ASIAN & nScriptType )
 	{
-		pCpy->SetWhich( nAsian );
-		GetItemSet().Put( *pCpy );
+		// #i73003#, if the font supports cjk lang, apply it.
+		sal_Bool bCJKFont = sal_True;
+		if ( rItem.ISA(SvxFontItem) )
+		{
+			Font aFont;
+			aFont.SetName(((SvxFontItem&)rItem).GetFamilyName());
+			bCJKFont = aFont.IsSupportCJK();
+		}
+		if( bCJKFont )
+		{
+			pCpy->SetWhich( nAsian );
+			GetItemSet().Put( *pCpy );
+		}
 	}
 	if( SCRIPTTYPE_COMPLEX & nScriptType )
 	{
--- svtools/inc/ctrlbox.hxx.orig	2007-01-23 19:44:18.000000000 +0800
+++ svtools/inc/ctrlbox.hxx	2007-07-30 09:40:33.000000000 +0800
@@ -384,6 +384,7 @@ private:
 	Image			maImageScalableFont;
 	BOOL			mbWYSIWYG;
 	BOOL			mbSymbols;
+	BOOL			mbOnlyListCJKFont; // #i73003#
 
 #ifdef _CTRLBOX_CXX
 	SVT_DLLPRIVATE void			ImplCalcUserItemSize();
--- svtools/source/control/ctrlbox.cxx.orig	2007-06-28 05:23:24.000000000 +0800
+++ svtools/source/control/ctrlbox.cxx	2007-07-30 09:40:33.000000000 +0800
@@ -61,6 +61,8 @@
 
 #include <vcl/i18nhelp.hxx>
 
+#define LB_EAST_NAME 112
+
 #define IMGTEXTSPACE    2
 #define EXTRAFONTSIZE   5
 
@@ -622,6 +624,8 @@ FontNameBox::FontNameBox( Window* pParen
     mpFontList = NULL;
     mbWYSIWYG = FALSE;
     mbSymbols = FALSE;
+	// #i73003#
+	mbOnlyListCJKFont = FALSE;
 }
 
 // -------------------------------------------------------------------
@@ -633,6 +637,13 @@ FontNameBox::FontNameBox( Window* pParen
     mpFontList = NULL;
     mbWYSIWYG = FALSE;
     mbSymbols = FALSE;
+	// #i73003#
+	mbOnlyListCJKFont = FALSE;
+	if( rResId.GetId() == LB_EAST_NAME )
+	{
+		mbOnlyListCJKFont = TRUE;
+	}
+	
 }
 
 // -------------------------------------------------------------------
@@ -696,6 +707,14 @@ void FontNameBox::Fill( const FontList* 
     for ( USHORT i = 0; i < nFontCount; i++ )
     {
         const FontInfo& rFontInfo = pList->GetFontName( i );
+		
+		// #i73003#
+		if( mbOnlyListCJKFont && (!rFontInfo.IsSupportCJK()) )
+		{
+			//Only list CJK font
+			continue;
+		}
+		
         ULONG nIndex = InsertEntry( rFontInfo.GetName() );
         if ( nIndex != LISTBOX_ERROR )
         {
--- vcl/inc/vcl/font.hxx.orig	2007-04-12 01:54:10.000000000 +0800
+++ vcl/inc/vcl/font.hxx	2007-07-30 09:40:34.000000000 +0800
@@ -156,6 +156,9 @@ public:
 	friend VCL_DLLPUBLIC SvStream&	operator<<( SvStream& rOStm, const Font& );
     
     static Font identifyFont( const void* pBuffer, sal_uInt32 nLen );
+
+	// #i73003#
+	BOOL IsSupportCJK() const;
 };
 
 #endif	// _VCL_FONT_HXX
--- vcl/source/gdi/font.cxx.orig	2007-07-05 16:39:18.000000000 +0800
+++ vcl/source/gdi/font.cxx	2007-07-30 09:40:34.000000000 +0800
@@ -61,7 +61,9 @@
 #endif
 
 #include <algorithm>
-
+#ifndef _PSPRINT_FONTMANAGER_HXX_
+#include <psprint/fontmanager.hxx>
+#endif
 // =======================================================================
 
 DBG_NAME( Font )
@@ -1073,6 +1075,17 @@ Font Font::identifyFont( const void* i_p
     return aResult;
 }
 
+// #i73003#
+BOOL Font::IsSupportCJK() const
+{
+	BOOL bRet = TRUE;
+	const String aFamilyName = GetName();
+	#ifdef UNX
+	bRet = ::psp::PrintFontManager::get().IsSupportCJK(aFamilyName);
+	#endif
+	return bRet;
+}
+
 // the inlines from the font.hxx header are now instantiated for pImpl-ification
 // TODO: reformat
 const Color& Font::GetColor() const { return mpImplFont->maColor; }
--- psprint/inc/psprint/fontmanager.hxx.orig	2007-07-31 11:35:11.000000000 +0800
+++ psprint/inc/psprint/fontmanager.hxx	2007-07-31 11:43:34.000000000 +0800
@@ -203,13 +203,15 @@ struct PrintFontInfo : public FastPrintF
     int                     				m_nDescend;
     int                     				m_nLeading;
     int                     				m_nWidth;
+	bool									m_bCJKSupport; // #i73003#
 
     PrintFontInfo() :
             FastPrintFontInfo(),
             m_nAscend( 0 ),
             m_nDescend( 0 ),
             m_nLeading( 0 ),
-            m_nWidth( 0 )
+            m_nWidth( 0 ),
+			m_bCJKSupport( 0 ) // #i73003#
     {}
 };
 
@@ -309,6 +311,7 @@ class PrintFontManager
         int											m_nYMax;
         bool										m_bHaveVerticalSubstitutedGlyphs;
         bool                                        m_bUserOverride;
+		bool										m_bCJKSupport; // #i73003#
 
         fcstatus::type                              m_eEmbeddedbitmap;
         fcstatus::type                              m_eAntialias;
@@ -748,6 +751,7 @@ public:
         const ByteString &rLangAttrib, italic::type eItalic, weight::type eWeight, 
         width::type eWidth, pitch::type ePitch) const;
     bool hasFontconfig() const { return m_bFontconfigSuccess; }
+    bool IsSupportCJK( const rtl::OUString& rFontName ); // #i73003#
 };
 
 } // namespace
--- psprint/source/fontmanager/fontmanager.cxx.orig	2007-07-31 11:35:11.000000000 +0800
+++ psprint/source/fontmanager/fontmanager.cxx	2007-07-31 11:45:49.000000000 +0800
@@ -392,6 +392,7 @@ PrintFontManager::PrintFont::PrintFont( 
         m_nYMax( 0 ),
         m_bHaveVerticalSubstitutedGlyphs( false ),
         m_bUserOverride( false ),
+  		m_bCJKSupport( false ), 
         m_eEmbeddedbitmap( fcstatus::isunset ),
         m_eAntialias( fcstatus::isunset )
 {
@@ -2027,6 +2028,9 @@ bool PrintFontManager::analyzeTrueTypeFi
         // get vertical substitutions flag
         pFont->m_bHaveVerticalSubstitutedGlyphs = DoesVerticalSubstitution( pTTFont, 1 );
 
+		// i#73003#, check for CJK capatibilies for the current font
+		pFont->m_bCJKSupport = (aInfo.ur2 & 0x08000000) >> 27 ;
+
         CloseTTFont( pTTFont );
         bSuccess = true;
     }
@@ -2789,6 +2793,7 @@ void PrintFontManager::fillPrintFontInfo
     rInfo.m_nDescend        = pFont->m_nDescend;
     rInfo.m_nLeading        = pFont->m_nLeading;
     rInfo.m_nWidth          = pFont->m_aGlobalMetricX.width < pFont->m_aGlobalMetricY.width ? pFont->m_aGlobalMetricY.width : pFont->m_aGlobalMetricX.width;
+	rInfo.m_bCJKSupport		= pFont->m_bCJKSupport; // #i73003#
 }
 
 // -------------------------------------------------------------------------
@@ -4141,3 +4146,22 @@ bool PrintFontManager::readOverrideMetri
     
     return true;
 }
+
+bool PrintFontManager::IsSupportCJK( const rtl::OUString& rFamilyName )
+{
+	bool bRet = true;
+	
+	for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
+	{
+		fontID nFont = it->first;
+		if( rFamilyName == getFontFamily(nFont) )
+		{
+			PrintFont* pFont = it->second;
+        	// might be a truetype font not yet analyzed
+        	if( pFont->m_eType == fonttype::TrueType )
+				analyzeTrueTypeFile( pFont );
+			return pFont->m_bCJKSupport;
+		}
+	}
+	return bRet;
+}
