Open AnnoyingTechnology opened 6 years ago
Had the same issue. The Problem is the font: "captcha2.ttf". I removed it (rearranged the random number) and the captcha doesn't show any uppercase letters again.
@MaksNovalis Would you mind offering a pull request with your changes so that other can benefit from it ?
@Gregwar A fix for this would be nice!
Hello, Actually no uppercase letters are generated in first place, maybe the confusion is related to the fonts or the appearance of image
However, I suggest you to use case insensitive comparsions, and as well offer some tolerance for 0
vs O
and 1
vs l
I added an helper PhraseBuilder::comparePhrases()
to do that, and updated the example in demo/form.php
Hi @Gregwar,
Actually no uppercase letters are generated in first place, maybe the confusion is related to the fonts or the appearance of image
The font captcha2.ttf contains only upper case letters, this is the reason that some captchas gets displayed in upper case letters.
This is a screenshot of the captcha2.ttf
where you can see that the lower case letters are upper case:
Just another font as comparison:
I added an helper PhraseBuilder::comparePhrases() to do that, and updated the example in demo/form.php
This helper is cool and I will use it, but we tell out user that all letters in the captcha are in lowercase therefore some captcha, displayed in upper case, lead to confusion.
Maybe we should replace that font as well so it would be more clear
Maybe we should replace that font as well so it would be more clear
yes, it's causing confusion when trying to hit correct phrase sometimes...
When a picture generated uses uppercase letters,
->getPhrase()
returns a lowercase phrase.