/** * Adds a font record to this workbook. If the FontRecord passed in has not * been initialized, then its font index is determined based upon the size * of the fonts list. The FontRecord's initialized method is called, and * it is added to the list of fonts. * * @param f the font to add */ public void addFont(FontRecord f) { if (!f.isInitialized()) { int pos = fonts.Count; // Remember that the pos with index 4 is skipped if (pos >= 4) pos++; f.initialize(pos); fonts.Add(f); } }
/** * Adds a font record to this workbook. If the FontRecord passed in has not * been initialized, then its font index is determined based upon the size * of the fonts list. The FontRecord's initialized method is called, and * it is added to the list of fonts. * * @param f the font to add */ public void addFont(FontRecord f) { if (!f.isInitialized()) { int pos = fonts.Count; // Remember that the pos with index 4 is skipped if (pos >= 4) { pos++; } f.initialize(pos); fonts.Add(f); } }