generated ps file don't contains anymore the embedded fonts.  I don't
know why (I will take a look later). At least now it doesn't crashes any
more when you try to print

Cheers,

-- 
Joaqu�n Cuenca Abela
[EMAIL PROTECTED]
diff -ru abi/src/af/xap/unix/xap_UnixPSGraphics.cpp abi_profile/src/af/xap/unix/xap_UnixPSGraphics.cpp
--- abi/src/af/xap/unix/xap_UnixPSGraphics.cpp	Tue Jul 16 10:12:57 2002
+++ abi_profile/src/af/xap/unix/xap_UnixPSGraphics.cpp	Fri Aug  2 21:10:10 2002
@@ -400,6 +401,34 @@
 	return NULL;
 }
 
+#ifdef USE_XFT
+/**
+ * Finds a font which match the family, style, variant, weight and size
+ * asked.  It will do a fuzzy match to find the font (using the aliases
+ * found in fonts.conf
+ */
+GR_Font * PS_Graphics::findFont(const char* pszFontFamily,
+								const char* pszFontStyle,
+								const char* pszFontVariant,
+								const char* pszFontWeight,
+								const char* pszFontStretch,
+								const char* pszFontSize)
+{
+	XAP_UnixFont* pUnixFont = XAP_UnixFontManager::findNearestFont(pszFontFamily, pszFontStyle, pszFontVariant, pszFontWeight,
+																   pszFontStretch, pszFontSize);
+
+	// bury the pointer to our Unix font in a XAP_UnixFontHandle with the correct size.
+	// This piece of code scales the FONT chosen at low resolution to that at high
+	// resolution. This fixes bug 1632 and other non-WYSIWYG behaviour.
+	UT_uint32 iSize = getAppropriateFontSizeFromString(pszFontSize);
+	XAP_UnixFontHandle* pFont = new XAP_UnixFontHandle(pUnixFont, iSize);
+	UT_ASSERT(pFont);
+
+	return pFont;
+}
+
+#else
+
 GR_Font* PS_Graphics::findFont(const char* pszFontFamily, 
 							   const char* pszFontStyle, 
 							   const char* /* pszFontVariant */,
@@ -497,6 +526,7 @@
 	
 	return pFont;
 }
+#endif // USE_XFT
 
 #ifndef WITH_PANGO
 void PS_Graphics::drawGlyph(UT_uint32 Char, UT_sint32 xoff, UT_sint32 yoff)

Reply via email to