void (@NotNull final StringBuilder holder, final int maxLength) { holder.append(HEADER_PREFIX); holder.append("{\\colortbl;"); ColorRegistry colorRegistry = mySyntaxInfo.getColorRegistry(); for (int id : colorRegistry.getAllIds()) { Color color = colorRegistry.dataById(id); int[] components = getAdjustedColorComponents(color); holder.append(String.format("\\red%d\\green%d\\blue%d;", components[0], components[1], components[2])); } holder.append("}\n"); holder.append("{\\fonttbl"); FontNameRegistry fontNameRegistry = mySyntaxInfo.getFontNameRegistry(); for (int id : fontNameRegistry.getAllIds()) { String fontName = fontNameRegistry.dataById(id); holder.append("{\\f").append(id); if (FontMapper.isMonospaced(fontName)) { holder.append("\\fmodern"); } holder.append(' ').append(fontName).append(";}"); } holder.append("}\n"); holder.append("\n\\s0\\box") .append("\\cbpat").append(mySyntaxInfo.getDefaultBackground()) .append("\\cb").append(mySyntaxInfo.getDefaultBackground()) .append("\\cf").append(mySyntaxInfo.getDefaultForeground()); addFontSize(holder, mySyntaxInfo.getFontSize()); holder.append('\n'); mySyntaxInfo.processOutputInfo(new MyVisitor(holder, myRawText, mySyntaxInfo, maxLength)); holder.append("\\par"); holder.append(HEADER_SUFFIX); }