How to find out which fonts are used in an Open Document?

Hi all

Does anyone know a way to find out which fonts are used in a Open Document
(in this case it's an Impress presentation)?

I'm trying to figure out how a user can make sure that he has all the fonts
needed to view a presentation or any other document (which does NOT have
embedded fonts) exactly like the author intended.

Thank you in advance!

Pedro

Perhaps export as PDF and let a PDF viewer tell you what fonts are there? (I haven't tried this, I just discovered recently that a PDF viewer could tell me that.)

- Robert

I'm guessing, but how about exporting a copy from LibreOffice to PDF and then examining the result in your favourite PDF reader? My Adobe Reader will list the fonts used - embedded in the case of the PDF - at File | Properties... | Fonts.

I trust this helps.

Brian Barker

Hi Robert and Brian

You had the same idea with a few minutes overlap :slight_smile:

Thank you for the suggestion. I am aware that PDFs list the embedded fonts.
Unfortunately that doesn't work for this problem...

When you open an Open Document and don't have the fonts used in the document
they will be replaced by a similar font.
Therefore when you create the PDF in a computer that doesn't have all the
original fonts, the fonts embedded are the replacement fonts. This means
that the PDF font list will show the fonts currently used but not the name
of the original ones.

Any other ideas?

What about unzipping the .odt/.odp/whatever file and searching for font names in the resulting .xml files? (Again, I haven't tried this.)

- Robert

Robert Funnell wrote

What about unzipping the .odt/.odp/whatever file and searching for
font names in the resulting .xml files? (Again, I haven't tried this.)

That would make sense. Unfortunately the file styles.xml lists some 55 fonts

From a PDF copy of the presentation I can see that there should be 15

different fonts, so the xml is not helping...

Unless I'm looking in the wrong xml... Does anyone know any better?

Oh, indeed. I assumed that you were talking about the situation where you were the author of the document and wanted to be able to specify to a recipient exactly what fonts s/he would need.

Brian Barker

Hi :slight_smile:
I thought the font-box (on one of the toolbars) shows the correct font-name
despite the document displaying the substitution? It'd be a pain to move
the cursor through the whole document and doing so is quite error-prone,
but if it works it might usable for an odd one or two documents.

Good luck and regards from
Tom :slight_smile:

Hi Tom

TomD wrote

I thought the font-box (on one of the toolbars) shows the correct
font-name
despite the document displaying the substitution? It'd be a pain to move
the cursor through the whole document and doing so is quite error-prone,
but if it works it might usable for an odd one or two documents.

Indeed it does show the original font but it is not efficient to have to
click on every text box on every slide to check the font (especially because
several fonts can be used in a single text box).

I'm really hoping that someone has a magical extension that does this :stuck_out_tongue:

ment

I _think_ that the TestFonts extension works for Impress.

It was designed for Write.

jonathon

Hi Jonathon

toki wrote

I _think_ that the TestFonts extension works for Impress.

It was designed for Write.

Brilliant! It was exactly something like this I was looking for (how stupid
of me not to remember looking in OpenOffice Extensions where there are many
more extensions available...)

BTW the extension works perfectly in LibreOffice 4.4.7 and 5.0.4.2 but
doesn't work in 5.1.0.3

Unfortunately you are right. It only works in Write. I will ask the author
if he is willing to adapt it to Impress (and Draw), where I believe they are
_very_ useful.

Thank you for your valuable answer!

Thank you to all that contributed to this discussion!

Warm regards from
Pedro

Hi Jonathon

toki wrote

I _think_ that the TestFonts extension works for Impress.

It was designed for Write.

Brilliant!

Yep! Just like most of Tom Bilek's extensions.

It was exactly something like this I was looking for (how stupid
of me not to remember looking in OpenOffice Extensions where there are many
more extensions available...)

BTW the extension works perfectly in LibreOffice 4.4.7 and 5.0.4.2 but
doesn't work in 5.1.0.3

Which OS? The extension works perfectly for me in Writer LibreOffice
5.1.0.3 x64 on Window 7 & PCLinuxOS.

Unfortunately you are right. It only works in Write. I will ask the author
if he is willing to adapt it to Impress (and Draw), where I believe they are
_very_ useful.

You might find that Tom is overloaded with other commitments at the
moment, but I feel sure he would be open to a RFE.

Thank you for your valuable answer!

Thank you to all that contributed to this discussion!

Warm regards from
Pedro

Regards
Dave

I don't know what I'm doing wrong but I can't find the TestFonts extension at http://extensions.libreoffice.org/. Could someone please provide a direct link or some other pointer?
Thanks.

- Robert

Hi Robert,

This is one of the AOO extensions:
http://extensions.services.openoffice.org/en/project/testfonts
which redirects to SourceForge.

Regards
Dave

Ah, of course. I missed the significance of 'not to remember looking in OpenOffice Extensions where there are many more extensions available'. Thank you.

- Robert

Hi Dave

Dave Barton wrote

Brilliant!

Yep! Just like most of Tom Bilek's extensions.

+1

Dave Barton wrote

BTW the extension works perfectly in LibreOffice 4.4.7 and 5.0.4.2 but
doesn't work in 5.1.0.3

Which OS? The extension works perfectly for me in Writer LibreOffice
5.1.0.3 x64 on Window 7 & PCLinuxOS.

I forgot to mention it is Windows XP Pro x86 SP3.
AltSearch doesn't work either.
Maybe it's time for TDF to assume that 5.1 does NOT support Windows XP (5.0
already doesn't fully support it, like the missing updates dialog)

Dave Barton wrote

Unfortunately you are right. It only works in Write. I will ask the
author
if he is willing to adapt it to Impress (and Draw), where I believe they
are
_very_ useful.

You might find that Tom is overloaded with other commitments at the
moment, but I feel sure he would be open to a RFE.

I already sent him an email. Maybe you can put a good word for me? :wink:

Regards,
Pedro

Pedro wrote

Robert Funnell wrote

What about unzipping the .odt/.odp/whatever file and searching for
font names in the resulting .xml files? (Again, I haven't tried this.)

That would make sense. Unfortunately the file styles.xml lists some 55
fonts
From a PDF copy of the presentation I can see that there should be 15
different fonts, so the xml is not helping...

Unless I'm looking in the wrong xml... Does anyone know any better?

Pedro, something like this should give an idea:

$ unzip -p filename.odp styles.xml | xmllint --format - | grep "font-face
style:name" | sort -u

That will just give style-based font use. For direct formatting, replace
"styles.xml" with content.xml.
Best wishes, Owen.

When I try this on a new .odt file that contains just a single word using the Liberation Serif font, the output for both styles.xml and content.xml lists Liberation Sans, Mangal1, Mangal, Microsoft YaHei and SimSun in addition to the Liberation Serif that is actually used.

- Robert

Hi Owen

Owen Genat wrote

Pedro, something like this should give an idea:

$ unzip -p filename.odp styles.xml | xmllint --format - | grep "font-face
style:name" | sort -u

That will just give style-based font use. For direct formatting, replace
"styles.xml" with content.xml.

That looks a lot like a Unix/Linux line command :wink: so I will give it a go
when I'm on my Linux box. Nevertheless it looks much more efficient than
having to rename the odp to zip, extracting the xml files and searching for
fonts! Thanks!

The problem with styles.xml is that it is listing ALL the fonts in the
default styles regardless of the fact that you are probably using a small
fraction of them. Many (most?) users only use the Default style and all else
is direct formatting...

What I'm trying to figure out is which fonts are _effectively_ used...

Regards,
Pedro

Me bad.

My only excuse is that I had been up for almost 48 hours when I wrote my
reply.

Any time an extension is listed, one needs to provide:
* URL;
* Operating systems it can run on;
* Localizations it does not work on;
* OOo derivative that it runs on;

#: There are four or five repositories of extensions:
* http://extensions.libreoffice.org/
* http://extensions.openoffice.org/
* http://www.multiracio.com/index.php?lang=en&style=eurooffice&page=eo_e
xt

* https://libreplanet.org/wiki/Group:OpenOfficeExtensions/List is an
unmaintained, incomplete list of libre extensions for LibO, AOo, and EO.

I've forgotten who sponsors other repositories, or curated lists of
extensions, and the respective URLs.

#: A surprising number of extensions are OS version specific. At one
point in time, I had a list of which version of which OS extensions
worked with. (There were a couple that worked with Ubuntu, but not
Debian. As a general rule, extensions list which version of Windows they
will work with.)

#: I've forgotten which extension I was testing, but it worked when the
LibO locale was English (US), and failed when the LibO locale was
English (South Africa). I've come across a similar phenomena with AOo.

# The difference in code between NO, LibO, EO, AnO, and AOo are great
enough, that the safest assumption is that the extension will only work
for the program it was specifically created for. Nonetheless, the brave,
or the foolhardy, can play with installing extensions from other
repositories, to see how well the extension functions.

The difference between versions of LibO are such that extensions that
have not had a release in the last 18 months probably won't work. For
AOo, the upper limit on last release is around four years.

I don't have EO2016, so I don't know how far back in time one can go,
for extensions to break. (With EO2014, extensions created prior to circa
2010 don't work.)

For both AnOO & EO4A, installing extensions is extremely tricky. When
they do install, operation is very much a hit or miss affair. The
simplest way to uninstall an errant extension is to wipe the device.