marp-team / marp-vscode

Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode
MIT License
1.58k stars 75 forks source link

preview of slides do not scale properly on linux #8

Closed tosaba closed 5 years ago

tosaba commented 5 years ago

having marp-cli integrated into vscode is really great, I just noticed that in the latest version, the slides do not scale properly in the preview panel

Version: 1.31.1 Commit: 1b8e8302e405050205e69b59abb3559592bb9e60 Date: 2019-02-12T02:19:29.629Z Electron: 3.1.2 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Linux x64 4.15.0-45-generic

image

yhatt commented 5 years ago

I have never seen this scene in Windows and macOS. I'm going to start testing in Linux. Would you have a minimum Markdown to reproduce this?

I had battled against the scaling bug in last year. (https://github.com/marp-team/marpit/pull/35, https://github.com/marp-team/marp-cli/pull/15) VSCode uses the old Chromium 66, and it revives me an old headache. 😣

tosaba commented 5 years ago

Here is the minimum example. I also tested it with all my markdown related extensions being deactivated, but they don't interfere (except markdown all in one #9)

---
marp: true
---

# header

- bullet point contents
- bullet point contents
- bullet point contents

---

image

yhatt commented 5 years ago

I've tested provided Markdown in VSCode 1.31.1 and ubuntu 18.10, but it did not reproduce.

screenshot from 2019-02-24 00-03-13

yhatt commented 5 years ago

The other probable case to interfere is custom CSS style. Would you have any CSS file defined in markdown.styles preference?

In addition, it's worth a try to run VSCode with --diable-gpu option.

tosaba commented 5 years ago

For me, it appears with default options and disabled extensions (v. 1.31.1 , ubuntu 18.04). I also didn't link any css stylesheets. I tested this on two separate computers with different graphics cards.

I also started vscode from the command line with --disable-gpu, but there is no difference.

yhatt commented 5 years ago

I had tried to reproduce again in ubuntu 18.04.1 LTS, but it works correctly.

We added help wanted tag. PR is welcome if anyone resolves this.

yhatt commented 5 years ago

My co-worker has reported a reproducible setting: "window.zoomLevel": 1.

zoom

@tosaba Could you confirm to show slide with correct scaling by resetting zoom level?

tosaba commented 5 years ago

Thanks. I confirm that this causes the issue in my case

yhatt commented 5 years ago

Done. An updated v0.1.0 has a workaround for zoom level. Previewed slide would have correct scales.