Text gets blurry when scrolled to some position with dpi scaled

Steps to reproduce

This is using default theme and no other visual adjustments. Screenshot is with Consolas font and Live Preview mode, however this happens in source mode and reading mode as well.

Expected result

RGB subpixel rendered text for increased text clarity.

Actual result

Only grayscale antialiasing (see screenshot) for text. However, text in code blocks will have RGB subpixel antialiasing.

Environment

  • Operating system: Windows 10
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.14.5
    Installer version: v0.14.5
    Operating system: Windows 10 Enterprise 10.0.18363
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 1
    Safe mode: off
    Plugins installed: 4
    Plugins enabled: 4
    1: Periodic Notes
    2: Hider
    3: Minimal Theme Settings
    4: Mousewheel Image zoom

Additional information

This is regular text in live preview, with only grayscale antialiasing:

This is text in a code block, with RGB subpixel rendering:

does it happen in the sandbox vault (no themes, no css, no plugins)?

I can’t reproduce it.

Odd. I just did a series of tests. It appears this happens if I paste text in from VS code, while including some formatting. At that point, the entire file becomes “corrupted” in some way and all text in that note will lose subpixel rendering.

The reason I’ve been seeing this error so much is that I’ve been switching to Obsidian from Dendron notes in VS Code.

I will mitigate for now by pasting as plain text only. I guess the bug is the fact that subpixel rendering can change based on pasted text.

To clarify, this testing was done in a sandbox vault. I think it could be related to copy-pasting text from another Electron app.

works for me

I’ve been doing some additional experimentation in a new sandbox vault. In this vault the only two settings changes I’ve made are turning on line numbers and changing the editor font to Consolas.

I was mistaken before regarding pasting from VS Code specifically (or any other application) being the problem. Here I’ve reproduced the issue by simply making the file a certain number of lines (or perhaps it’s characters or some other measure, I’m not sure)

After 18 lines of test text the subpixel rendering works fine.

After I paste the 19th line of text (or type it out, and enter the line break) the entire file falls back to grayscale antialiasing, and text is noticeably less crisp.

Screenshots zoomed in and aligned side-by-side for a better comparison:

I’m running 150% scaling in Windows 10. Nvidia GPU, 4k monitor. This happens with hardware acceleration turned on or off in Obsidian settings.

This is something specific to your system. I don’t know what it is. I don’t know if obsidian is involved. Maybe it’s a weird chrome/electron bug.

More troubleshooting. I’ve found this occurs whenever the text field is long enough to cause the scrollbar to appear.

same thing.

I will leave this BR open in case somebody else has the same issue in the next weeks.

After some googling I found this Atom (Electron-based IDE) issue on Github and corresponding comment.

Adding --force-device-scale-factor=1 as an Obsidian startup flag as mentioned by the commenter works around the issue and maintains subpixel rendering in the preview once it reaches scrolling length.

Obsidian launches at 66% of the size (ignoring my system-wide 150% scaling) but I can use Obsidian’s zoom to get things back to the size they were before.

Ok so this is an electron problem. I haven’t seen an upstream issue for this.

Thanks for diggin this up. We’ll see if we can do a workaround similar to atom.

Bump. Leaving this comment just for the record.
I had the same dpi issue. For me, not only the text but all of the UI shrinked.
Even reinstalled obsidian but the problem persisted.
Setting flag --force-device-scale-factor=1 did solve it.
But would love to see it being fixed in the future.