// Set up the styling engine with the applicable style sheets.
FormatStylingEngine formatStylingEngine =
formatRendererContext.getFormatStylingEngine();
// First add the layout style sheet into the styling engine.
formatStylingEngine.pushStyleSheet(layoutStyleSheet);
// Then add the theme style sheet(s) into the styling engine.
CompiledStyleSheetCollection themeStyleSheets =
context.getThemeStyleSheets();
if (themeStyleSheets != null) {
themeStyleSheets.pushAll(formatStylingEngine);