Code coverage report for fontkit/src/opentype/shapers/index.coffee

Statements: 100% (9 / 9)      Branches: 100% (2 / 2)      Functions: 100% (1 / 1)      Lines: 100% (8 / 8)      Ignored: none     

All files » fontkit/src/opentype/shapers/ » index.coffee
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 251 1 1   1                             1 19 19   1  
DefaultShaper = require './DefaultShaper'
ArabicShaper = require './ArabicShaper'
HangulShaper = require './HangulShaper'
 
SHAPERS =
  arab: ArabicShaper    # Arabic
  mong: ArabicShaper    # Mongolian
  syrc: ArabicShaper    # Syriac
  'nko ': ArabicShaper  # N'Ko
  phag: ArabicShaper    # Phags Pa
  mand: ArabicShaper    # Mandaic
  mani: ArabicShaper    # Manichaean
  phlp: ArabicShaper    # Psalter Pahlavi
  
  hang: HangulShaper    # Hangul
  
  latn: DefaultShaper   # Latin
  DFLT: DefaultShaper   # Default
 
exports.choose = (script) ->
  shaper = SHAPERS[script]
  return shaper if shaper
  
  return DefaultShaper