| Summary: | PS DDX's PS Type3 font converter uses FreeType internals | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | xprint | Reporter: | Roland Mainz <roland.mainz> | ||||||
| Component: | Server: DDX: PostScript | Assignee: | Roland Mainz <roland.mainz> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | critical | ||||||||
| Priority: | high | CC: | bugzilla, cyamauch, dberkholz, dparsons, eich, idr | ||||||
| Version: | unspecified | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| i915 platform: | i915 features: | ||||||||
| Attachments: |
|
||||||||
Discussion of this issue can be found at http://lists.gnu.org/archive/html/freetype-devel/2006-01/msg00060.html The general idea is to use face->bbox instead of the underlying font_bbox. Those values will need to be multiplied by 65536 to get the scaling right. Drew I now have a patch against X.org 7 for this problem. In the course of testing it, I discovered a bug in lib/Xfont, namely that BUILD_FREETYPE had not been replaced by the new XFONT_FREETYPE in Xfont/src/fontfile/ffcheck.c. Similarly, there is a redundant reference to BUILD_FREETYPE in Xfont/src/fontfile/register.c l.69, which is used to define XFONT_FREETYPE. BUILD_FREETYPE no longer exists in the modular build of Xfont, it has been replaced by XFONT_FREETYPE. Therefore the block there at l.69 should be deleted I think. I have not done this in the attached patch myself, however. Please remove it if you agree it's not needed. Created attachment 4460 [details] [review] clears use of FT internals, switches on FT support in Xprint This patch a) switches on Freetype support in Xprint (PS driver). b) fixes usage of Freetype internals psout_ftpstype3.c Note that it not a complete fix for full freetype support. Remaining issues are 1) use of ttf2pt1 by the type1 handler 2) use of lib/XFont/src/FreeType/ftfuncs.h, not exported by the Xfont module To build Xprt without freetype support, use --disable-freetype in the autogen step. Created attachment 4461 [details] [review] updates lib/Xfont BUILD_FREETYPE to XFONT_FREETYPE This patch updates fontfile/ffcheck.c in lib/Xfont. I also recommend removing the BUILD_FREETYPE block at l.69 in fontfile/register.c drew, I've committed your two new patches now. note that this is not an endorsement or otherwise of CVS access, just that I didn't notice this bug with the outstanding patch 'till now. cheers. Thanks, Daniel. Nice you caught the other BUILD_ -> XFONT_ updates too. *** Bug 6450 has been marked as a duplicate of this bug. *** Any reason this bug isn't marked fixed? The original bug is apparently gone / fixed. If problems are seen here again, please open a new bug. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
The PostScript DDX's PS Type3 font converter currently depends on FreeType internals - which is bad when Xprt links against shared library versions of libfreetype.so. The code can be found in xc/programs/Xserver/Xprint/ps/psout_ftpstype3.c, just follow the |USE_FT_INTERNALS| define. The main part looks like this: -- snip -- #ifdef USE_FT_INTERNALS static FT_BBox * FT_Get_PS_Font_BBox( FT_Face face ) { const char *driver_name; FT_BBox *font_bbox = NULL; if ( face && face->driver && face->driver->root.clazz ) { driver_name = face->driver->root.clazz->module_name; if ( ft_strcmp( driver_name, "type1" ) == 0 ) font_bbox = &(((T1_Face)face)->type1.font_bbox); else if ( ft_strcmp( driver_name, "t1cid" ) == 0 ) font_bbox = &(((CID_Face)face)->cid.font_bbox); else if ( ft_strcmp( driver_name, "type42" ) == 0 ) font_bbox = &(((T42_Face)face)->type1.font_bbox); } return font_bbox; } #endif /* USE_FT_INTERNALS */ -- snip -- Egbert/Chisato: Any idea how |FT_Get_PS_Font_BBox| can be changed that only "public" FreeType APIs are used ?