captcha icon indicating copy to clipboard operation
captcha copied to clipboard

How to modify fonts?

Open andyzu opened this issue 7 years ago • 2 comments

How to modify fonts?

andyzu avatar Nov 25 '18 14:11 andyzu

How to modify fonts?

follow

jiyonghe avatar Jul 25 '19 06:07 jiyonghe

just put in the config/captcha.php file the key fonts. Example:

return [
    'characters' => ['2', '3', '4', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'm', 'n', 'p', 'q', 'r', 't', 'u', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'X', 'Y', 'Z'],
    'default' => [
        'length' => 4,
        'width' => 120,
        'height' => 36,
        'quality' => 90,
        'math' => false,
        'lines' => 0,
        'bgImage' => false,
        'fonts'    => [resource_path('fonts/times-new-roman.ttf')],
        'fontColors' => ['#f08300', '#e3000f', '#a72878', '#064597']
    ],
];

izzius94 avatar Feb 04 '20 16:02 izzius94