Ejemplo n.º 1
0
        SizeF Interface2.Measure(Class196 dc)
        {
            SizeF  ef  = new SizeF();
            string str = char.ConvertFromUtf32(this.CharacterCode);

            Spire.Doc.Formatting.CharacterFormat characterFormat = this.CharacterFormat;
            if ((!this.CharacterFormat.HasValue(0) && (this.FontName != string.Empty)) && (this.FontName != this.CharacterFormat.FontName))
            {
                characterFormat = new Spire.Doc.Formatting.CharacterFormat(base.Document);
                characterFormat.ImportContainer(this.CharacterFormat);
                characterFormat.method_21(this.CharacterFormat);
                characterFormat.ApplyBase(base.method_28().BreakCharacterFormat.BaseFormat);
                characterFormat.FontSize = this.CharacterFormat.FontSize;
                characterFormat.FontName = this.FontName;
            }
            if (this.CharacterFormat.IsSmallCaps)
            {
                ef = dc.method_1() ? dc.method_310(str, dc.method_376(characterFormat), null, true) : dc.method_317(str, dc.method_365(characterFormat), null, true);
            }
            else
            {
                ef = dc.method_1() ? dc.method_309(str, dc.method_376(characterFormat), null) : dc.method_316(str, dc.method_365(characterFormat), null);
            }
            ef.Height       = this.CharacterFormat.FontSize;
            characterFormat = null;
            return(ef);
        }
Ejemplo n.º 2
0
        internal TextRange method_30()
        {
            TextRange range = new TextRange(base.Document);
            string    str   = char.ConvertFromUtf32(this.CharacterCode);

            Spire.Doc.Formatting.CharacterFormat characterFormat = range.CharacterFormat;
            characterFormat.ImportContainer(this.CharacterFormat);
            characterFormat.method_21(this.CharacterFormat);
            if ((!this.CharacterFormat.HasValue(0) && !string.IsNullOrEmpty(this.FontName)) && (this.FontName != this.CharacterFormat.FontName))
            {
                characterFormat.ApplyBase(base.method_28().BreakCharacterFormat.BaseFormat);
                characterFormat.FontSize = this.CharacterFormat.FontSize;
            }
            range.Text = str;
            range.method_0(base.Owner);
            return(range);
        }