Font size style not rendered to html for h4

Hello,
We use Aspose.Word java 18.11.
We got a problem reported at the conversion of a word file to html about an incorrect font size for some lines only, and it appeared after investigations those were all “h4” tags (Heading 4 style in word). For some reason, the style is set correctly for other headers (h1, h2, h3 and h5 all seem to work fine), but for that one the font size is simply not set and so it takes the default.

Analyzing in debug mode once aspose load the file, I see the “Heading 4” style is retrieved correctly from the word file with the right font size, but the font size is lost as soon as we convert to html
Here are the options used for export to html

	final HtmlSaveOptions saveOptions = new HtmlSaveOptions(SaveFormat.HTML);
	saveOptions.setExportListLabels(ExportListLabels.AS_INLINE_TEXT);
	saveOptions.setExportTocPageNumbers(false);
	saveOptions.setEncoding(StandardCharsets.UTF_8);
	saveOptions.setExportImagesAsBase64(true);

	try (final NoBomByteArrayOutputStream bos = new NoBomByteArrayOutputStream()) {
	    	doc.save(bos, getSaveOptions(doc));
	    	return bos.toUtf8String();
	}

Here is the word file : test.DOC.zip (6.4 KB)

Here is the created html :
(as you can notice, no font-size is set on h4 tags, although it is set to 12 in the word file, and other heading do have font size set)
<div><p style="margin-top: 0pt; margin-bottom: 24pt; text-align: center; widows: 0; orphans: 0; font-size: 12pt;" data-mce-style="margin-top: 0pt; margin-bottom: 24pt; text-align: center; widows: 0; orphans: 0; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;">MERCHANDISE LICENSE AGREEMENT</span></p><p style="margin-top: 24pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 24pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">This Merchandise License Agreement (the “</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Agreement</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”) is entered into effective as of [</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">__________</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">] (the “</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Effective Date</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”), by and and </span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">[Licensee Name, Place of Incorporation and Address]</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';"> (“</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Licensee</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”).</span></p><p style="margin-top: 12pt; margin-bottom: 12pt; text-align: center; page-break-after: avoid; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-align: center; page-break-after: avoid; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;">RECITALS</span></p><p style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman'; -aw-import: ignore;" data-mce-style="font-family: 'Times New Roman'; -aw-import: ignore;">&nbsp;</span></p><h2 style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; page-break-after: avoid; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; page-break-after: avoid; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; text-decoration: underline;">Effect of Termination or Expiration</span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">.</span></h2><h3 style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 72pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 72pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: ignore;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: ignore;">&nbsp;</span></h3><h4 style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;" data-mce-style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">Licensee shall immediately pay to</span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">the difference between the amount of Royalties actually paid to</span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">during the term that the Agreement was in effect and the entire amount of the Guaranteed Minimum Royalties;</span></h4><h4 style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;" data-mce-style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1.2</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">Subject to Section (Disposition of Inventory upon Expiration or Termination), Licensee shall immediately and permanently discontinue manufacturing, selling, advertising, distributing, and using the Licensed Produc</span></h4></div>

@LaMachina

Please note that Aspose.Words mimics the behavior of MS Word. The heading 4 style has font name ‘Times New Roman’ and size 12. If you convert your document to HTML using MS Word, you will get the same output.

@tahir.manzoor not quite sure what you’re saying here. Yes, I want h4 to have time new roman font and size 12 like in word. Yes, it is set in word, and it is rendered correctly when converting to html through word. No, it is not set correctly when going through aspose, the html output has no font size set for h4, so it will take whatever default is above.

@LaMachina

We have tested the scenario and noticed that the font size of heading 4 is not correct in output HTML. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-18730. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@LaMachina

It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-18730) as ‘Not a Bug’.

The font size 7pt is for spaces between numbers and content. MS Word and Aspose.Words generats the same output.

Aspose.Words writes “font-size” values under the assumption that the default font size specified in browsers is 12pt and it avoids writing duplicate “font-size” declarations. While this assumption is true in most cases, the default font size can be changed in browser settings, and this change will break document layout. If a HTML document generated by Aspose.Words is viewed in a browser with non-default font sizes, parts of the document where “font-size” is specified explicitly will remain unchanged while parts where “font-size” is omitted will change as specified in browser settings. In other words, HTML documents generated by Aspose.Words are sensitive to font settings of browsers.

Please share if the described situation is what you are worried about and are trying to protect from.

Please share the screenshot of problematic section of output HTML and browser name in which you are viewing the HTML document.

Aspose.Words writes “font-size” values under the assumption that the default font size specified in browsers is 12pt

I would have thought this would be a bug, how can you know in advance the default font size value of the browser/viewer which will render the document ? Also, in that document there are also h2 tags, they also have 12pt font size, and the size is correctly explicitly included. We render the document inside a web application within a context with editing tools, so it’s kinda expected a font size not explicitly set will be broken by previous values.

Do you confirm you will not consider adding explicit font size declaration when it’s your assumed “default value” ? I will point out that it’s not even consistent behavior as h2 tags do include it.

If that’s the case, and we need a ugly fix on our end, can you also confirm the default font size is always assumed to be 12pt for all tags ?

@LaMachina

As shared earlier, Aspose.Words mimics the behavior of MS Word. Could you please convert your document to HTML using MS Word and check it in your application? Please also share the screenshots of output that is viewed in your application.

lAspose-h4-bug.zip (184.0 KB)
All right, here is an archive containing :

  • test.DOC.doc => the original word file
  • test.DOC.word-export.html => the word export
  • aspose-exported.htm => the aspose export
  • WORD-HTML-EXPORT.png =>in app screen of using word export html
  • ASPOSE-EXPORT.png => in app screen of using aspose export html

