iTextSharp.text.SpecialSymbol.Get C# (CSharp) Метод

Get() публичный статический Метод

public static Get ( char c, Font font ) : Chunk
c char
font Font
Результат Chunk
        public static Chunk Get(char c, Font font)
        {
            char greek = SpecialSymbol.GetCorrespondingSymbol(c);
            if (greek == ' ') {
                return new Chunk(c.ToString(), font);
            }
            Font symbol = new Font(Font.FontFamily.SYMBOL, font.Size, font.Style, font.Color);
            return new Chunk(greek.ToString(), symbol);
        }

Usage Example

Пример #1
0
 /**
  * Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
  *
  * @param    o   the object to add.
  * @return true if adding the object succeeded
  */
 public override bool Add(Object o)
 {
     if (o is ListItem)
     {
         ListItem item = (ListItem)o;
         Chunk    chunk;
         if (greeklower)
         {
             chunk = SpecialSymbol.Get((char)(first + list.Count + 944), symbol.Font);
         }
         else
         {
             chunk = SpecialSymbol.Get((char)(first + list.Count + 912), symbol.Font);
         }
         chunk.Append(".");
         item.ListSymbol       = chunk;
         item.IndentationLeft  = symbolIndent;
         item.IndentationRight = 0;
         list.Add(item);
         return(true);
     }
     else if (o is List)
     {
         List nested = (List)o;
         nested.IndentationLeft = nested.IndentationLeft + symbolIndent;
         first--;
         list.Add(nested);
         return(true);
     }
     else if (o is string)
     {
         return(this.Add(new ListItem((string)o)));
     }
     return(false);
 }