开发者

Wordpress FLIR (Facelift Image Replacement) plugin clipping off end of text

I'm using the FLIR for Wordpress plugin (v0.8.9.2) with FancyFonts enabled. I'm running Wordpress 3.1. The problem I'm having is that it appears the plugin is cutting off a couple pixels off of the end of some of the text that it generates. It doesn't do it for all text, but where it happens, it happens consistently.

Here are some examples:

Wordpress FLIR (Facelift Image Replacement) plugin clipping off end of text

Wordpress FLIR (Facelift Image Replacement) plugin clipping off end of text

Wordpress FLIR (Facelift Image Replacement) plugin clipping off end of text

In my search for a solution, I've found a number of people with this issue, but never any sol开发者_高级运维utions. Any ideas would be greatly appreciated. Thank you!


I know this was asked quite a while ago, but while researching the problem I came up with a solution. Every page I'd read on this was a bunch of people bickering about the source of the problem and reproducing it, but nobody provided a solution.

This doesn't fix the problem at its source, but it works perfectly. Open generate.php

Find:

$FLIR['text']                   = html_entity_decode_utf8($FLIR['text_encoded']);

Replace With:

$FLIR['text']                   = html_entity_decode_utf8($FLIR['text_encoded']) . " ";

All it does is force a space after every input string. The space is rendered along with the rest of the text, but is cut off (so you don't see it). This doesn't add the space to the actual HTML, so if it's rendered using a text-browser, rendered without FLIR, or accessed by a crawler (for SEO) the additional space will not show. It is only inserted into the PHP function which creates the image.

After searching for about an hour, I thought it would be helpful for there to be at least one fix on Google.

EDIT: This doesn't work for text with letter-spacing. I was about to give up and just not use letter spacing, but I found this this worked (again, not solving the problem at the source but fixing the visual issue in the same way). Open inc-flir.php

Find:

    return rtrim($ret);

Replace With:

    return $spacetxt . rtrim($ret) . $spacetxt;

This inserts the same amount of space on either side of the image as are in-between each character. I added the spaces to both the left and right side so that the text will be mostly centered.

EDIT AGAIN:

Oh yeah! And don't forget clean both FLIR's cache and your browser's cache or you wont see the updates!


Thanks. i would use font-face to fix the problem, but BOTH answers (on those php´s) made the trick.

The problem was with stable version 1.2, then I found v2.0beta3 out there. PROBLEM WAS WITH CHROME , by the way...

Oh... i you use mode=´wrap´, you´ll probably still have the problem with chopped text at the last part of the paragraph. In a phrase, the width of an H1 cuts off the last part of the letter, so I added a non breaking space directly to the problematic word. Example B&A:

<h3>Nuestra visi&oacute;n de la Seguridad Inform&aacute;tica </h3>

then...

<h3>Nuestra visi&oacute;n de la Seguridad&nbsp; Inform&aacute;tica </h3>

Voilá! So, three patches to fix an OLD php font plugin... and your help was gold for me. Thanks!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