[Xbae-discuss] [ xbae-Bugs-850756 ] Wrong column widths when using fontsets
Brought to you by:
dannybackx
From: SourceForge.net <no...@so...> - 2003-11-28 14:53:36
|
Bugs item #850756, was opened at 2003-11-28 16:15 Message generated for change (Comment added) made by evgeny You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=401980&aid=850756&group_id=31337 Category: Bugs Group: None Status: Open Resolution: None Priority: 5 Submitted By: Evgeny Stambulchik (evgeny) Assigned to: Nobody/Anonymous (nobody) Summary: Wrong column widths when using fontsets Initial Comment: When the Xbae fonList resource is a fontset, the column widths are calculated wrongly (too wide in my case). Probably related to a recent posting to the mailing list WRT to a Grace problem, in which case the columns are too narrow (only few pixels wide). See the attached screenshot of running ./matrix -xrm "Matrix*fontList:-*-helvetica-medium-r-normal-*-12-*" (left) versus ./matrix -xrm "Matrix*fontList:-*-helvetica-medium-r-normal-*-12-*:" (right) ---------------------------------------------------------------------- >Comment By: Evgeny Stambulchik (evgeny) Date: 2003-11-28 16:53 Message: Logged In: YES user_id=27019 Looking at Create.c, the culprit is the if (type == XmFONT_IS_FONTSET) in two places (the cell and the label fonts). While for fonts, the char width is calculated as an average between the max and min glyph widths, for fontsets, just the max value is used. Since the .fid field is anyway used that of the first font in the set, probably the same (avg) algorithm can be used in the fontset case, using the first font entry values. (BTW, is XFontsOfFontSet garanteed to return at least one font? fonts[0] is accessed without checking it). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=401980&aid=850756&group_id=31337 |