@LaMachina

Thanks for sharing the detail. Both output look same.

The default font size specified in browsers is 12pt and Aspose.Words avoids writing duplicate “font-size” declarations.

Could you please share the screenshot of issue that you are facing with font size? Please also share your expected output HTML. Thanks for your cooperation.

Could you please share the screenshot of issue that you are facing with font size? Thanks for your cooperation.

Screenshots of results both through aspose export and word export is available in the zipfile of my previous message, along with the html outputs and original file.

What ? Quite obviously the h4 font size is not set through the aspose export and so it clearly appear too big on the display, while word do add a rule on all h4 in the head to set it’s font size, and so it renders correctly. All the text in 1.1.1.1 and 1.1.1.2 has no font size set through aspose.

Please also share your expected output HTML.

Here is the output I expected to have and want :
<div><p style="margin-top: 0pt; margin-bottom: 24pt; text-align: center; widows: 0; orphans: 0; font-size: 12pt;" data-mce-style="margin-top: 0pt; margin-bottom: 24pt; text-align: center; widows: 0; orphans: 0; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;">MERCHANDISE LICENSE AGREEMENT</span></p><p style="margin-top: 24pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 24pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">This Merchandise License Agreement (the “</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Agreement</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”) is entered into effective as of [</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">__________</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">] (the “</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Effective Date</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”), by and and </span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">[Licensee Name, Place of Incorporation and Address]</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';"> (“</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Licensee</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”).</span></p><p style="margin-top: 12pt; margin-bottom: 12pt; text-align: center; page-break-after: avoid; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-align: center; page-break-after: avoid; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;">RECITALS</span></p><p style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman'; -aw-import: ignore;" data-mce-style="font-family: 'Times New Roman'; -aw-import: ignore;">&nbsp;</span></p><h2 style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; page-break-after: avoid; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; page-break-after: avoid; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; text-decoration: underline;">Effect of Termination or Expiration</span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">.</span></h2><h3 style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 72pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 72pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: ignore;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: ignore;">&nbsp;</span></h3><h4 style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">Licensee shall immediately pay to</span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">the difference between the amount of Royalties actually paid to</span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">during the term that the Agreement was in effect and the entire amount of the Guaranteed Minimum Royalties;</span></h4><h4 style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1.2</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">Subject to Section (Disposition of Inventory upon Expiration or Termination), Licensee shall immediately and permanently discontinue manufacturing, selling, advertising, distributing, and using the Licensed Produc</span></h4></div>

Here is the one I currently get, with missing font size on h4 :
<div><p style="margin-top: 0pt; margin-bottom: 24pt; text-align: center; widows: 0; orphans: 0; font-size: 12pt;" data-mce-style="margin-top: 0pt; margin-bottom: 24pt; text-align: center; widows: 0; orphans: 0; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;">MERCHANDISE LICENSE AGREEMENT</span></p><p style="margin-top: 24pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 24pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">This Merchandise License Agreement (the “</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Agreement</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”) is entered into effective as of [</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">__________</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">] (the “</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Effective Date</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”), by and and </span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">[Licensee Name, Place of Incorporation and Address]</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';"> (“</span><span style="font-family: 'Times New Roman'; font-weight: bold;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold;">Licensee</span><span style="font-family: 'Times New Roman';" data-mce-style="font-family: 'Times New Roman';">”).</span></p><p style="margin-top: 12pt; margin-bottom: 12pt; text-align: center; page-break-after: avoid; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-align: center; page-break-after: avoid; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: bold; text-decoration: underline;">RECITALS</span></p><p style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman'; -aw-import: ignore;" data-mce-style="font-family: 'Times New Roman'; -aw-import: ignore;">&nbsp;</span></p><h2 style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; page-break-after: avoid; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 36pt; text-align: justify; page-break-after: avoid; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal; text-decoration: underline;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; text-decoration: underline;">Effect of Termination or Expiration</span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">.</span></h2><h3 style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 72pt; text-align: justify; font-size: 12pt;" data-mce-style="margin-top: 12pt; margin-bottom: 12pt; text-indent: 72pt; text-align: justify; font-size: 12pt;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: ignore;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: ignore;">&nbsp;</span></h3><h4 style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;" data-mce-style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1.1</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">Licensee shall immediately pay to</span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">the difference between the amount of Royalties actually paid to</span><span style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">during the term that the Agreement was in effect and the entire amount of the Guaranteed Minimum Royalties;</span></h4><h4 style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;" data-mce-style="margin-top: 12pt; margin-left: 72pt; margin-bottom: 12pt; text-align: justify;"><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">1.1.1.2</span><span style="font: 7pt 'Times New Roman'; -aw-import: spaces;" data-mce-style="font: 7pt 'Times New Roman'; -aw-import: spaces;">&nbsp; </span><span style="font-family: 'Times New Roman'; font-weight: normal;" data-mce-style="font-family: 'Times New Roman'; font-weight: normal;">Subject to Section (Disposition of Inventory upon Expiration or Termination), Licensee shall immediately and permanently discontinue manufacturing, selling, advertising, distributing, and using the Licensed Produc</span></h4></div>

@LaMachina

From the shared screenshots, the font size of text looks almost same. However, we have logged font issue in H4 tag along with problematic and expected output HTML in our issue tracking system. We will inform you via this forum thread once there is an update available on this issue.

The issues you have found earlier (filed as WORDSNET-18730) have been fixed in this Aspose.Words for .NET 20.8 update and this Aspose.Words for Java 20.8 update.