if (fontFace == null)
FontManager.throwFontNotFound(font.alias, fontFamily, font.style, null);
}
FontBuilder builder = new FontBuilder(tagCode, fontFace, font.alias, font.advancedAntiAliasing);
// Add characters for unicode-range
int[][] ranges = getUnicodeRanges(font.unicodeRanges);
if (ranges != null)
{
for (int i = 0; i < ranges.length; i++)
{
int[] range = ranges[i];
if (range != null && range.length == 2)
{
int count = range[1] - range[0] + 1; // Inclusive range
builder.addCharset(range[0], count);
}
}
}
else
{
builder.addAllChars();
}
return (DefineFont)builder.build();
}