lib/ttf/tables/gsub.js
function createFeatureList() {
  var header = (0
    + 2 // FeatureCount
    + 4 // FeatureTag[0]
    + 2 // Feature Offset[0]
  );

  var length = (0
    + header
    + 2 // FeatureParams[0]
    + 2 // LookupCount[0]
    + 2 // Lookup[0] LookupListIndex[0]
  );

  var buffer = new ByteBuffer(length);

  // FeatureCount
  buffer.writeUint16(1);
  // FeatureTag[0]
  buffer.writeUint32(identifier('liga'));
  // Feature Offset[0]
  buffer.writeUint16(header);
  // FeatureParams[0]
  buffer.writeUint16(0);
  // LookupCount[0]
  buffer.writeUint16(1);
  // Index into lookup table. Since we only have ligatures, the index is always 0
  buffer.writeUint16(0);

  return buffer;
}
function createFeatureList() {
  var header = (0
    + 2 // FeatureCount
    + 4 // FeatureTag[0]
    + 2 // Feature Offset[0]
  );

  var length = (0
    + header
    + 2 // FeatureParams[0]
    + 2 // LookupCount[0]
    + 2 // Lookup[0] LookupListIndex[0]
  );

  var buffer = new ByteBuffer(length);

  // FeatureCount
  buffer.writeUint16(1);
  // FeatureTag[0]
  buffer.writeUint32(identifier('liga'));
  // Feature Offset[0]
  buffer.writeUint16(header);
  // FeatureParams[0]
  buffer.writeUint16(0);
  // LookupCount[0]
  buffer.writeUint16(1);
  // Index into lookup table. Since we only have ligatures, the index is always 0
  buffer.writeUint16(0);

  return buffer;
}
function createFeatureList ( ) { var header = ( 0 + 2 // FeatureCount + 4 // FeatureTag[0] + 2 // Feature Offset[0] ) ; var length = ( 0 + header + 2 // FeatureParams[0] + 2 // LookupCount[0] + 2 // Lookup[0] LookupListIndex[0] ) ; var buffer = new ByteBuffer ( length ) ; // FeatureCount buffer . writeUint16 ( 1 ) ; // FeatureTag[0] buffer . writeUint32 ( identifier ( 'liga' ) ) ; // Feature Offset[0] buffer . writeUint16 ( header ) ; // FeatureParams[0] buffer . writeUint16 ( 0 ) ; // LookupCount[0] buffer . writeUint16 ( 1 ) ; // Index into lookup table. Since we only have ligatures, the index is always 0 buffer . writeUint16 ( 0 ) ; return buffer ; }
Write one feature containing all ligatures
Write one feature containing all ligatures