metanorma / metanorma-ieee

Metanorma for IEEE SA
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

PDF: font for body paragraphs has changed to sans-serif using current build #397

Closed ReesePlews closed 4 months ago

ReesePlews commented 4 months ago

font for body paragraphs has changed to sans-serif in PDF output using the IEEE template

using the following metanorma version:

Run metanorma --version
Metanorma 2.0.1
Metanorma::Cli 1.10.1
Metanorma::Standoc 2.8.11/IsoDoc 2.10.4
Metanorma::ISO 2.7.10
Metanorma::Iec 2.4.9
Metanorma::IEEE 1.2.10

the PDF output has body paragraphs in sans-serif font but IEEE style is serif for body paragraphs. the MS-Word file output appears to be correct but there is a line-height issue #396

MS-Word (correct)

image

PDF (incorrect)

image

@opoudjis @ronaldtse can you check this at your convenience. thanks

ronaldtse commented 4 months ago

Thank you @ReesePlews , @Intelligent2013 will be investigating.

Intelligent2013 commented 4 months ago

@ReesePlews I can't repeat the issue. I've checked so:

git clone https://github.com/metanorma/mn-samples-ieee
cd mn-samples-ieee
bundle update
bundle exec metanorma --version
Metanorma 2.0.1
Metanorma::Cli 1.10.1
Metanorma::Standoc 2.8.11/IsoDoc 2.10.4
Metanorma::ISO 2.7.10
Metanorma::Iec 2.4.9
Metanorma::IEEE 1.2.10
cd source/p987.6
bundle exec metanorma -t ieee -x pdf document.adoc 

PDF renders ok: image

@ReesePlews for further investigation I need some additional information:

  1. the document attributes. My instance is:
    = Recommended Practice for Preparing an IEEE Standards Draft
    :doctype: standard
    :docnumber: 987.6
    :docstage: draft
    :draft: 3
    :copyright-year: 2020
    :revdate: 2021-01-01
    :language: en
    :society: Template Society
    :committee: Standards Staff Engineering Committee
    :working-group: Working Group Name
    :balloting-group: Balloting Group Name
    :keywords: designation,document development,draft,equation,figure,guide,IEEE 987.6™,introduction,list,purpose,recommended practice,scope,standard
    :isbn-pdf: 978-0-XXXX-XXXX-X
    :isbn-print: 978-0-XXXX-XXXX-X
    :stdid-pdf: STDXXXXX
    :stdid-print: STDPDXXXXX
    :mn-document-class: ieee
    :imagesdir: images
  2. how to you run the PDF document rendering? What is the command do you run?
  3. is there .pdf.err log file near the resulted PDF? Could you attach it here? Thanks.
ReesePlews commented 4 months ago

hello @ronaldtse and @Intelligent2013 this is the generate task

https://github.com/Spatial-Web-Foundation/SWF-Corpus_and_IEEEP2874/actions/runs/9770467264

Alex if you cannot see that please ask Ron

here is the pdf err

WARNING: Font file '/github/home/.metanorma/fonts/arial.ttf' (font name 'Arial', font style 'normal', font weight 'normal') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Regular.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/arialbd.ttf' (font name 'Arial', font style 'normal', font weight 'bold') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Bold.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/arialbi.ttf' (font name 'Arial', font style 'italic', font weight 'bold') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-BoldItalic.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/ariali.ttf' (font name 'Arial', font style 'italic', font weight 'normal') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Italic.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/times.ttf' (font name 'Times New Roman', font style 'normal', font weight 'normal') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Regular.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/timesbd.ttf' (font name 'Times New Roman', font style 'normal', font weight 'bold') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Bold.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/timesbi.ttf' (font name 'Times New Roman', font style 'italic', font weight 'bold') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-BoldItalic.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/timesi.ttf' (font name 'Times New Roman', font style 'italic', font weight 'normal') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Italic.ttf'.

