Esempio n. 1
0
 virtual public void ResolveSingleQuotedFontFamily() {
     Tag t = new Tag(null);
     t.CSS["color"] = "#000000";
     t.CSS["font-family"] = "'Helvetica'";
     t.CSS["font-size"] = "12pt";
     Chunk c = new Chunk("default text for chunk creation");
     applier.Apply(c, t);
     Assert.AreEqual("Helvetica", c.Font.Familyname);
 }
Esempio n. 2
0
 /**
  * @param e
  * @param t
  * @param ctx
  * @return the element with CSS applied onto
  */
 public IElement Apply(IElement e, Tag t, IMarginMemory mm, IPageSizeContainable psc, IImageProvider ip)
 {
     // warning, mapping is done by instance of, make sure to add things in the right order when adding more.
     if (e is Chunk)   // covers TabbedChunk & Chunk
     {
         e = chunk.Apply((Chunk)e, t);
     }
     else if (e is Paragraph)
     {
         e = paragraph.Apply((Paragraph)e, t, mm);
     }
     else if (e is NoNewLineParagraph)
     {
         e = nonewlineparagraph.Apply((NoNewLineParagraph)e, t, mm);
     }
     else if (e is HtmlCell)
     {
         e = htmlcell.Apply((HtmlCell)e, t, mm, psc);
     }
     else if (e is List)
     {
         e = list.Apply((List)e, t, ip);
     }
     else if (e is LineSeparator)
     {
         e = lineseparator.Apply((LineSeparator)e, t, psc);
     }
     else if (e is iTextSharp.text.Image)
     {
         e = image.Apply((iTextSharp.text.Image)e, t);
     }
     return(e);
 }
Esempio n. 3
0
 virtual public void SetUp()
 {
     LoggerFactory.GetInstance().SetLogger(new SysoLogger(3));
     t = new Tag(null);
     t.CSS["color"]       = "#000000";
     t.CSS["font-family"] = "Helvetica";
     t.CSS["font-size"]   = "12pt";
     c = new Chunk("default text for chunk creation");
     applier.Apply(c, t);
 }