Support » Plugin: Really Simple CAPTCHA for cformsII » Large fonts sizes don’t display correctly

  • javfuller


    Setting font size to anything over 18pt makes it so the top of the text is cut off. This is because by default the RSC plugins defaults to the baseline of the text being 18px from the top of the image.

    I found that setting the base based on image height or font size would work well. For example, in cforms2_really_simple_captcha.php where you set the image size, you can also set the base

    if ($width > 0 && $height > 0)
    $this->rsc->img_size = array($width, $height);
    $this->rsc->base = array($this->rsc->font_size / 2, $height / 2);

    Also, for large fonts, the character width needs to be adjusted.

    if ($font_size > 0)
    $this->rsc->font_size = $font_size;
    $this->rsc->font_char_width = $font_size * 0.75;

    This allows you to use arbitrary font and image sizes.

  • The topic ‘Large fonts sizes don’t display correctly’ is closed to new replies.