Skip to content

How to get a heart symbol filled with black color #2546

Answered by ronkok
AjayDhimanELS asked this question in Q&A
Discussion options

You must be logged in to vote

KaTeX \hearts and \heartsuit render a heart outline, ♡, U+2661, , so they do not help you. The Unicode character for a filled heart is ♥, U+2665. That glyph is not in the KaTeX fonts, but you can still use it and KaTeX will substitute the glyph from the Times New Roman system font.

KaTeX emulates LaTeX, and this is not a LaTeX function, so KaTeX will write at least one error to the console (two if in strict mode). If you don't mind a console error, then no worries. KaTeX does render the heart. Just copy ♥ and paste it into your work.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@AjayDhimanELS
Comment options

@AjayDhimanELS
Comment options

Answer selected by AjayDhimanELS
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants