BDF: AVERAGE_WIDTH includes values that otf2bdf nullifies first

Bug #860635 reported by Paul Sladen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
otf2bdf (Ubuntu)
New
Undecided
Unassigned

Bug Description

The AVERAGE_WIDTH in a BDF font always tends to be under what it should be. This appears to be caused by an interaction of the code:

        /*
         * If the glyph is actually an empty bitmap, set the size to 0 all
         * around.
         */
        if (sx == 0xffff && sy == 0xffff && ex == 0 && ey == 0)
          sx = ex = sy = ey = 0;

with the subsequent:

          /*
         * Adjust the font bounding box.
         */
        wd = ex - sx;
        ht = ey - sy;

then:

        /*
         * Add to the average width accumulator.
         */
        aw += wd;

In the case of an empty cell, otf2bdf overrides the width of the cell to zero, and then adds the zero figure to the accumulator. Ideally the real advance width should be added to the accumulator, rather than the nullified one.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.