private Phrase ComposePhrase(String text, BaseFont ufont, Color color, float fontSize) {
Phrase phrase = null;
if (extensionFont == null && (substitutionFonts == null || substitutionFonts.Count == 0))
phrase = new Phrase(new Chunk(text, new Font(ufont, fontSize, 0, color)));
else {
FontSelector fs = new FontSelector();
fs.AddFont(new Font(ufont, fontSize, 0, color));
if (extensionFont != null)
fs.AddFont(new Font(extensionFont, fontSize, 0, color));
if (substitutionFonts != null) {
foreach (BaseFont bf in substitutionFonts) {
fs.AddFont(new Font(bf, fontSize, 0, color));
}
}
phrase = fs.Process(text);
}
return phrase;
}