예제 #1
0
        /**
         * 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);
                }
        }
예제 #2
0
파일: Fonts.cs 프로젝트: morninn/PetSof
        /**
         * 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);
            }
        }