fontforge / fontforge

Free (libre) font editor for Windows, Mac OS X and GNU+Linux
http://fontforge.github.io/
Other
6.52k stars 703 forks source link

"banding" in translucent outline #4270

Open skef opened 4 years ago

skef commented 4 years ago

Config: Arch Linux, GDK backend, post-release version from master, Cairo 1.17.2 ("+g52a7c79fd-2"), HiDPI (GDK_SCALE=2).

Under large magnification I'm seeing banding in the translucent contour edge:

tearing

The same thing happens with the edge for closed contours, although it's less obvious. I tried with GDK_SCALE=1 and I see it there too.

Obviously this isn't a work-blocker or anything, I'm just opening this to track the phenomenon.

ctrlcctrlv commented 4 years ago

I've seen this before too on Linux. Quickly tested on the Windows build, don't see it there, but might just need a test file.

skef commented 4 years ago

This should have the open contour in the image: banding_in_A.sfd.txt

jtanx commented 4 years ago

I couldn't repro on windows or in a linux vm. If I had to guess, it's some issue with cairo and/or how we're using cairo (maybe in it's stroking algorithm)

skef commented 4 years ago

@jtanx Any ideas on why it doesn't repro in your VM then? Could it be the version of Cairo? Fred and I are on Arch Linux and therefore the bleeding edge of every library.

jtanx commented 4 years ago

Maybe, I was running Ubuntu 18.04 which comes with cairo 1.15.10. On Windows I was running cairo 1.16

skef commented 4 years ago

I would put my (small amount of) money on a recentish cairo bug then. If our older stuff works it's less likely to be a problem with how we're calling the library.

I did a quick look through their recent issues and nothing stuck out but that doesn't mean much.

jtanx commented 4 years ago

For reference, I spun up an arch VM but didn't experience this issue. Granted I think my guest additions are broken so maybe that was with HW acceleration off. But anyway maybe something to do with your graphics driver?

fakhamatia commented 4 years ago

Scaling problem in Ubuntu 19.10 Screenshot from 2020-05-10 19-41-45

skef commented 4 years ago

@fakhamatia Assuming Ubuntu is using the GDK backend you need to make sure the environment variable GDK_SCALE is set to 2 either at the system level or for your account when FontForge is run.

If it's using the X11 backend -- that's trickier.

skef commented 3 years ago

Just did a quick check to see if this had resolved itself and it hasn't. My current cairo version is 1.17.4-3 (Arch Linux).