2 *******************************************************************************
3 * Copyright (C) 2002-2004, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
8 package com.ibm.icu.dev.tool.layout;
11 class Feature extends TaggedRecord
13 private int[] lookupIndices;
14 private int lookupCount;
15 private int featureIndex;
17 public Feature(String theFeatureTag)
21 lookupIndices = new int[10];
26 public void addLookup(int theLookupIndex)
28 if (lookupCount >= lookupIndices.length) {
29 int[] newLookupIndices = new int[lookupIndices.length + 5];
31 System.arraycopy(lookupIndices, 0, newLookupIndices, 0, lookupIndices.length);
32 lookupIndices = newLookupIndices;
35 lookupIndices[lookupCount] = theLookupIndex;
39 public void writeFeature(OpenTypeTableWriter writer)
41 writer.writeData(0); // featureParams (must be NULL)
43 writer.writeData(lookupCount);
45 for (int i = 0; i < lookupCount; i += 1) {
46 writer.writeData(lookupIndices[i]);
50 public int getFeatureIndex()
55 public void setFeatureIndex(int index)