Comments (8)
I took some screenshots of larger busted glyphs to illustrate the problem (and hopefully suggest what the failure mode might be). Small glyphs break in a different way. The failure mode changes somewhere around font size 72 (instead of being completely busted, the fonts are somewhat recognizable), suggesting 1 inch as some magic factor.
from pathfinder.
Example of transition from font size 72 to font size 73, using Open Sans:
O
B
1
X
from pathfinder.
I also have a 2014 rMBP. I've experienced artifacts, although I don't remember if they were like these, at varying times. I would try to replicate but I actually can't build Pathfinder right now because fontsan depends on an old miniz-sys
that doesn't compile on my machine with the error could not find native static library 'miniz', perhaps an -L flag is missing?
.
from pathfinder.
I fiddled with some of the shaders to no avail but I strongly suspect a driver bug in computeCoverage
. I tried rearranging some of the code to remove conditionals, but nothing really helped.
Changing a2x to p0X.x + dPX.x
when slopeIsNegative
is false moves the artifacts in an interesting way that suggests that this method could be the the culprit:
} else {
- a2x = p0X.x;
+ a2x = p0X.x + dPX.x;
a0 = p1;
a1 = p0;
}
Before that change:
After that change:
from pathfinder.
If anyone can bisect this change down, that would be very helpful. (I can't reproduce, obviously…)
from pathfinder.
I bisected it and found 7bd3a48 is the first bad commit for the new artifact. It's parent 6d85cb3 works. There also was an old artifact that I ended up bisecting in order to find a good commit for the new bisect, so that info is in the log below as well.
8897145f54f6ca5c88983cd362f429c2ae29460b old artifact
77fa297380799e467f293d36ad8208334dbc159a old artifact
092b46e056dd17360078d52c7d60e28bc42cd4d2 good
81787f4750031976056b44819c0cdf0cd4e4e8ef old artifact
6a7c013e617cc0287f17630a6c30aeeccb0f9192 good
314185684cb5995c26bb0b4a33878ee50e9e648c old artifact
c2368bb71edcc9f806ed7b2002841f4737c5c5fb good
3352f869f0a921e1c3e942a8dae2cf5cd39a3e43 good
314185684cb5995c26bb0b4a33878ee50e9e648c is the first bad commit for the old artifact
2e90b3bce8db697052a1f17da670ebe76f34f874 no text at all
86df78f939c944df9da1f8c282dd8d3679947f4f good
5a1e4d4e606a2ec6617bdcfc0735133d966856d9 good
99c7e685e785b0a38ad2d30bd0650f3a76bbc943 good
7bd3a481105fa9f20bafbcfba6b9ed1cc1e7f573 is the first bad commit for the new artifact
d65bfb7fb20fffba15aa5203c26caa6d3794cd2e old artifact
86df78f939c944df9da1f8c282dd8d3679947f4f good
5a1e4d4e606a2ec6617bdcfc0735133d966856d9 good
99c7e685e785b0a38ad2d30bd0650f3a76bbc943 good
6d85cb338243a5f637aa829c45ef9a83927979b1 good
from pathfinder.
I did some debugging and the artifacts are the exact same as if I remove the early return in computeCoverage
: https://github.com/pcwalton/pathfinder/blob/7bd3a481105fa9f20bafbcfba6b9ed1cc1e7f573/shaders/gles2/common.inc.glsl#L263
and run it on my Iris Pro, which usually works. So it seems somehow the Apple Nvidia GPU shader compiler isn't compiling that early return properly.
Further, if I add a return 1.0
to the first branch of the following if statement, the early return starts working again and I get results that look reasonable except negatively sloped edges are aliased.
from pathfinder.
Confirmed fixed. Looks beautiful.
For posterity, the GPU/CUDA version on my machine:
from pathfinder.
Related Issues (20)
- Can pathfinder_color get a version bump to include the latest changes? HOT 1
- Project state HOT 3
- Mismatched dependencies in text package HOT 1
- Can't build demo for mac without EGL HOT 1
- Can not locate shaders and other resources
- Export as pdf HOT 2
- pathfinder_simd failed to compile with nightly toolchain on Apple M1 MBP
- [Dx9] Incorrect clipping when the destination texture width is not a multiple of the tile size
- PartialEq not implemented for pathfinder_simd::arm::F32x2 HOT 1
- android render problem HOT 3
- Compile Error on nightly, unknown feature `stdsimd` HOT 14
- Panicking when font is not found or can't be loaded
- Linking Error when building pathfinder_canvas with pf-text HOT 2
- Compile Error on nightly, platform_intrinsics - feature has been removed HOT 1
- use `portable_simd` for simd implementation
- cannot get bounding box of a path HOT 2
- Please publish a new crates.io release HOT 4
- compile issue on Fedora 39, freetype2 not found
- Crate does not build due to stdarch_arm_crc32 feature
- Fails to build on MacOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pathfinder.