I am not able to change font size of label. I am creating label without bundle. I did not find it in README. Here is the code I am using
use Endroid\QrCode\Color\Color;
use Endroid\QrCode\Encoding\Encoding;
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelLow;
use Endroid\QrCode\QrCode;
use Endroid\QrCode\Label\Label;
use Endroid\QrCode\Logo\Logo;
use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeMargin;
use Endroid\QrCode\Writer\PngWriter;
I am not able to change font size of label. I am creating label without bundle. I did not find it in README. Here is the code I am using
use Endroid\QrCode\Color\Color; use Endroid\QrCode\Encoding\Encoding; use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelLow; use Endroid\QrCode\QrCode; use Endroid\QrCode\Label\Label; use Endroid\QrCode\Logo\Logo; use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeMargin; use Endroid\QrCode\Writer\PngWriter;
$writer = new PngWriter();
// Create QR code $qrCode = QrCode::create(''.$data["realqrcode"].'') ->setEncoding(new Encoding('UTF-8')) ->setErrorCorrectionLevel(new ErrorCorrectionLevelLow()) ->setSize($qr_size_doc) ->setMargin($qrmargin) ->setRoundBlockSizeMode(new RoundBlockSizeModeMargin()) ->setForegroundColor(new Color($fr, $fg, $fb)) ->setBackgroundColor(new Color($br, $bg, $bb));
// Create generic logo $logo = Logo::create(DIR.'/logo.png') ->setResizeToWidth($qrlogosize);
// Create generic label $label = Label::create(''.$qr_label_doc.'') ->setTextColor(new Color($lr, $lg, $lb)) ->setFont(new NotoSans(20));
I am new to object oriented programming. I would appreciate if you could provide sample code for the bold line of code above.