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

331
Views
Cómo alinear texto usando 'justificar'

Actualmente estoy trabajando en un proyecto WebGL. Se me pide que configure las alineaciones de texto como un documento de Microsoft Word como se representa en Alineaciones de texto .

Hasta ahora, he logrado alineaciones 'izquierda', 'derecha' y 'centro' usando la documentación de Mozilla

Me pregunto si 'justificar' se puede lograr de alguna manera (el último en la imagen de alineaciones de texto).

Mi fragmento de código:

 let randomText = "abcd" let textAlignValue = "center" textCanvas = document.createElement('canvas'); ctx = textCanvas.getContext('2d'); ctx.font = '15px arial'; // pick font size and font family ctx.clearRect(0, 0, textCanvas.width, textCanvas.height); // clear content ctx.fillStyle = 'yellow'; // background color ctx.fillRect(0, 0, textCanvas.width, textCanvas.height); // fill background ctx.fillStyle = 'black'; // text color ctx.textAlign = textAlignValue; // align text ctx.fillText(randomText, textCanvas.width / 2, textCanvas.height / 2); // fill text
about 4 years ago · Santiago Trujillo
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!