We are about to switch to a new forum software. Until then we have removed the registration on this forum.
If I try to put greek letters in the text() function like γ or δ it gives me an error. How could you solve this? Thanks!
Maybe you've forgotten to add <meta charset=UTF-8> to the top of your HTML file? :-? https://developer.Mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset
<meta charset=UTF-8>
See it online here: http://p5ide.HerokuApp.com/editor#?sketch=57fa34e9980f18030076c28f
<meta charset=UTF-8> <script async src=http://p5js.org/assets/js/p5.min.js></script> <script> /** * UTF-8 Letters Test (v1.0.1) * GoToLoop (2016-Jun-10) * * https://forum.Processing.org/two/discussion/17085/ * visualize-greek-letters-in-a-sketch#Item_1 * * http://p5ide.HerokuApp.com/editor#?sketch=57fa34e9980f18030076c28f */ "use strict"; function setup() { createCanvas(700, 250); background('blue').fill('yellow').stroke('red').strokeWeight(2.5); textAlign(CENTER, CENTER).textSize(0x20); text('διχθαδίας κῆρας φερέμεν θανάτοιο τέλος δέ.\n' + 'Бу́ря мгло́ю не́бо кро́ет, Ви́хри сне́жные крутя́;\n' + '富士の風や扇にのせて江戸土産', width>>1, height>>1); } </script>
Answers
Maybe you've forgotten to add
<meta charset=UTF-8>
to the top of your HTML file? :-?https://developer.Mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset
See it online here: http://p5ide.HerokuApp.com/editor#?sketch=57fa34e9980f18030076c28f