/** * Map a font family, for example "Century Gothic" in: * * font-family:"Century Gothic", Helvetica, Arial, sans-serif; * * to a w:rFonts object, for example: * * * * Assuming style font-family:"Century Gothic", Helvetica, Arial, sans-serif; * the first font family for which there is a mapping is the one * which will be used. * * xhtml-renderer's CSSName defaults font-family: serif * * It is your responsibility to ensure a suitable font is available * on the target system (or embedded in the docx package). If we * (eventually) support CSS @font-face, docx4j could do that * for you (at least for font formats we can convert to something * embeddable). * * @since 3.0 */ public static void addFontMapping(String cssFontFamily, RFonts rFonts) { fontFamilyToFont.put(cssFontFamily, rFonts); }