Package org.docx4j.fonts

Examples of org.docx4j.fonts.RunFontSelector


    Body body =  wmlDocumentEl.getBody();

    List <Object> bodyChildren = body.getContent();
   
    FontDiscoveryCharacterVisitor visitor = new FontDiscoveryCharacterVisitor(fontsDiscovered);
    RunFontSelector runFontSelector = new RunFontSelector((WordprocessingMLPackage) this.pack, visitor, RunFontActionType.DISCOVERY);
   
    FontAndStyleFinder finder = new FontAndStyleFinder(runFontSelector, fontsDiscovered, null);
    finder.defaultCharacterStyle = this.getStyleDefinitionsPart().getDefaultCharacterStyle();
    finder.defaultParagraphStyle = this.getStyleDefinitionsPart().getDefaultParagraphStyle()
    finder.styleDefinitionsPart = this.getStyleDefinitionsPart();
   
    new TraversalUtil(bodyChildren, finder);
//    finder.finish();
   
    fontsDiscovered.add(
        runFontSelector.getDefaultFont() );
   
    // fonts in headers, footers?
    RelationshipsPart rp = this.getRelationshipsPart();
    if (rp!=null) {
      for ( Relationship r : rp.getRelationships().getRelationship() ) {
View Full Code Here


    this.foRenderer = initializeFoRenderer(settings);
  }
 
  private static RunFontSelector createRunFontSelector(WordprocessingMLPackage wmlPackage) {
   
    return new RunFontSelector(wmlPackage,
       
      new RunFontCharacterVisitor() {
     
          DocumentFragment df;     
        StringBuilder sb = new StringBuilder(1024);
View Full Code Here

    super(HTML_WRITER_REGISTRY, HTML_MESSAGE_WRITER, settings, preprocessedPackage, conversionSectionWrappers, createRunFontSelector(preprocessedPackage));
  }

  private static RunFontSelector createRunFontSelector(WordprocessingMLPackage wmlPackage) {
   
    return new RunFontSelector(wmlPackage,
       
      new RunFontCharacterVisitor() {
     
          DocumentFragment df;     
        StringBuilder sb = new StringBuilder(1024);
View Full Code Here

TOP

Related Classes of org.docx4j.fonts.RunFontSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.