Invalid property value encountered in content-width="decentralized": org.apache.fop.fo.expr.PropertyException: null:715:43: No conversion defined decentralized; property:'content-width' (See position 715:160430) org.apache.fop.fo.expr.PropertyException: null:715:43: No conversion defined decentralized; property:'content-width' at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:446) at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:503) at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:387) at org.apache.fop.fo.FObj.processNode(FObj.java:129) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:321) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:185) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:182) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:181) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.metanorma.fop.PDFGenerator.generateFOPIntermediateFormat(PDFGenerator.java:775) at org.metanorma.fop.PDFGenerator.runFOP(PDFGenerator.java:509) at org.metanorma.fop.PDFGenerator.convertmn2pdf(PDFGenerator.java:466) at org.metanorma.fop.PDFGenerator.process(PDFGenerator.java:301) at org.metanorma.fop.mn2pdf.main(mn2pdf.java:338)

Invalid property value encountered in content-height="distributed and federated governance": org.apache.fop.fo.expr.PropertyException: null:715:43: No conversion defined distributed and federated governance; property:'content-height' (See position 715:160430) org.apache.fop.fo.expr.PropertyException: null:715:43: No conversion defined distributed and federated governance; property:'content-height' at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:446) at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:503) at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:387) at org.apache.fop.fo.FObj.processNode(FObj.java:129) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:321) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:185) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:182) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:181) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.metanorma.fop.PDFGenerator.generateFOPIntermediateFormat(PDFGenerator.java:775) at org.metanorma.fop.PDFGenerator.runFOP(PDFGenerator.java:509) at org.metanorma.fop.PDFGenerator.convertmn2pdf(PDFGenerator.java:466) at org.metanorma.fop.PDFGenerator.process(PDFGenerator.java:301) at org.metanorma.fop.mn2pdf.main(mn2pdf.java:338)

Invalid property value encountered in content-width="access is granted through a policy decision point (PDP) and corresponding policy enforcement point (PEP)": org.apache.fop.fo.expr.PropertyException: null:2378:43: no such function: point; property:'content-width' (See position 2378:19416) org.apache.fop.fo.expr.PropertyException: null:2378:43: no such function: point; property:'content-width' at org.apache.fop.fo.expr.PropertyParser.parsePrimaryExpr(PropertyParser.java:336) at org.apache.fop.fo.expr.PropertyParser.parseUnaryExpr(PropertyParser.java:214) at org.apache.fop.fo.expr.PropertyParser.parseMultiplicativeExpr(PropertyParser.java:179) at org.apache.fop.fo.expr.PropertyParser.parseAdditiveExpr(PropertyParser.java:153) at org.apache.fop.fo.expr.PropertyParser.parseProperty(PropertyParser.java:127) at org.apache.fop.fo.expr.PropertyParser.parse(PropertyParser.java:93) at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:438) at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:503) at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:387) at org.apache.fop.fo.FObj.processNode(FObj.java:129) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:321) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:185) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:182) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:181) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.metanorma.fop.PDFGenerator.generateFOPIntermediateFormat(PDFGenerator.java:775) at org.metanorma.fop.PDFGenerator.runFOP(PDFGenerator.java:509) at org.metanorma.fop.PDFGenerator.convertmn2pdf(PDFGenerator.java:466) at org.metanorma.fop.PDFGenerator.process(PDFGenerator.java:301) at org.metanorma.fop.mn2pdf.main(mn2pdf.java:338)

Invalid property value encountered in content-width="including zero-trust architecture": org.apache.fop.fo.expr.PropertyException: null:2667:43: No conversion defined including zero-trust architecture; property:'content-width' (See position 2667:211684) org.apache.fop.fo.expr.PropertyException: null:2667:43: No conversion defined including zero-trust architecture; property:'content-width' at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:446) at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:503) at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:387) at org.apache.fop.fo.FObj.processNode(FObj.java:129) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:321) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:185) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:182) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:181) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.metanorma.fop.PDFGenerator.generateFOPIntermediateFormat(PDFGenerator.java:775) at org.metanorma.fop.PDFGenerator.runFOP(PDFGenerator.java:509) at org.metanorma.fop.PDFGenerator.convertmn2pdf(PDFGenerator.java:466) at org.metanorma.fop.PDFGenerator.process(PDFGenerator.java:301) at org.metanorma.fop.mn2pdf.main(mn2pdf.java:338)

