Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
Is it possible to use HTML unicodes inside HTML canvas?

I am trying to build a two-dimensional chess game and found that there are Unicode for chess pieces built into HTML, is it possible to use those inside a canvas? If so, how?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Unicode by itself doesn't have anything to do with HTML, though HTML supports Unicode character escapes.

Regardless, you can just render text in <canvas>:

const canvas = document.querySelector("canvas");
const ctx = canvas.getContext("2d");

const size = 16;
ctx.font = `${size}px sans-serif`;
ctx.fillText("\u2654", 0, size); // See https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode
<canvas></canvas>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!