* be separately sent to GDI.
* This works for standard composite fonts, alternate ones,
* Fonts that are a physical font backed by a standard composite,
* and with fallback fonts.
*/
CompositeFont compFont = (CompositeFont)font2D;
float userx = x, usery = y;
float devx = devpos.x, devy = devpos.y;
int start = 0, end = 0, slot = 0;
while (end < numGlyphs) {
start = end;
slot = glyphCodes[start] >>> 24;
while (end < numGlyphs && ((glyphCodes[end] >>> 24) == slot)) {
end++;
}
/* If we can't get the font, bail to outlines.
* But we should always be able to get all fonts for
* Composites, so this is unlikely, so any overstriking
* if only one slot is unavailable is not worth worrying
* about.
*/
PhysicalFont slotFont = compFont.getSlotFont(slot);
if (!(slotFont instanceof TrueTypeFont)) {
return false;
}
String family = slotFont.getFamilyName(null);
int style = font.getStyle() | slotFont.getStyle();