Invalid property value encountered in content-height="use case": org.apache.fop.fo.expr.PropertyException: null:2667:43: No conversion defined use case; property:'content-height' (See position 2667:211684) org.apache.fop.fo.expr.PropertyException: null:2667:43: No conversion defined use case; property:'content-height' at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:446) at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:503) at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:387) at org.apache.fop.fo.FObj.processNode(FObj.java:129) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:321) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:185) at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:182) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:181) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.metanorma.fop.PDFGenerator.generateFOPIntermediateFormat(PDFGenerator.java:775) at org.metanorma.fop.PDFGenerator.runFOP(PDFGenerator.java:509) at org.metanorma.fop.PDFGenerator.convertmn2pdf(PDFGenerator.java:466) at org.metanorma.fop.PDFGenerator.process(PDFGenerator.java:301) at org.metanorma.fop.mn2pdf.main(mn2pdf.java:338)

The contents of fo:region-body on page 153 exceed its viewport by 83900 millipoints. (See position 1:4975) Page 81: Unresolved ID reference "domain_relationship" found. Page 91: Unresolved ID reference "Active_Inference_and_Intentional_Behaviour" found. Page 97: Unresolved ID reference "activity_composition" found. Page 107: Unresolved ID reference "section-distributed_computing_continuum" found. Page 117: Unresolved ID reference "_hyperspace" found. Page 161: Unresolved ID reference "domain_relationship" found. Page 170: Unresolved ID reference "domain_relationship" found. Page 170: Unresolved ID reference "section-distributed_computing_continuum" found. WARNING: Font file '/github/home/.metanorma/fonts/arial.ttf' (font name 'Arial', font style 'normal', font weight 'normal') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Regular.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/arialbd.ttf' (font name 'Arial', font style 'normal', font weight 'bold') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Bold.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/arialbi.ttf' (font name 'Arial', font style 'italic', font weight 'bold') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-BoldItalic.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/ariali.ttf' (font name 'Arial', font style 'italic', font weight 'normal') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Italic.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/times.ttf' (font name 'Times New Roman', font style 'normal', font weight 'normal') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Regular.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/timesbd.ttf' (font name 'Times New Roman', font style 'normal', font weight 'bold') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Bold.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/timesbi.ttf' (font name 'Times New Roman', font style 'italic', font weight 'bold') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-BoldItalic.ttf'. WARNING: Font file '/github/home/.metanorma/fonts/timesi.ttf' (font name 'Times New Roman', font style 'italic', font weight 'normal') doesn't exist. Replaced by '/github/home/.metanorma/fonts/NotoSans-Italic.ttf'.

Intelligent2013 commented 4 months ago

@ReesePlews I have the access to the forked repository https://github.com/metanorma/SWF-Corpus_and_IEEEP2874-D2 and was able to get the same issue.

.pdf.err log contains two kind of the errors:

  1. about missing fonts
  2. Invalid property value encountered in content-width

The error 2. occurs due the comma character in the image alt text: from 052-stakeholders.adoc:

image::polycentric_governance.png[Figure shows how polycentric governance builds on notions of centralized, decentralized, distributed and federated governance]

To fix this kind of error - enclose the text in " (see https://docs.asciidoctor.org/asciidoc/latest/macros/images/) like this

image::polycentric_governance.png["Figure shows how polycentric governance builds on notions of centralized, decentralized, distributed and federated governance"]

Regarding main issue 1. about missing fonts, the metanorma-ieee contains the correct font list for the installation (https://github.com/metanorma/metanorma-ieee/blob/main/lib/metanorma/ieee/processor.rb):

      def fonts_manifest
        {
          "Arial" => nil,
          "Courier New" => nil,
          "Times New Roman" => nil,
          "Source Han Sans" => nil,
          "Source Han Sans Normal" => nil,
          "STIX Two Math" => nil,
        }
      end

The error WARNING: Font file '/github/home/.metanorma/fonts/arial.ttf' ... means that metanorma didn't install the font Arial by some reason.

I have checked the generated PDF in https://github.com/metanorma/SWF-Corpus_and_IEEEP2874-D2/actions/runs/9378467009 (see draft.zip, generated 5 June, 2024) and the resulted PDF looks ok: image And in pdf.err there aren't errors about missing fonts.

Then, I've created the branch font_test from main and run the PDF generation again - https://github.com/metanorma/SWF-Corpus_and_IEEEP2874-D2/actions/runs/9781210101. The resulted PDF is incorrectly with Noto Sans: image

In both case the version is identical:

Run metanorma --version
Metanorma 2.0.0
Metanorma::Cli 1.10.0
Metanorma::Standoc 2.8.10/IsoDoc 2.10.3
Metanorma::ISO 2.7.9
Metanorma::Iec 2.4.8
Metanorma::IEEE 1.2.9

But there is a difference in the command line for mn2pdf: From 5 June, 2024:

java -Xss10m -Xmx3g -Djava.awt.headless=true -Duser.home=/github/home -jar /usr/local/bundle/gems/mn2pdf-1.90/lib/../bin/mn2pdf.jar --xml-file "/tmp/p287420240605-322-fbc3ac.xml" --xsl-file "/usr/local/bundle/gems/metanorma-ieee-1.2.9/lib/isodoc/ieee/ieee.standard.xsl" --pdf-file "/__w/SWF-Corpus_and_IEEEP2874-D2/SWF-Corpus_and_IEEEP2874-D2/_site/documents/ieee-p2874/p2874.pdf" --param baseassetpath="/__w/SWF-Corpus_and_IEEEP2874-D2/SWF-Corpus_and_IEEEP2874-D2/sources/ieee-p2874" --syntax-highlight  --font-manifest "/tmp/fontist_locations20240605-322-bsyh0n.yml"

Today - missing --font-manifest "/tmp/fontist_locations20240605-322-bsyh0n.yml":

java -Xss10m -Xmx3g -Djava.awt.headless=true -Duser.home=/github/home -jar /usr/local/bundle/gems/mn2pdf-1.90/lib/../bin/mn2pdf.jar --xml-file "/tmp/p287420240703-340-kfqxf5.xml" --xsl-file "/usr/local/bundle/gems/metanorma-ieee-1.2.9/lib/isodoc/ieee/ieee.standard.xsl" --pdf-file "/__w/SWF-Corpus_and_IEEEP2874-D2/SWF-Corpus_and_IEEEP2874-D2/_site/documents/ieee-p2874/p2874.pdf" --param baseassetpath="/__w/SWF-Corpus_and_IEEEP2874-D2/SWF-Corpus_and_IEEEP2874-D2/sources/ieee-p2874" --syntax-highlight

A bit above in the GH log: From 5 June 2024:

Run actions-mn/site-gen@v2
  with:
    source-path: .
    config-file: metanorma.yml
    output-dir: _site
    agree-to-terms: .
    install-fonts: false
Run cd .
  cd .
         \
    metanorma site generate .                                      \
                           \
    -o _site                                    \
    -c metanorma.yml                                   \
    --agree-to-terms  \
    --install-fonts \
    --no-continue-without-fonts

Today:

Run actions-mn/site-gen@v2
  with:
    source-path: .
    config-file: metanorma.yml
    output-dir: _site
    agree-to-terms: .
    install-fonts: false
    progress: false
Run verlte() {
  verlte() {
    printf '%s\n' "$1" "$2" | sort -C -V
  }
  verlt() {
    ! verlte "$2" "$1"
  }

  METANORMA_VERSION=$(cd .;  metanorma --version | head -1 | cut -d' ' -f2)
  METANORMA_LEGACY=$(verlt ${METANORMA_VERSION} 1.10.0 && echo "true" || echo "false")
  METANORMA_FLAGS=""

  if [ "" == "true" ]; then
    METANORMA_FLAGS+="--strict"
  fi
  if [ "false" != "true" ]; then
    METANORMA_FLAGS+=" --no-progress"
  fi
  if [ "." == "true" ]; then
    METANORMA_FLAGS+=" --agree-to-terms"
  fi

  if [ "false" != 'true' ]; then
    METANORMA_FLAGS+=" --no-install-fonts"
  elif [ "$METANORMA_LEGACY" == "true" ]; then
    METANORMA_FLAGS+=" --no-no-install-fonts"
  else
    METANORMA_FLAGS+=" --install-fonts"
  fi

  if [ "" != 'true' ]; then
    METANORMA_FLAGS+=" --no-continue-without-fonts"
  elif [ "$METANORMA_LEGACY" == "true" ]; then
    METANORMA_FLAGS+=" --no-no-continue-without-fonts"
  else
    METANORMA_FLAGS+=" --continue-without-fonts"
  fi
  echo "METANORMA_FLAGS=${METANORMA_FLAGS}" >> $GITHUB_ENV
  shell: bash --noprofile --norc -e -o pipefail {0}
Run cd .
  cd .
         \
    metanorma site generate .                                      \
    -o _site                                    \
    -c metanorma.yml                                   \
     --no-progress --no-install-fonts --no-continue-without-fonts
  shell: bash --noprofile --norc -e -o pipefail {0}
  env:
    METANORMA_FLAGS:  --no-progress --no-install-fonts --no-continue-without-fonts

I've tried to add into generate.yml the line install-fonts: true (https://github.com/metanorma/SWF-Corpus_and_IEEEP2874-D2/actions/runs/9781845486/job/27006858553):

      - name: Metanorma generate site
        uses: actions-mn/build-and-publish@v2
        with:
          agree-to-terms: true
          destination: artifact
          artifact-name: draft
          install-fonts: true

but again METANORMA_FLAGS contains --no-install-fonts

 cd .
         \
    metanorma site generate .                                      \
    -o _site                                    \
    -c metanorma.yml                                   \
     --no-progress --no-install-fonts --no-continue-without-fonts
  shell: bash --noprofile --norc -e -o pipefail {0}
  env:
    METANORMA_FLAGS:  --no-progress --no-install-fonts --no-continue-without-fonts

@CAMOBAP could you have a look?

CAMOBAP commented 4 months ago

On it

CAMOBAP commented 4 months ago

Should be fixed in this run https://github.com/metanorma/SWF-Corpus_and_IEEEP2874-D2/actions/runs/9781845486 and for other repos too

Intelligent2013 commented 4 months ago

@CAMOBAP thank you!

@ReesePlews there was an issue in GH actions. Please re-run the tasks in the repository https://github.com/Spatial-Web-Foundation/SWF-Corpus_and_IEEEP2874 (I don't have the access there).

ReesePlews commented 4 months ago

@Intelligent2013 and @CAMOBAP thank you both for checking into this. the GH actions are kind of "black boxes" . the groups that use the MN tool chain on GH are probably afraid to touch those scripts so as to not break anything unless there are really skilled github members in those groups.

how would this have been changed originally, was there an issue or an edit made on our side?

i will rerun the job and report back here to this issue. thanks again for checking this.

CAMOBAP commented 4 months ago

how would this have been changed originally, was there an issue or an edit made on our side?

There was an issue in bash script for actions-mn/site-gen. So I fixed it and released the fix under V2 tag.

You just need to rerun workflow. Could you please confirm that the issue is fixed?

ReesePlews commented 4 months ago

hello @CAMOBAP i reran the generate but it is not producing an output file. when you have time, can you check that? https://github.com/Spatial-Web-Foundation/SWF-Corpus_and_IEEEP2874/actions/runs/9817247258

thank you

CAMOBAP commented 4 months ago

@ReesePlews unfortunately I have no access to this repo, without logs I cannot investigate it unfortunatelly

CAMOBAP commented 4 months ago

@ReesePlews please let me know if you still have issues I will be glad to assist you, feel free to open a separate issue

ReesePlews commented 4 months ago

thank you @CAMOBAP i will check this at the next release in a couple of weeks. appreciate the fix! thanks!