Changeset 458


Ignore:
Timestamp:
02/14/09 13:47:16 (4 years ago)
Author:
tal
Message:
Mistake in the way kerning is handled if glyph records are not given during set.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/defconAppKit/trunk/Lib/defconAppKit/controls/glyphLineView.py

    r457 r458  
    505505        previousGlyph = None 
    506506        previousFont = None 
    507         for glyphRecord in glyphRecords: 
    508             glyphRecord.xPlacement = 0 
     507        for index, glyphRecord in enumerate(glyphRecords): 
    509508            glyph = glyphRecord.glyph 
    510509            font = glyph.getParent() 
    511510            if previousGlyph is not None and font is not None and (previousFont == font): 
    512511                kern = font.kerning.get((previousGlyph.name, glyph.name)) 
    513                 glyphRecord.xPlacement = kern 
     512                if kern is None: 
     513                    kern = 0 
     514                glyphRecords[index - 1].xAdvance = kern 
    514515            previousGlyph = glyph 
    515516            previousFont = font 
     
    528529                if not hasattr(glyphs[0], attr): 
    529530                    needToWrap = True 
     531                    break 
    530532        # wrap into glyph records if necessary 
    531533        if needToWrap: 
Note: See TracChangeset for help on using the changeset viewer.