Consulting

Results 1 to 11 of 11

Thread: Can't Embed Fonts Anymore??

  1. #1
    VBAX Regular
    Joined
    Feb 2022
    Posts
    37
    Location

    Can't Embed Fonts Anymore??

    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??

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    Found this, but I couldn't embed a TTF either


    https://docs.microsoft.com/en-US/off...-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.
    Capture.JPG
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Regular
    Joined
    Feb 2022
    Posts
    37
    Location
    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?
    Last edited by Kellaroo; 04-11-2022 at 09:25 AM.

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    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.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Regular
    Joined
    Feb 2022
    Posts
    37
    Location
    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)

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    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
    Last edited by John Wilson; 04-11-2022 at 11:03 AM.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    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

    Capture.JPG
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  8. #8
    VBAX Regular
    Joined
    Feb 2022
    Posts
    37
    Location
    These are all great methods to explore! I'll investigate and post back on my findings.

  9. #9
    VBAX Regular
    Joined
    Feb 2022
    Posts
    37
    Location
    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.
    Attached Images Attached Images

  10. #10
    VBAX Regular
    Joined
    Feb 2022
    Posts
    37
    Location
    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 !

  11. #11
    VBAX Regular
    Joined
    Feb 2022
    Posts
    37
    Location
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •