/// <summary>
/// Returns a Phrase that has been constructed taking in account
/// the value of some attributes.
/// </summary>
/// <param name="attributes">some attributes</param>
public Phrase(Properties attributes) : this("", FontFactory.GetFont(attributes))
{
this.Clear();
string value;
if ((value = attributes.Remove(ElementTags.LEADING)) != null)
{
Leading = float.Parse(value, System.Globalization.NumberFormatInfo.InvariantInfo);
}
else if ((value = attributes.Remove(MarkupTags.CSS_KEY_LINEHEIGHT)) != null)
{
Leading = MarkupParser.ParseLength(value);
}
if ((value = attributes.Remove(ElementTags.ITEXT)) != null)
{
Chunk chunk = new Chunk(value);
if ((value = attributes.Remove(ElementTags.GENERICTAG)) != null)
{
chunk.SetGenericTag(value);
}
Add(chunk);
}
if (attributes.Count > 0)
{
MarkupAttributes = attributes;
}
}