iTextSharp.text.Font.IsStandardFont C# (CSharp) Метод

IsStandardFont() публичный Метод

Checks if the properties of this font are undefined or null.

If so, the standard should be used.

public IsStandardFont ( ) : bool
Результат bool
        public virtual bool IsStandardFont() {
            return (family == UNDEFINED
                && size == UNDEFINED
                && style == UNDEFINED
                && color == null
                && baseFont == null);
        }
    

Usage Example

Пример #1
0
        // overriding some of the ArrayList-methods

        /// <summary>
        /// Adds a Chunk, an Anchor or another Phrase
        /// to this Phrase.
        /// </summary>
        /// <param name="index">index at which the specified element is to be inserted</param>
        /// <param name="o">an object of type Chunk, Anchor, or Phrase</param>
        public virtual void Add(int index, Object o)
        {
            if (o == null)
            {
                return;
            }
            try {
                IElement element = (IElement)o;
                if (element.Type == Element.CHUNK)
                {
                    Chunk chunk = (Chunk)element;
                    if (!font.IsStandardFont())
                    {
                        chunk.Font = font.Difference(chunk.Font);
                    }
                    base.Insert(index, chunk);
                }
                else if (element.Type == Element.PHRASE ||
                         element.Type == Element.ANCHOR ||
                         element.Type == Element.ANNOTATION ||
                         element.Type == Element.TABLE || // line added by David Freels
                         element.Type == Element.GRAPHIC)
                {
                    base.Insert(index, element);
                }
                else
                {
                    throw new Exception(element.Type.ToString());
                }
            }
            catch (Exception cce) {
                throw new Exception("Insertion of illegal Element: " + cce.Message);
            }
        }
All Usage Examples Of iTextSharp.text.Font::IsStandardFont