endroid / qr-code

QR Code Generator
https://endroid.nl
MIT License
4.46k stars 728 forks source link

label display garbled code #228

Closed githubyyf closed 4 years ago

githubyyf commented 4 years ago

Hi, I set the label to contain Chinese, but display garbled code code like this : $qrModel = new QrCode(); $qrModel ->setText($text) ->setSize(300) ->setPadding(10) ->setErrorCorrection('high') ->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]) ->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]) ->setLabel($label) ->setLabelFontSize(16) ->setImageType(QrCode::IMAGE_TYPE_PNG); // save it to a file $qrModel->save($filePath); qr code image:

image

githubyyf commented 4 years ago

102

51