Le 22/04/2021 à 23:17, James Richters via fpc-pascal a écrit :

For some reason the ODT file wants to know if I want to translate it from French, and while the font is “Courier New” for anything I would type into the document, the font of the text itself is “Liberation Serif”

If I change the font manually to “Courier New” I get gaps in the vertical lines,but if I change it to “Consolas” there are no gaps and it looks perfect.

Basically, I think you should replace the FileVirtualTree_txt_to_odt.odt by one created on your machine.

Just create an empty document in Word and save it in odt format as FileVirtualTree_txt_to_odt.odt.

To change the font, don't modify it directly in the paragraph, but modify the default style, change  the font of the default style to the one which fits the best for you.

Eventually, you could make a style with a specific name, and specify it in the pascal code.

I have changed the font of the default style to Consolas. It works on my Windows machine, but not on Ubuntu.

I have switched the language to English US too.

So I thought I should be able to just save a template with the font set to “Consolas” and the spacing set to “No Spacing” which is basically single spacing it..

Well when I save it like that, when I try to run it I get:

Unable to Open File: C:\Users\James\AppData\Local\Temp\Fi8004.odt

Press OK and risk data corruption or press abort to kill the program

I think it must have something to do with using Microsoft Word to save the template.

May be the file was already opened ? or the template broken ? (saved in docx format instead of odt ?)


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to