use of com.xenoage.zong.musicxml.types.util.MxlPrintStyleContent in project Zong by Xenoage.
the class FontInfoReader method read.
/**
* Reads the font from the given element, if it is a {@link MxlPrintStyleContent} element
* and contains font information. The returned font is based on the given default font.
*/
@MaybeNull
public static FontInfo read(Object printStyleElement, FontInfo defaultFont) {
if (false == printStyleElement instanceof MxlPrintStyleContent)
return null;
MxlPrintStyle mxlPrintStyle = ((MxlPrintStyleContent) printStyleElement).getPrintStyle();
MxlFont mxlFont = mxlPrintStyle.getFont();
return new FontInfoReader(mxlFont, defaultFont).read();
}
Aggregations