def getCharStringForGlyph(self, glyph, private, globalSubrs):
        """
        Get a Type2CharString for the *glyph*

        **This should not be called externally.** Subclasses
        may override this method to handle the charstring creation
        in a different way if desired.
        """
        width = glyph.width
        defaultWidth = private.defaultWidthX
        nominalWidth = private.nominalWidthX
        if width == defaultWidth:
            # if width equals the default it can be omitted from charstring
            width = None
        else:
            # subtract the nominal width
            width -= nominalWidth
        if width is not None:
            width = otRound(width)
        pen = T2CharStringPen(width, self.allGlyphs,
                              roundTolerance=self.roundTolerance)
        glyph.draw(pen)
        charString = pen.getCharString(
            private, globalSubrs, optimize=self.optimizeCFF
        )
        return charString
def getCharStringForGlyph ( self , glyph , private , globalSubrs ) : width = glyph . width defaultWidth = private . defaultWidthX nominalWidth = private . nominalWidthX if width == defaultWidth : width = None else : width -= nominalWidth if width is not None : width = otRound ( width ) pen = T2CharStringPen ( width , self . allGlyphs , roundTolerance = self . roundTolerance ) glyph . draw ( pen ) charString = pen . getCharString ( private , globalSubrs , optimize = self . optimizeCFF ) return charString
Get a Type2CharString for the *glyph*

        **This should not be called externally.** Subclasses
        may override this method to handle the charstring creation
        in a different way if desired.