internal void copyFrom(RtfCharFormat src)
 {
     if (src == null)
     {
         return;
     }
     _begin = src._begin;
     _end   = src._end;
     if (_font == null && src._font != null)
     {
         _font = new FontDescriptor(src._font.Value);
     }
     if (_ansiFont == null && src._ansiFont != null)
     {
         _ansiFont = new FontDescriptor(src._ansiFont.Value);
     }
     if (_fontSize < 0 && src._fontSize >= 0)
     {
         _fontSize = src._fontSize;
     }
     if (_fontStyle.IsEmpty && !src._fontStyle.IsEmpty)
     {
         _fontStyle = new FontStyle(src._fontStyle);
     }
     if (_bgColor == null && src._bgColor != null)
     {
         _bgColor = new ColorDescriptor(src._bgColor.Value);
     }
     if (_fgColor == null && src._fgColor != null)
     {
         _fgColor = new ColorDescriptor(src._fgColor.Value);
     }
 }
 internal RtfCharFormat(int begin, int end, int textLength)
 {
     // Note:
     // In the condition that ``_begin == _end == -1'',
     // the character formatting is applied to the whole paragraph.
     _begin         = -1;
     _end           = -1;
     _font          = null; // do not specify font (use default one)
     _ansiFont      = null; // do not specify font (use default one)
     _fontSize      = -1;   // do not specify font size (use default one)
     _fontStyle     = new FontStyle();
     _bgColor       = null;
     _fgColor       = null;
     _twoInOneStyle = TwoInOneStyle.NotEnabled;
     _bookmark      = "";
     setRange(begin, end, textLength);
 }