Bug 4381

Summary: Corrupted BDFs generated when using fstobdf on a X.org xfs
Product: xorg Reporter: Bastien Nocera <bugzilla>
Component: App/xfsAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: mharris
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: http://bugzilla.xfree.org/show_bug.cgi?id=93
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 5041    

Description Bastien Nocera 2005-09-07 04:08:27 UTC
The original bug report, including patch, is at:
http://bugzilla.xfree.org/show_bug.cgi?id=93

The bug fix (see below) has been merged to XFree86's tree, but not to X.org.

Patch needs to be applied in /xc/programs/fstobdf
--- chars.c.ori 2004-10-19 18:23:21.000000000 +0200
+++ chars.c     2004-10-20 12:21:06.000000000 +0200
@@ -213,7 +213,8 @@
          encoding=(chHigh << 8)+chLow;
        if ((charInfo->width != 0) || (charInfo->right != charInfo->left))
            EmitBitmap(outFile, fontHeader, charInfo, encoding, bpr, glyph);
-       glyph += (charInfo->descent + charInfo->ascent) * bpr;
+       glyph = glyphs +
+         offsets[encoding-((firstCharHigh << 8)+firstCharLow) + 1].position;
        charInfo++;
       }
     }
Comment 1 Mike A. Harris 2005-11-29 17:53:39 UTC
Just for future reference:  Patches that are cut and pasted into bug
reports almost never apply properly.  Cut and paste usually converts
tabs into spaces and all sorts of other fun that make the patch fail
until manually edited or completely redone by making manual edits to
the source files and regenerating a patch from scratch again.

Also, bugzilla can potentially word-wrap them, or do other fun things
to break them.

Please always attach patches as unified diffs directly as file
attachments that can be downloaded and applied to the source they
were made from, with much less chance of failures or fuzz.

Comment 2 Adam Jackson 2006-04-04 08:17:35 UTC
fixed in head, thanks.

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.