@@ -667,6 +667,7 @@ protected void write(Element element, int indent) throws IOException {
667667 case Element .PHRASE : {
668668 Phrase phrase = (Phrase ) element ;
669669 styleAttributes = new Properties ();
670+ styleAttributes .setProperty (Markup .CSS_KEY_DISPLAY , Markup .CSS_VALUE_GRID );
670671 if (phrase .hasLeading ()) {
671672 styleAttributes .setProperty (Markup .CSS_KEY_LINEHEIGHT , phrase .getLeading () + "pt" );
672673 }
@@ -691,6 +692,7 @@ protected void write(Element element, int indent) throws IOException {
691692 case Element .ANCHOR : {
692693 Anchor anchor = (Anchor ) element ;
693694 styleAttributes = new Properties ();
695+ styleAttributes .setProperty (Markup .CSS_KEY_DISPLAY , Markup .CSS_VALUE_GRID );
694696 if (anchor .hasLeading ()) {
695697 styleAttributes .setProperty (Markup .CSS_KEY_LINEHEIGHT , anchor .getLeading () + "pt" );
696698 }
@@ -721,9 +723,11 @@ protected void write(Element element, int indent) throws IOException {
721723 case Element .PARAGRAPH : {
722724 Paragraph paragraph = (Paragraph ) element ;
723725 styleAttributes = new Properties ();
726+ styleAttributes .setProperty (Markup .CSS_KEY_DISPLAY , Markup .CSS_VALUE_GRID );
724727 if (paragraph .hasLeading ()) {
725728 styleAttributes .setProperty (Markup .CSS_KEY_LINEHEIGHT , paragraph .getTotalLeading () + "pt" );
726729 }
730+
727731 // start tag
728732 addTabs (indent );
729733 writeStart (HtmlTags .DIV );
@@ -990,6 +994,7 @@ protected void writeSection(Section section, int indent) throws IOException {
990994 depth = 5 ;
991995 }
992996 Properties styleAttributes = new Properties ();
997+ styleAttributes .setProperty (Markup .CSS_KEY_DISPLAY , Markup .CSS_VALUE_GRID );
993998 if (section .getTitle ().hasLeading ()) {
994999 styleAttributes .setProperty (Markup .CSS_KEY_LINEHEIGHT , section .getTitle ().getTotalLeading () + "pt" );
9951000 }
0 commit comments