all files / fontkit/src/opentype/ GlyphInfo.coffee

100% Statements 12/12
100% Branches 0/0
100% Functions 2/2
100% Lines 12/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19       222× 222×   222× 222× 104×   222× 222× 222× 222×    
unicode = require 'unicode-properties'
 
class GlyphInfo
  constructor: (@id, @codePoints = [], features = []) ->
    # TODO: get this info from GDEF if available
    @isMark = @codePoints.every unicode.isMark
    @isLigature = @codePoints.length > 1
    
    @features = {}
    for feature in features
      @features[feature] = true
      
    @ligatureID = null
    @ligatureComponent = null
    @cursiveAttachment = null
    @markAttachment = null
    
module.exports = GlyphInfo