Code coverage report for fontkit/src/glyph/WOFF2Glyph.coffee

Statements: 100% (5 / 5)      Branches: 100% (0 / 0)      Functions: 100% (3 / 3)      Lines: 100% (5 / 5)      Ignored: none     

All files » fontkit/src/glyph/ » WOFF2Glyph.coffee
1 2 3 4 5 6 7 8 9 10 11 12 13 141         1   1     1   1  
TTFGlyph = require './TTFGlyph'
 
# This is a subclass of TTFGlyph for WOFF2, where the decoding is different
# for simple glyphs. We have to do this ahead of time (it's done in WOFF2Font)
# so this class just returns the pre-decoded glyph data.
class WOFF2Glyph extends TTFGlyph
  _decode: ->
    return @_font._transformedGlyphs[@id]
    
  _getCBox: ->
    return @path.bbox
    
module.exports = WOFF2Glyph