MicrosoftDocs / typography-issues

Creative Commons Attribution 4.0 International
45 stars 21 forks source link

Black styles can't be embedded without a Regular #830

Open RosaWagner opened 2 years ago

RosaWagner commented 2 years ago

I tried to embed a Black/Heavy font in Powerpoint. It works when I do it in Windows and open it in Mac, but doesn't work when I do it in Mac and open it in Windows.

I also noticed that the Black style was triggering the Bold button, and the font get embedded when a Regular font is also embedded.

~Medium style gets embedded without problem and without Regular.~ (edit: in fact not) Mac and Windows name are the same etc etc…

So the easy workaround was to make the font like a normal Regular, but doesn't seem like a good long-term option; we have clients who purchase an entire family, but only embed one style in a shared document for example… the other workaround would be to remove name IDs 16/17 but that would really be a downgrade in term of user experience.

I'm a font engineer, I follow the opentype spec, but maybe I don't do it right.

RosaWagner commented 2 years ago

I post this issue here cause there might be a bad interpretation of the opentype spec, who knows. If it's bug from the softwares, and if you know where to report these bugs please advise :)

kenmcd commented 2 years ago

@RosaWagner You do not mention the font family name. I assume this is on a Mac - so you may be using one one of their broken font families. As I described in #829 This problem with the broken style groups in Apple-supplied fonts seems to fit.

It works when I do it in Windows and open it in Mac, but doesn't work when I do it in Mac and open it in Windows.

On Windows you would be embedding a valid font, with valid name info. On Mac you could be embedding an invalid font, and/or invalid name info.

So far, in the Apple-supplied fonts, I have found 12 font families with broken style groups, and/or invalid font files. Which font family were you using for this test?

RosaWagner commented 2 years ago

The fonts I used are basically the same as described in the other issue (recent ones from Google Fonts, or private clients' which I did the QA few month ago already). You can try to embed Texturina Black (GF) alone in Mac Powerpoint, and then try to embed it with the Regular style.

This really looks like a little speciality from Mac Office, but it doesn't make sense. Do you know where I can find documentation that explain MS Office font support? The ms open-type spec don't say anything about how to engineer fonts for their cloud based services (or I didn't find it).

kenmcd commented 2 years ago

@RosaWagner Which version of PowerPoint on the Mac are you using? From what I have found it appears that while Mac PPT 2016 can use embedded fonts, it does appear that Mac PPT cannot embed the fonts itself. See: https://answers.microsoft.com/en-us/msoffice/forum/all/how-do-i-embed-fonts-in-powerpoint-2016-for-mac/593c165f-52bf-4161-ac47-82cd56c69f03 And I have not found anything which says this has changed.

So if the Windows PPT is used to embed the fonts, then the Mac PPT can use them. But since Mac PPT cannot embed the fonts, the Windows PPT cannot see them.

The .pptx files are a zip and you can look inside to see if any fonts are embedded by Mac PPT. The font files are obfuscated but you can see if there are font files there.

Regarding MS Office font support there is some programming info on the MS developers site, but that is not how to create the fonts, just how to use them in apps. I do have one perhaps useful document: WPF font selection model (2006) It describes how the Windows Presentation Foundation selects fonts. WPF Font Selection Model.pdf (PDF, 844KB) But, on Windows, it is my understanding that PPT is using the old GDI text API, not WPF. Even on Windows there are odd font issues with PPT. How it works on a Mac I have no idea.

Regarding the Cloud fonts - all the ones I have looked at so far have been exactly the same fonts which were available with some previous application release, or supplemental font packages, etc. So as far as I can see there are no special requirements. I also compared fonts obtained from the Windows store to those included in the various Supplemental Fonts packages - and they have all been the exact same fonts.

RosaWagner commented 2 years ago

Which version of PowerPoint on the Mac are you using?

16.54 (i think it's the last beta version? I clicked on some update option to see if next release would be changing something)

From what I have found it appears that while Mac PPT 2016 can use embedded fonts, it does appear that Mac PPT cannot embed the fonts itself.

The font does get embedded as long as you install several styles of it (since 1 year or 2). I always QA entire families so never got that behaviour before. But it can happen that a user wants to install and use only one non-regular style, and in that case the document doesn't show the font.

WPF Font Selection Model.pdf (PDF, 844KB)

Thanks for the doc!

@PeterCon contacted me by email and it seems they are looking into this :)

kenmcd commented 2 years ago

16.54 (i think it's the last beta version? I clicked on some update option to see if next release would be changing something)

I did find some more current info on embedding fonts in PowerPoint on the Mac. Here: https://support.microsoft.com/en-us/office/embed-fonts-in-documents-or-presentations-cb3982aa-ea76-4323-b008-86670f222dbc#OfficeVersion=macOS

Office 2016 on Mac does not work. "You can't embed fonts in PowerPoint 2016 for Mac but it does correctly display fonts that have been embedded in the file by a more modern version of PowerPoint. The other Office 2016 for Mac apps don't support embedded fonts."

Office 2019 on Mac does work if you have a Microsoft 365 subscription. "This feature is only available to Microsoft 365 Subscribers and in PowerPoint 2019 for Mac, version 16.17 or later." Not sure if that "and" means "or" or it means must meet both requirements. But I think it means both requirements.

EDIT: Yes, must have both requirements. Found more info here: https://www.rdpslides.com/pptfaq/FAQ00076_Embedding_fonts.htm

So the only way it will work is with a Microsoft 365 subscription with PPT 2019.