-
Notifications
You must be signed in to change notification settings - Fork 369
Font size overwrite #557
Comments
Noteworthy: This issue only applies to text generated by: Other "finding specific" text, like πaffected_hostsπ or πcvss_totalπ is displayed correctly. |
Hi @Manonnnn4 could you confirm you mean paragraph text? Tables use a different syntax (https://github.com/SerpicoProject/Serpico/wiki/Serpico-Meta-Language-In-Depth) than paragraphs. Assuming you meant paragraphs your original code block looked like this:
Could you try the following? Open up your template in Word and highlight the line That block above is a choose/when. So if you have a bullet element in your finding from the Serpico UI, then when the report is generated Word will apply the style set to |
Hi BuffoloWill, thanks for your reaction. I did that. I've included some screenshots to show you the problem. |
@Manonnnn4 please check the Word style (not the font) that is applied to your template and to your report. |
I did. There seems to be something weird going on. When I define a custom style in font 10 it does not store the "font 10" part (see bottom of the first screenshot). This than gets overwritten by serpico to font size 12. If I define a style with font size 9, it is explicitly part of the style (second screenshot), and then serpico does not touch it, and the whole table turns out the way you expect it to (everything in size 9, as I defined it). Weirder still, if I inspect the normal style, it is size 10, but if I apply it, the text is in font size 12! I spent ages trying to find out why this happens the way it does. I cannot find a clue, and at this point it has cost so much time I will just have my tables in size 9. Hopefully others with the same problem find this workaround usefull, but a fix it is not. I suspect this is some weird Word thing, not a serpico thing. You may close this issue if you want. |
Hello, I had the same issue and I managed to solve this. To solve this I replaced all the "⁂" characters in helpers/xslt_generation.rb with "ȹ" (Latin Small Letter QP Digraph) which was supported by "Arial" font. In conclusion, it seems that some special characters, that serpico has reserved, are supported from all the fonts. I hope my feedback to help you. Best regards, |
Bug
In my report I generate finding tables using:
and
πnotesπ
All these use styles with font size 10 in my template. However, in the generated report, only notes, bulletted points and code is font size 10. Other text in paragraphs has font size 12. When selecting it, it has style normal(which has font size 10). This is driving me nuts. I have tried:
Now I have to manually change the font size in my results tables for every report I make, which really defeats the point of using serpico.
Details
I inspected the xml files of the generated docx report, I see the following style elements:
Example 1: Text in template that is not modified by serpico (like title of a table):
<w:rStyle w:val="Normal-calibri10"/></w:rPr><w:t>This is displayed correctly, not generated by serpico </w:t></w:r>
Example 2: Paragraph text coming from a finding, displayed in font size 12:
<w:rStyle w:val="Normal-calibri10"/></w:rPr></w:pPr><w:r><w:t>This is NOT displayed correctly, and generated by info from findings in serpico </w:t>
Example 3: Bulletted text coming from a finding, displayed correctly in font size 10:
<w:pStyle w:val="Lijstbolniv1"/><w:rPr><w:rFonts w:asciiTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi" w:cstheme="minorHAnsi"/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr></w:pPr><w:r w:rsidRPr="00D53241"><w:rPr><w:rFonts w:asciiTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi" w:cstheme="minorHAnsi"/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr><w:t xml:space="preserve"> Bulleted points are correctly displayed </w:t></w:r>
Related fix
I thought that this issue should have been fixed by #525, I checked and the code of this fix is there in my helpers/xslt_generation.rb, it just did not fix the problem in my case (I have the developer build now to make sure of this, no change).
Related issue
This issue is probably related to: #223. This one was closed without a fix.
The text was updated successfully, but these errors were encountered: