Comments (14)
Ah, but that's the same exact error, just a different backend. At the point drawPaintSolid is called the path is None in both cases. cairo tries to replay the path, skia tries to access path.path
.
from fontgoggles.
I get the same with my totally different implementation of blackrenderer using cairo. Other glyphs are fine, but when I view this one and lots of others I get flashing or nothing.
Traceback (most recent call last):
File "/Users/somebody/glyph_viewer.py", line 530, in OnPaint
self.brFont.drawGlyph(self.currentGlyphName, cairoCanvas,
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/font.py", line 166, in drawGlyph
self._drawGlyphCOLRv1(glyph, canvas)
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/font.py", line 191, in _drawGlyphCOLRv1
self._drawPaint(glyph.Paint, canvas)
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/font.py", line 211, in _drawPaint
drawHandler(paint, canvas)
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/font.py", line 219, in _drawPaintColrLayers
self._drawPaint(self.colrLayersV1.Paint[i], canvas)
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/font.py", line 211, in _drawPaint
drawHandler(paint, canvas)
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/font.py", line 353, in _drawPaintComposite
self._drawPaint(paint.BackdropPaint, canvas)
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/font.py", line 211, in _drawPaint
drawHandler(paint, canvas)
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/font.py", line 223, in _drawPaintSolid
canvas.drawPathSolid(self.currentPath, color)
File "/Users/somebody/somevenv/lib/python3.10/site-packages/blackrenderer/backends/cairo.py", line 105, in drawPathSolid
path.replay(self._pen)
AttributeError: 'NoneType' object has no attribute 'replay'
from fontgoggles.
That may be the same error, I'll have a look.
from fontgoggles.
Definitely a bug in blackrenderer, though I get yet another error:
Traceback (most recent call last):
File "/Users/just/code/git/BlackFoundry/black-renderer/venv/bin/blackrenderer", line 33, in <module>
sys.exit(load_entry_point('blackrenderer', 'console_scripts', 'blackrenderer')())
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/__main__.py", line 43, in main
renderText(
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/render.py", line 78, in renderText
font.drawGlyph(glyph.name, canvas, palette=palette)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/font.py", line 166, in drawGlyph
self._drawGlyphCOLRv1(glyph, canvas)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/font.py", line 191, in _drawGlyphCOLRv1
self._drawPaint(glyph.Paint, canvas)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/font.py", line 211, in _drawPaint
drawHandler(paint, canvas)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/font.py", line 219, in _drawPaintColrLayers
self._drawPaint(self.colrLayersV1.Paint[i], canvas)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/font.py", line 211, in _drawPaint
drawHandler(paint, canvas)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/font.py", line 353, in _drawPaintComposite
self._drawPaint(paint.BackdropPaint, canvas)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/font.py", line 211, in _drawPaint
drawHandler(paint, canvas)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/font.py", line 223, in _drawPaintSolid
canvas.drawPathSolid(self.currentPath, color)
File "/Users/just/code/git/BlackFoundry/black-renderer/Lib/blackrenderer/backends/skia.py", line 104, in drawPathSolid
self.canvas.drawPath(path.path, paint)
AttributeError: 'NoneType' object has no attribute 'path'
from fontgoggles.
But FontGoggles should also not crash like that when it encounters a blackrenderer bug.
from fontgoggles.
I don't know what non-BMP has to do with it. 🎛 🎟 🎫 all fail for me, but everything else seems fine from what I can tell so far.
from fontgoggles.
Probably it is this particular glyph. It is built using the COLRv1 composition operator COMPOSITE_SRC_IN, but "backend" is empty. It does not look good (font-side) and I am investigating it (and will open issue in Noto Color Emoji if I find something), but I don't think renderer should crash.
from fontgoggles.
@yarmola, there'a already more discussion and analysis over at BlackFoundryCom/black-renderer#116. The font is fine, but blackrenderer doesn't implement this case correctly.
from fontgoggles.
hey Yuri, the backround is not empy, it's simply unbounded, which is valid and spec'ed here: https://learn.microsoft.com/en-us/typography/opentype/spec/colr#metrics-and-boundedness-of-color-glyphs-using-version-1-formats
from fontgoggles.
Right, thanks!
Funny that in the sample above in the spec
They have unbounded gradient fill in "source" part of the composite operator while in the real font it is in the "backdrop" part (and it makes more sense).
I checked SVG origin of this glyph and it has "group" of objects with assigned transparency.
Anyway, I think I should move to the black renderer repo with this, I believe the issue related to FontGoggles is clear :)
from fontgoggles.
They have unbounded gradient fill in "source" part of the composite operator while in the real font it is in the "backdrop" part (and it makes more sense).
good point, we should fix that actually. Mind filing an issue for this on the https://github.com/googlefonts/colr-gradients-spec repo?
from fontgoggles.
This should be fixed in FontGoggle 1.7.0: https://github.com/justvanrossum/fontgoggles/releases
from fontgoggles.
They have unbounded gradient fill in "source" part of the composite operator while in the real font it is in the "backdrop" part (and it makes more sense).
good point, we should fix that actually. Mind filing an issue for this on the https://github.com/googlefonts/colr-gradients-spec repo?
No, please open an issue on the COLR page of the OT spec. (For the figure in the spec, an SVG with feComposite was used to create the example, it in that SVG the rectangle with the alpha gradient is the destination (in2
attribute), not the source (in
attribute).) If source and destination are reversed (as currently in the spec's figure), then the result would be the black alpha-gradient rectangle clipped to the circle.
from fontgoggles.
For COMPOSITE_SRC_IN, the PaintComposite is bounded if either the source or destination is bounded. That's implicit in the definition in the CSS spec. If some library is failing because the source graphic is unbounded even though the destination graphic is bounded, then that would seem to be either a bug in that library or a limitation of that library that implementations using it need to work around.
from fontgoggles.
Related Issues (20)
- Vanilla 0.3.0 broke the layout on macOS 10.10
- Move segmenting.py to fonttools HOT 2
- Idea: Overlay fonts to compare vertical positions &c HOT 2
- Follow symbolic links HOT 1
- Question: FG and hb-shape give different results HOT 2
- Fonts disappear when reopening, but reappear if a showing font is moved in the view
- RTL: glyph column reversed? HOT 4
- Default-enable `chws` or `vchw` font feature
- Font File name static position
- Feature request: Capitalize/Title case/Caps to lowercase
- Feature request: turn off all features / toggle
- pytz.exceptions.UnknownTimeZoneError: 'GMT' HOT 3
- Windows ??
- Strange glyphs displayed when using private use area (PUA) HOT 7
- Keep test text when font changes HOT 1
- Bundle glyphsLib, so we can use its feature writers
- Trouble compiling features when "languagesystem math dflt;" has been defined HOT 4
- Previews sometimes fail when multiple source files are changed
- Distorted preview when UFO contains both kerning and a kern feature HOT 9
- Build issues (v1.7.4/v1.8/master) HOT 8
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 fontgoggles.