[Solved] Selecting text shows wrong font name

Discuss the word processor
Post Reply
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

[Solved] Selecting text shows wrong font name

Post by ComputerHelp69 »

I want everything in my document to be Times New Roman.

Something happened and now if I click on text on certain parts of the document, it says Times New Roman as it should. But if I select that same text, it says Liberation Mono at the top even though it still appears to be Times New Roman. I try changing it to Times New Roman while highlighted but the box still says Liberation Mono.

What did I do wrong and how do I fix it? It might have happened while I was pasting text in from elsewhere.

Thank you so much for your time.
Last edited by ComputerHelp69 on Mon Apr 16, 2018 5:28 pm, edited 2 times in total.
LibreOffice 5.1.6.2 on Windows 7 64-bit
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Selecting text shows wrong font name (only in parts of d

Post by RoryOF »

The font displayed is the font OpenOffice is requesting; should this not be available the closest fitting font is silently used. Load
TestFonts to see which styles are using which fonts and what fonts are expected but not present on your computer.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: Selecting text shows wrong font name (only in parts of d

Post by Bill »

Times New Roman is a Microsoft font that is not in Ubuntu. Did you install the package that includes Times New Roman?

If the actual font is Liberation Mono, then it won't look like Times New Roman. Liberation Serif looks like Times New Roman.
AOO 4.1.14 on Ubuntu MATE 22.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Selecting text shows wrong font name (only in parts of d

Post by John_Ha »

Remember that the font showing in the Writer font drop-down selection box is the font the document is asking for. This may NOT be the font being used to create the display because, if the font being asked for is not installed on the PC, Windows (or other operating system) will silently substitute a different font which is available.

The TestFonts add-on is invaluable for finding missing fonts which the document is asking for, but which are not installed on the PC.

You can see which fonts are installed on the PC by Start > Control Panel > Fonts or by clicking C:\Windows\Fonts.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

Re: Selecting text shows wrong font name (only in parts of d

Post by ComputerHelp69 »

Thanks for the responses guys.

I made a mistake when I posted that this was on my Ubuntu system. It was in fact on my Windows 7 64-bit system. I guess I was tired last night.

So I still have this problem. I checked, and Times New Roman IS installed on my system. If it wasn't, it wouldn't be working correctly in the rest of the document. This behaviour is only happening in parts of the document. All of the text looks like Times New Roman as it should, but selecting the text on some parts of the page results in the Font box saying Liberation Mono. If I unselect it, it again says Times New Roman when the cursor is blinking on it.

I just edited my original post a little bit to be more clear.
LibreOffice 5.1.6.2 on Windows 7 64-bit
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

Re: Selecting text shows wrong font name (only in parts of d

Post by ComputerHelp69 »

OK I just made a pastebin of my TestFonts results. Is the part under "character styles" the issue?

https://pastebin.com/KEhTMpcA
LibreOffice 5.1.6.2 on Windows 7 64-bit
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: Selecting text shows wrong font name (only in parts of d

Post by Bill »

I haven't been able to duplicate the reported behavior exactly. If both Liberation Mono and Times New Roman are installed, then there should be no automatic font substitution. However, Tools > Options > LibreOffice > Fonts > Replacement Table may have been configured to replace Liberation Mono with Times New Roman. In that case, "Liberation Mono" would appear in the Font Name drop down box while the font would look like Times New Roman. The problem is that it should still be possible to change the font in the drop down box from Liberation Mono to Times New Roman.
AOO 4.1.14 on Ubuntu MATE 22.04
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

Re: Selecting text shows wrong font name (only in parts of d

Post by ComputerHelp69 »

Hi Bill. Thanks for your response.

I checked the Replacement Table and there is nothing in it. I made a imgur of it - https://imgur.com/xUVN7cl
LibreOffice 5.1.6.2 on Windows 7 64-bit
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Selecting text shows wrong font name (only in parts of d

Post by John_Ha »

TestFonts suggests that you have something wrong with the TNR font. TNR has four font files - Regular, Bold, Italic and Bold-Italic. When I have a line of TNR and a line of TNR bold, which I know uses the Bold font file, I get the following, with no Direct Formatting.

I think that, if a font does not have a bold font file, then Windows takes the Regular font and widens it to approximate to bold and this is called Direct Formatting.

Go Edit > Select All. Now apply TNR. Does that fix it?
Attachments
Clipboard02.gif
Clipboard01.gif
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Selecting text shows wrong font name (only in parts of d

Post by John_Ha »

ComputerHelp69 wrote:... it says Liberation Mono at the top even though it still appears to be Times New Roman.
Quite possibly. Remember that the font showing in the Writer font drop-down selection box is the font the document is asking for. This may NOT be the font being used to create the display because, if the font being asked for is not installed on the PC, Windows (or other operating system) will silently substitute a different font which is available.

Click inside some text. Format > Character > Font ..., tells you the actual font being used.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

Re: Selecting text shows wrong font name (only in parts of d

Post by ComputerHelp69 »

Thanks again for the help guys. I do appreciate it.

Edit > Select All > Apply TNR does not fix it. I had already tried that, but tried again.

I played around with Format > Character > Font and placed the cursor inside a bunch of the text (bold and non-bold) and it always shows the actual font is TNR. That is good news.

I've posted a series of imgurs to show the odd behaviour. All text within this example shows actual font is TNR when placing the text cursor between it. Check these out in order.

1) Highlighting "GUI apps require " with the space after it shows TNR at the top and actual font (TNR) used. https://imgur.com/a/t9Rhc

2) Highlighting the bolded "export DISPLAY=:0" also shows TNR at the top and actual font (TNR bold) used. https://imgur.com/a/cBfwP

3) Highlighting the entire "GUI apps require export DISPLAY=:0" changes the box and actual font to Liberation Mono. https://imgur.com/a/Dn4I3

4) Likewise, highlighting " export DISPLAY=:0" WITH the space before it also changes the box and actual font to Liberation Mono. https://imgur.com/a/5oVfX

5) Highlighting the space in between the non-bold and bold text shows TNR at the top and actual. https://imgur.com/a/RaxXP

I hope this provides a clue. It is inconsistent.
LibreOffice 5.1.6.2 on Windows 7 64-bit
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

Re: Selecting text shows wrong font name (only in parts of d

Post by ComputerHelp69 »

Also, I dropped to a command prompt like John Ha and confirmed that I have those same four font files that he does.
LibreOffice 5.1.6.2 on Windows 7 64-bit
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Selecting text shows wrong font name (only in parts of d

Post by John_Ha »

Upload the file (eg .odt) showing the problem so that it can be analysed. Use the Upload attachment tab below where you type (128 kB max) or use a file share site for a larger file.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

Re: Selecting text shows wrong font name (only in parts of d

Post by ComputerHelp69 »

Thanks John - I've attached the last two pages of the document. It was a 5 page document. The problem ONLY occurs for me on the last page. I've included the previous page for comparison.

Play around with it and do the tests I shared above to see the issue. It appears to me that transitions between bold and normal text and/or spaces are at least part of the issue.
Attachments
Misc Working Document3.odt
(14.08 KiB) Downloaded 80 times
LibreOffice 5.1.6.2 on Windows 7 64-bit
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Selecting text shows wrong font name (only in parts of d

Post by Zizi64 »

All of the lines has the default PARAGRAPH STYLE but there a custom CHARACTER STYLE aplied to the words in some lines.
Character_style.png
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

Re: Selecting text shows wrong font name (only in parts of d

Post by ComputerHelp69 »

Thanks for your response Zizi64.

I wasn't having a problem though on the page you tested. I'm having the problem on the second page.

I highlighted the same text you did on the first page, then Format > Character > Font tab and the correct Font was listed.

Doing the same test on the (second) problem page still shows the wrong font, even if I change it in Format > Character > Font tab.
LibreOffice 5.1.6.2 on Windows 7 64-bit
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Selecting text shows wrong font name (only in parts of d

Post by Zizi64 »

All of the text on the second page has a paragraph style named "Default". The font property of this style is Times New Roman. And the text has a character style named "Source text" with font property "Liberation mono". The property of the character style had eliminated the property of the paragraph.

And there are many MANUAL formatting properties on the text. And the properties of the manual formatting had eliminated the font and other properties (bold, size, etc...)

Try it (on a copy of your document):
Select some text on the second page, and hit Ctrl-M. It will delete the manual (direct) formatting properties. The text will be appeared with the font property of the applied character style.

Then apply the Default character style to the selected text. The font of the Default paragraph style (TNR) will be appeared.
Last edited by Zizi64 on Mon Apr 16, 2018 5:53 pm, edited 2 times in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
ComputerHelp69
Posts: 9
Joined: Sun Apr 15, 2018 3:05 am

Re: Selecting text shows wrong font name (only in parts of d

Post by ComputerHelp69 »

Sorry for the delay.

Zizi64, that worked and I have my document looking good again! THANK YOU THANK YOU THANK YOU!

In addition, I did some reading about paragraph & character styles, and direct formatting. I'd never heard of all that before. I think I understand it. I made a test document and played around with it.

Thanks to everyone who offered me help: RoryOF, Bill, John_Ha and Zizi64.

The past few days have been frustrating but I've learned from it. I'm so thankful for people like all of you.
LibreOffice 5.1.6.2 on Windows 7 64-bit
Post Reply