Font Size not constant

yanku - June 2, 2009 - 04:36
Project:Facelift Image Replacement Integration
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Generally, its a great module, because its so simple!

I applied flir to my navigation.
It happens that short words are rendered larger than longer words.

I wonder if there is a maxwidth setting somewhere.

#1

j0rd - June 15, 2009 - 15:23

I have the same issue as well.

My longest title is replaced using a smaller font size and it make my website look in consistent. I'm curious why this is going on and how we can resolve this.

#2

j0rd - June 15, 2009 - 17:25

A little more digging into this module and flir turns out that there's a bunch of flir options, which this module does not let you to configure. These flir specific options are quite in depth and are ment to be tied to your particular fonts. I believe they should be opened up on the configuration page for flir and have to be configured to each font that added.

The particular option which relates to the miss match font sizes, is the flir option called "mode". I believe by looking at the code flir mode options are infact modules and you can add new ones. Nifty. By default the flir module for drupal uses "progressive" and if you want your words to wrap you will have to use "wrap" mode.

In your flir.module you set this specifically by changing this around line 244

<?php
if($FLIR['output'] == 'auto')
   
$FLIR['output'] = $FLIR['bkg_transparent'] ? 'png' : 'gif';
?>

to

<?php
if($FLIR['output'] == 'auto')
   
$FLIR['output'] = $FLIR['bkg_transparent'] ? 'png' : 'gif';

// Changing "mode" from default (progressive) to wrap.
   
$FLIR['mode'] = 'wrap';
?>

There's a bunch of flir options which you can play with. Here's some documentation, but I find it rather incomplete: http://facelift.mawhorter.net/doc/ . If you really what to know what your other options are take a look at the code.

#3

yanku - June 20, 2009 - 12:36

Thanks for your input.
but after doing so I get an error:

Parse error: syntax error, unexpected T_VARIABLE in (..)/sites/all/modules/flir/flir.module on line 244

#4

j0rd - June 19, 2009 - 11:43

The only thing you should be adding is

$FLIR['mode'] = 'wrap';

I'm pretty sure this compiles, so you've probably done something wrong.

#5

yanku - June 20, 2009 - 12:39

yes, I only added that line.

But I gave up FLIR anyways, because I tested it on MS Explorer 5 & 6, and the module is not working there at all.

#6

jalama - October 6, 2009 - 17:57

it's alao worth noting that flir only supports pt and px, not em or % when applying font-size in css.

http://facelift.mawhorter.net/doc/flir-js-flirstyle-object-csssize

 
 

Drupal is a registered trademark of Dries Buytaert.