text with different fonts not aligning

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
livetoski
Sr. Propeller Head
Posts: 135
Joined: Thu Aug 30, 2007 7:10 am
Location: Ottawa

text with different fonts not aligning

Post by livetoski »

My normal text uses a sans serif font. When I apply a span code that has a serif font, it does not align with the paragraph text. This looks crappy and there doesn't seem to be anything I can do in the stylesheet to change this, except not use two different font families.

Can anyone help with this? I'd like to be able to go from one font family to another within a sentence and not have the sentence go up and down the stairs.

Thanks. Linda
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: text with different fonts not aligning

Post by LTinker68 »

I don't think there's a way around it because the line height of a serif font is different from the line height of a sans-serif font, unless they're both in the same font family. You could possible adjust the font-size in the span style to get it closer. For instance, if your normal font is 10pt then you may have to up the span font-size to 11pt to get the serif closer to the sans-serif, or vice versa. You could also try specifying a line-height for the base paragraph tag -- that might force the taller font to a shorter line height, but I've never tried it so I don't know if it'll work or look good.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
livetoski
Sr. Propeller Head
Posts: 135
Joined: Thu Aug 30, 2007 7:10 am
Location: Ottawa

Re: text with different fonts not aligning

Post by livetoski »

Thanks Lisa. I should have been clearer.

In the web layout, in the Flare project the text is offset, in the local preview and in the final product it is in line.

In the print layout, the second text is offset at every stage. We have submitted our CSS to CSS experts on our UI team, and they can't determine what the problem is. We are just going to live with it for a while and see if it doesn't resolve in a new iteration of Flare. Or change our span code to a colour and font weight, instead of a text change.

Thanks. Linda
livetoski
Sr. Propeller Head
Posts: 135
Joined: Thu Aug 30, 2007 7:10 am
Location: Ottawa

Re: text with different fonts not aligning

Post by livetoski »

print: different fonts not aligning in output

So this is actually a bug. I just talked with Ryan in technical support, and it's a bug specific to print only, as the web help uses a different engine to render and justifies the difference between fonts.

My solution for now is to use italics for this span code in the print medium for the CSS until the bug is fixed.

bug 28320
Post Reply