You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to use Konva text-decoration: line-through for Konva (align) Justify? If I use them both for custom fonts, the output is improper.
It did not support Konva (text-decoration) line-through and Konva (align) Justify for custom fonts at the same time.
This is how it looked when I tried to use them both.
It is working partially.
Sample code:
`
<title>Konva Custom Font Example</title>
<script src="https://cdn.rawgit.com/konvajs/konva/1.7.3/konva.min.js"></script>
`
`const stage = new Konva.Stage({
container: 'container',
width: window.innerWidth,
height: window.innerHeight
});
const layer = new Konva.Layer();
stage.add(layer);
// Add text with custom font, line-through decoration, and justify alignment
const text = new Konva.Text({
x: stage.width() / 4,
y: stage.height() / 4,
text: 'Jack Sparrow was a legendary pirate of the Seven Seas and the irreverent trickster of the Caribbean. A captain of equally dubious morality and sobriety, a master of self-promotion and self-interest, he fought a constant and losing battle with his own best tendencies while living the pirates life',
fontSize: 20,
fontFamily: 'Bebas Neue',
fill: 'black',
width: 200,
align: 'justify',
textDecoration: 'line-through'
});
layer.add(text);
layer.draw();`
The text was updated successfully, but these errors were encountered:
SanjayKumarKP
changed the title
Konva (align) Justify is not supporting for Konva (text-decoration) line-through.
Konva (align) Justify is not supporting for Konva (text-decoration) line-through while using custom fonts.
Oct 29, 2024
Is there a way to use Konva text-decoration: line-through for Konva (align) Justify? If I use them both for custom fonts, the output is improper.
It did not support Konva (text-decoration) line-through and Konva (align) Justify for custom fonts at the same time.
This is how it looked when I tried to use them both.
It is working partially.
Sample code:
<title>Konva Custom Font Example</title> <script src="https://cdn.rawgit.com/konvajs/konva/1.7.3/konva.min.js"></script> ` `const stage = new Konva.Stage({ container: 'container', width: window.innerWidth, height: window.innerHeight });`
const layer = new Konva.Layer();
stage.add(layer);
// Add text with custom font, line-through decoration, and justify alignment
const text = new Konva.Text({
x: stage.width() / 4,
y: stage.height() / 4,
text: 'Jack Sparrow was a legendary pirate of the Seven Seas and the irreverent trickster of the Caribbean. A captain of equally dubious morality and sobriety, a master of self-promotion and self-interest, he fought a constant and losing battle with his own best tendencies while living the pirates life',
fontSize: 20,
fontFamily: 'Bebas Neue',
fill: 'black',
width: 200,
align: 'justify',
textDecoration: 'line-through'
});
layer.add(text);
layer.draw();`
The text was updated successfully, but these errors were encountered: