<Surf> = <Font>.render(text, antialias, color) <spanclass="hljs-comment"># Background color can be specified at the end.</span>
</code></pre>
<div><h3id="sound">Sound</h3><pre><codeclass="python language-python hljs"><Sound> = pg.mixer.Sound(<path/file/bytes>) <spanclass="hljs-comment"># WAV file or bytes/array of signed shorts.</span>
<Sound>.play/stop() <spanclass="hljs-comment"># Also set_volume(<float>), fadeout(msec).</span>
<Sound>.play/stop() <spanclass="hljs-comment"># Also set_volume(<float>) and fadeout(msec).</span>