How to change font family, not size, not italics, underline, etc

I have 240 Writer docs created in windows-7. I’m migrating them to Fedora-35. But the fonts used in windows-7 are not available in Fedora-35. Here is what I want to do:

  1. Change all “Times New Roman” to “Liberation Serif” without changing any sizes, without changing regular vs. italic vs. underline vs. bold.
  2. Change all “Vivaldi” to “Z003” without changing any sizes, without changing regular vs. italic vs. underline vs. bold.
    How do I do this in Fedora-35 for all 240 docs?

Try:

Tools>Options>LibreOffice>Fonts menu.
Put a check mark at “Apply replacement table”.
At “Font:” manually enter the font you want to replace.
Select the desired font at “Replace with:”.
Click OK.
Test a few documents.

! Make copies of your files bevor.


I have not tested it.

1 Like

You might be interested in this off-site page on installing Microsoft core fonts, How to Install Microsoft Fonts on Ubuntu Linux [Easy Way]

That could work for Times New Roman but I don’t think Vivaldi is a core font

Thank-you. But I already know how to change fonts in a single document. What I need to know is how to make the same font changes in each of 240 documents all at once without manually doing each file one-by-one.

If the only option is to do them one-by-one manually, then it would be helpful to know that.

This is an unusual situation in that installing fonts is not an option.

This is an unusual situation in that importing/installing new fonts is not an option. I must work with what is already on the workstation.

What I need to know is how to make the same font changes in each of 240 documents all at once without manually doing each file one-by-one.

If the only option is to do them one-by-one manually, then it would be helpful to know that.

Do you need to change the font?

Or, as @Hrbrgr suggested, to replace it with a chosen substitute “when it is displayed on screen or during printing.”? See help Fonts

Note that Writer is already substituting Times New Roman with Liberation Serif on screen and in print if Times New Roman is not installed.

1 Like

The documents were created on a windows-7 box using “Times New Roman” and “Vivaldi”.
They have been migrated to a Fedora-35 (Linux) workstation. It has neither “Times New Roman” nor “Vivaldi”. Some day in the future (I don’t know when), the documents will be migrated to some as yet unknown workstation witth as yet unknown operating system and fonts. Strict requirements:
I must use the fonts that come with Fedora-35 and/or LibreOffice by default. So…

  1. no font migration allowed.
  2. no font installation allowed.
    Further…
  3. No size changes.
  4. No changes in regular vs. italic vs. bold vs. underline allowed.
  5. The same font changes must be made in each document. Specifically, all “Times New Roman” must be changed to “Liberation Serif”, and all “Vivaldi” must be changed to “Z003”.
  6. The font changes must be permanent.
  7. Both the display and printouts must show “Liberation Serif” and “Z003”.

I have 240 of these documents needing the font changes. I recall in the good 'ol days that shell scripts would be written. They would loop through a list a files and use Linux/Unix commands like “ed”, “sed”, “ex”, and others to edit each file. I’m looking for something like that. Pseudo-code:

do for each LibreOffice Writer document in directory "my_docs"
   open the doc
   change all "Times New Roman" to "Liberation Serif"
   change all "Vivaldi" to "Z003"
   save the doc
end do
exit

That is what I need and am asking for. If the only way to change the documents is to manually do each one separately, then say so. I already know how to manually make the font changes in one document within an interactive LibreOffice Writer session.

For the future (unless you have enough patience to “patch” your existing documents), base your documents on a personal template.

Changing styles in the template is automatically forwarded to dependent documents.

Note it could pay off to force a template on your files using Template Changer extension.

2 Likes