PDA

View Full Version : Can't Embed Fonts Anymore??



Kellaroo
04-11-2022, 12:01 AM
I've been trying to embed fonts in my PPT.
I check the boxes in the "preserve fidelity" section, and even when I go to save the PPT there is a progress bar at the bottom titled "saving fonts."

However, when I run VBA codes to check if the fonts are embedded it says "not embedded."

Also, under PPT 'contents' it does not state that any fonts are 'embedded'.

I can't seem to embed even the most ubiquitous Open Type or True Type fonts in a fresh PPT.


Here is the VBA I found to check for embedded fonts:


Sub ListFonts()


Dim x As Long
Dim sReport As String


With ActivePresentation.Fonts
For x = 1 To .count
sReport = sReport & .Item(x).Name & vbTab
If .Item(x).Embedded Then
sReport = sReport & "Embedded" & vbCrLf
Else
sReport = sReport & "NOT Embedded" & vbCrLf
End If
Next
End With

MsgBox sReport

End Sub


Is embedding a font in a PPT no more? Is there a way to embed a font (that is entirely of my own making) through VBA??

Paul_Hossler
04-11-2022, 04:29 AM
Found this, but I couldn't embed a TTF either


https://docs.microsoft.com/en-US/office/troubleshoot/office-suite-issues/fails-embedding-adobe-opentype-font


Symptoms

When you try to embed fonts in a Microsoft Office document, Adobe OpenType fonts that have the ".otf" extension are not embedded.
Cause

This issue occurs because the programs that are listed in the "Applies to" section do not embed fonts that have the ".otf" extension. The programs that are listed in the "Applies to" section only embed fonts that have the ".ttf" extension.
Workaround

To work around this issue, use only fonts that have the ".ttf" extension in documents in which you intend to embed the fonts.


29619

Kellaroo
04-11-2022, 08:58 AM
Thanks for finding this, Paul! Another clue on the trail.

So, I downloaded some .TTF fonts like the 'workaround' suggested in your link, and they won't even show up in PPT fonts.
Something very strange going on here.

Btw, are you using Office 365 too?

John Wilson
04-11-2022, 09:13 AM
Just to add to the weirdness. Bear in mind that I usually work with clients that use company fonts so i never deal with embedding.

I saved a presentation and embedded ttf fonts. Closed and reopened and ran your vba, Sure enough it reported they were NOT embedded.

BUT I looked into the underlying XML and the fonts are embedded. No idea what is going on but I suspect the vba doesn't work as expected.

Kellaroo
04-11-2022, 09:26 AM
Hi John! Thanks for joining the hunt.

So when you say 'company fonts' does that mean everyone in the company already has the font installed on their computers and therefore embedding is unnecessary?

Interesting about the underlying XML. Would you theorize these fonts are actually embedded in my PPT as well? Also, are you using Office 365? (I can't even get a .TTF font to register)

John Wilson
04-11-2022, 10:52 AM
Yes, I work with large companies where IT makes sure the required fonts are there. I am using 365

I'm using a professional XML editor to look but it can be done without.

Can you see the file extension '. pptx' on the file icons??
If NO open Documents and click the VIEW Tab
Check 'File Name Extensions"

ON A COPY

Rename the file to something.pptx.zip

There will be dire warnings but ignore

When you double click the file you should see the file structure

Open the PPT folder and see if it has a FONTS folder. If it does there are embedded fonts.

You might need to persevere to get this right hence the "COPY"

Good Luck

Paul_Hossler
04-11-2022, 11:20 AM
Also the Presentation.XML branch shows that PP knows (at some level) they're embedded.

I can't test it, but possibly the .Embedded property is ignored??

Maybe make a presentation on one computer using a font that is not on a second and see it you can edit the text on the second

29623

Kellaroo
04-11-2022, 08:03 PM
These are all great methods to explore! I'll investigate and post back on my findings.

Kellaroo
04-11-2022, 08:40 PM
First experiment results : I don't have an XML editor, so I followed the workaround like John said, and inside that .Zip I did find 'font data' files.
There would seem to be one font data file for each that I used in the PPT, but they are not labeled, so I'm just assuming.

(Still, I cannot successfully install a TTF font in my PPT dropdown of fonts. It's successfully installed on my computer, but PPT won't acknowledge.)

Later I'm going to try to access another computer that doesn't have this font, and try Paul's experiment.

Kellaroo
04-12-2022, 02:22 AM
Second experiment results : I tried using the PPT on another computer like Paul suggested and edited the textboxes successfully using the font Lakki Reddy (which I know wasn't installed on that computer. The textboxes could be edited with new text in that font, so I guess that means it is Actually embedded, all notification to the contrary.
Thanks for the help on this !

Kellaroo
04-12-2022, 02:31 AM
This train of thought has led me to a slightly different question,
is it possible to write a VBA code to check to see if a font is available on that user's computer, and if not then go to a subsequent font, and if that's unavailable then a subsequent font after that?

Like in this code, if Lakki Reddy wasn't available could I have it use a substitute font?


Sub WriteTextStudentName(osh As Shape)


Dim sTemp As String
sTemp = osh.TextFrame.TextRange.Text


sTemp = InputBox("Enter new text (or just a space to delete the text", "Edit text", sTemp)


With osh
.TextFrame2.WordWrap = True
.TextFrame2.AutoSize = msoAutoSizeTextToFitShape
.TextFrame.TextRange.Font.Name = "Lakki Reddy (Body)"
.TextFrame.TextRange.Font.Size = 115


' If there's any text, apply it to the shape
' To remove text from the shape, enter just a space
If Len(sTemp) > 0 Then
osh.TextFrame.TextRange.Text = sTemp
End If
End With


' refresh the slide
SlideShowWindows(1).View.GotoSlide ( _
SlideShowWindows(1).View.Slide.SlideIndex)


End Sub



Thank you for your time