Commit: Re: patch -- xft printing stuff

From: Dom Lachowicz (doml@appligent.com)
Date: Fri Aug 02 2002 - 15:51:03 EDT

  • Next message: Christian Biesinger: "Re: patch -- xft printing stuff"

    Committed.

    patching file abi/src/af/xap/unix/xap_UnixPSGraphics.cpp
    Hunk #1 succeeded at 402 (offset 1 line).

    Checking in src/af/xap/unix/xap_UnixPSGraphics.cpp;
    /cvsroot/abi/src/af/xap/unix/xap_UnixPSGraphics.cpp,v <--
    xap_UnixPSGraphics.cpp
    new revision: 1.94; previous revision: 1.93
    done

    Dom

    On Fri, 2002-08-02 at 15:27, Joaquín Cuenca Abela wrote:
    > 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
    > cuenca@pacaterie.u-psud.fr
    > ----
    >

    > 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)



    This archive was generated by hypermail 2.1.4 : Fri Aug 02 2002 - 16:00:09 EDT