Changeset 708 for trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/WordprocessingMLPackage.java
- Timestamp:
- 03/21/09 21:01:38 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/WordprocessingMLPackage.java
r695 r708 36 36 import org.apache.log4j.Logger; 37 37 import org.docx4j.convert.out.xmlPackage.XmlPackage; 38 import org.docx4j.fonts. Substituter;38 import org.docx4j.fonts.Mapper; 39 39 import org.docx4j.fonts.FontUtils; 40 40 import org.docx4j.jaxb.Context; … … 244 244 245 245 246 247 public void setFontSubstituter(Substituter fs) throws Exception { 248 if (fs == null) { 246 /* There should be a mapper per document, 247 * but PhysicalFonts should be system wide. 248 * 249 * The only way PhysicalFonts will change 250 * is if fonts are added/removed while 251 * docx4j is executing (which can happen eg if an 252 * obfuscated font part is read) 253 */ 254 255 public void setFontMapper(Mapper fm) throws Exception { 256 if (fm == null) { 249 257 throw new IllegalArgumentException("Font Substituter cannot be null."); 250 258 } … … 254 262 // 2. For each font, find the closest match on the system (use OO's VCL.xcu to do this) 255 263 // - do this in a general way, since docx4all needs this as well to display fonts 256 font Substituter = fs;264 fontMapper = fm; 257 265 org.docx4j.wml.Fonts fonts = null; 258 266 FontTablePart fontTablePart= this.getMainDocumentPart().getFontTablePart(); … … 266 274 267 275 fonts = (org.docx4j.wml.Fonts)fontTablePart.getJaxbElement(); 268 font Substituter.populateFontMappings(fontsInUse, fonts);276 fontMapper.populateFontMappings(fontsInUse, fonts); 269 277 270 278 } 271 279 272 public Substituter getFontSubstituter() { 273 return fontSubstituter; 274 } 275 276 private Substituter fontSubstituter; 277 278 280 public Mapper getFontMapper() { 281 return fontMapper; 282 } 283 284 private Mapper fontMapper; 285 279 286 280 287 public static WordprocessingMLPackage createPackage() throws InvalidFormatException {
Note: See TracChangeset
for help on using the changeset viewer.
