Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cascadia mono, when used in PowerPoint, does not print correctly #779

Open
david-stewart opened this issue Oct 2, 2024 · 8 comments
Open
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@david-stewart
Copy link

Windows Terminal version

No response

Windows build number

No response

Other Software

Sorry to post here, it is probably more of a PowerPoint error. When I use the font Cascadia Mono in PowerPoint (Build 18025.20104) , then the font is wildly wrong when it exports to PDF (either via Microsoft printer, or directly exported). This doesn't happen from MS Word.
For example, see this screenshot: https://d.pr/i/JJh5Q7
I discovered when pasting test from Terminal into PowerPoint and then printing. I think the only solution for me is to change terminal's default font to Consolas, but it would be a pity.

Steps to reproduce

Make any text in PowerPoint Cascadia Mono (or Cascadia Code). Print it to PDF (or even look at the print preview) and see that it is very wrong.
PowerPoint version is Build 18025.20104
Windows Version is "10.0.22631 Build 22631"

The behavior for Word is not the same.

Here is an example from a screenshot:
CascadiaMono

Expected Behavior

That it will render the text correctly when translating to PDF.

Actual Behavior

It doesn't. See abvove.

@david-stewart david-stewart added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Oct 2, 2024
@DHowett
Copy link
Member

DHowett commented Oct 2, 2024

Alright this is downright wild. It looks like something we've seen before over at the Cascadia repo, but I'm not 100% sure...

@DHowett DHowett transferred this issue from microsoft/terminal Oct 2, 2024
@DHowett
Copy link
Member

DHowett commented Oct 2, 2024

And now it lives in the Cascadia repo!

@sonnemaf
Copy link

I have the same problem. This is very annoying if you copy code from Visual Studio and paste it into PowerPoint. I do this all the time.

I use the 'Replace Font' feature in PowerPoint to replace 'Cascadia Mono' with 'Cascadia Mono PL'. This font prints correctly.

@tndata
Copy link

tndata commented Oct 30, 2024

I have the same problem!

@kenmcd
Copy link

kenmcd commented Oct 30, 2024

Are you using the static fonts or the variable fonts in each application?
Do you have both the static fonts and the variable fonts installed?

The consistency of the errors in the bad text points to a character mapping issue.
And the replacement of the font working also indicates that the actual text is not corrupted.
Which also means that pasting as plain text may work,

Some guesses....
If both the static and the variable fonts are installed, there will be name conflicts which may lead to odd results like this.
Try using just one or the other.
Both apps using just the statics.
Or both apps using just the variables.

Keep in mind that PowerPoint cannot export variable fonts to PDF correctly.
But more current versions may print them correctly.

@sonnemaf
Copy link

sonnemaf commented Nov 1, 2024

@kenmcd Thanks for your comment. Deleting the variable fonts and installing the static versions solved my problem.

@sonnemaf
Copy link

sonnemaf commented Nov 1, 2024

I found some nice document explaining why you should not use Variable fonts in PowerPoint.

@AndyPT
Copy link

AndyPT commented Nov 15, 2024

Just found the exact same weird problem while converting PPTX into PDF.

The slide content in PPTX:
Image

Turns into this in PDF:
Image

And while we see all the incomprehensible accentuation, trying to select and copy-paste the text just gets the original "SELECT ..."

It is clear this is a bug, either from PowerPoint and/or from the variable font format that Cascadia Mono is using (see comments above).

Either way, needs fixing on both sides.

WORKAROUND:
As mentioned above, substituting variable font format with static font format works.

  1. Close any applications using fonts (PowerPoint, Word, etc.);
  2. Find the latest here https://github.com/microsoft/cascadia-code/releases;
  3. Go to %WinDir%\Fonts (typically C:\Windows\Fonts ) and remove all fonts starting with Cascadia;
  4. From the downloaded ZIP, extract all, and then select all the files from the TTF\Static directory, right click and ask to Install. There are about 72 files there (at the time of writing this).
    It should now work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

6 participants