-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JEWEL-746] Load inline markdown images using Coil3 #2924
base: master
Are you sure you want to change the base?
Conversation
b0ba3c3
to
7fdb5ac
Compare
They look like entirely different images... Are you sure it's the same image it's being displayed, and that it's loading correctly in the first case? That to me looks like a "broken image" placeholder (which also is way too big) SVG files have an intrinsic size declared in their root node, and any renderer should adhere to that |
images I posted earlier are examples of how JCEF renders my "README.md" which this is how compose shows the same things: |
I see. I had misinterpreted the original message, sorry 🙏 The first image (the broken square) has a declared size of 800x800 px, encoded as As for the latter, I think it's because the text for whatever reason just doesn't get rendered: <g text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<use x="5.5" y="2" fill="#010101" fill-opacity=".3" href="#logo" />
<use x="5.5" y="1" fill="#fff" href="#logo" />
<text x="40.5" y="15" fill="#010101" fill-opacity=".3">build</text>
<text x="40.5" y="14" fill="#fff">build</text>
<text x="83.5" y="15" fill="#010101" fill-opacity=".3">passing</text>
<text x="83.5" y="14" fill="#fff">passing</text>
</g> Again, possibly some unsupported value in there that Skia ignores. That's sort of weird since Skia can interpret image sizes with units, and render text — it does in Chrome! But maybe there is some setup that is missing, or Chrome does some magic stuff. Either way, these are either CMP or Skiko bugs :) |
I'm going to create a separate issue for SVG regressions. Should it go to youtrack? |
knownSize.value = state.result.image.let { ImageSize(it.width, it.height) } | ||
} | ||
}, | ||
// TODO: log onError as warning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an easy way to log errors inside of compose rendering?
It supports every image as an inline node; Using built-in coroutine library and ktor2 from the platform; Added SVG support using a coil dependency.
Please, no. Stick with GH until further notice. You'll know together with everyone else when YT is usable. We're still waiting. |
It supports every image as an inline node