Ignore:
Timestamp:
03/08/08 22:45:15 (4 years ago)
Author:
jharrop
Message:

Use Panose as main means for getting substitute font.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/WordprocessingMLPackage.java

    r153 r159  
    3939import org.docx4j.openpackaging.parts.Part; 
    4040import org.docx4j.openpackaging.parts.PartName; 
     41import org.docx4j.openpackaging.parts.WordprocessingML.FontTablePart; 
    4142import org.docx4j.openpackaging.parts.WordprocessingML.GlossaryDocumentPart; 
    4243import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart; 
     
    253254                 
    254255                // 2.  For each font, find the closest match on the system (use OO's VCL.xcu to do this) 
    255                 //     - do this in a general way, since docx4all needs this as well to display fonts 
     256                //     - do this in a general way, since docx4all needs this as well to display fonts            
    256257                Substituter s = new Substituter(); 
    257                 s.populateFontMappings(fontsInUse); 
     258                FontTablePart fontTablePart= this.getMainDocumentPart().getFontTablePart();              
     259                org.docx4j.wml.Fonts fonts = (org.docx4j.wml.Fonts)fontTablePart.getJaxbElement();               
     260                 
     261                s.populateFontMappings(fontsInUse, fonts); 
    258262                 
    259263                // 3.  Ensure that the font names in the XHTML have been mapped to these matches 
Note: See TracChangeset for help on using the changeset viewer.