all files / fontkit/src/tables/ CPAL.coffee

100% Statements 3/3
100% Branches 0/0
100% Functions 0/0
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16                          
r = require 'restructure'
 
ColorRecord = new r.Struct
  blue: r.uint8
  green: r.uint8
  red: r.uint8
  alpha: r.uint8
 
module.exports = new r.Struct
  version: r.uint16
  numPaletteEntries: r.uint16
  numPalettes: r.uint16
  numColorRecords: r.uint16
  colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords'))
  colorRecordIndices: new r.Array(r.uint16, 'numPalettes')