Skip to content
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

Konva (align) Justify is not supporting for Konva (text-decoration) line-through while using custom fonts. #1846

Closed
SanjayKumarKP opened this issue Oct 29, 2024 · 0 comments

Comments

@SanjayKumarKP
Copy link

SanjayKumarKP commented 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.

SampleText

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();`

image

@SanjayKumarKP 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
@lavrton lavrton closed this as completed in 9322bfa Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant