}
private DefineFont getDefineFont(FontDescription fontDesc,
List<Serializable> locations, Map<String, Object> args) throws TranscoderException
{
FontManager fontManager = fontsConfig.getTopLevelManager();
int defineFontTag = TagValues.stagDefineFont3;
DefineFont defineFont = null;
for (Iterator<Serializable> it = locations.iterator(); it.hasNext();)
{
Object fontSource = it.next();
try
{
// For now, keep the Flex 3 behavior of throwing errors for each
// location when no FontManager exists.
if (fontManager == null)
throw new NoFontManagerException();
fontDesc.source = fontSource;
defineFont = fontManager.createDefineFont(defineFontTag, fontDesc);
}
catch (FontManager.InvalidUnicodeRangeException e)
{
// For now, keep the Flex 3 error message for invalid unicode
// ranges...