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); }
/** * @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); }
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); }