span text not aligned with rest of text line in PDF

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

span text not aligned with rest of text line in PDF

Post by bonnie »

I'm making a PDF printout directly from Flare. One problem I've found is that span text doesn't vertically align on the text bottom of the rest of the text in the line. Has anyone else noticed this? If so, is there a way I can fix this?
Thanks,
Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: span text not aligned with rest of text line in PDF

Post by LTinker68 »

Check to make sure that that span tag doesn't have any padding or margin values in it and doesn't specify a line-height (you want all those values to be pulled from the parent tag that the span tag is inserted into).
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: span text not aligned with rest of text line in PDF

Post by bonnie »

Check to make sure that that span tag doesn't have any padding or margin values in it and doesn't specify a line-height (you want all those values to be pulled from the parent tag that the span tag is inserted into).
Thanks for the suggestion, Lisa.

I made sure that I had not set any padding, margin, or line height values for the span tag, but the misalignment remains. It is only a matter of about 1 point, but that is noticeable. The misalignment is about 1 point above the text baseline in the case where I have used a different font from the surrounding text. It is about 1 point below the text baseline when I use the same font but specify small caps as the font-variant.

This is in the PDF output. (I believe this may be a "bug".)
Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: span text not aligned with rest of text line in PDF

Post by LTinker68 »

Can you paste your styles for your <p> tag and the <span> tag you're using into the forum? Then we can see if we can recreate the issue.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: span text not aligned with rest of text line in PDF

Post by bonnie »

Can you paste your styles for your <p> tag and the <span> tag you're using into the forum? Then we can see if we can recreate the issue.
Thanks for asking, Lisa!

Here are the styles for the tags I'm using in my print medium:

Code: Select all

	p.Normal
	{
		font-family: 'Palatino Linotype';
		font-size: 10pt;
		line-height: 13pt;
		letter-spacing: -0.01em;
		text-align: left;
		margin-bottom: 1em;
		mc-hyphenate: never;
		margin-right: 0pt;
		orphans: 5;
		widows: 5;
	}

Code: Select all

	span.Emphasis
	{
		font-weight: normal;
		font-family: 'Lucida Sans Unicode';
		font-size: 8.5pt;
	}

Code: Select all

	span.small_caps
	{
		font-variant: small-caps;
	}
I should add that I have already reported a possibly related issue as a bug to MadCap. The issue is this: I cannot get a line-height less than 14 points in the PDF output (using a point size of 10 and the Palatino Linotype font.) In the PDF output, I get 14 points of leading for 10pt, 11pt, 12pt, and 13pt line-heights, and >14 pts leading for a 14pt line-height (44points/3 lines). (I have not tested other fonts or font sizes.)

MadCap reported to me that they have acknowledged this as a bug.

Also, to explain the negative letter-spacing values: I've found that letter spacing in the PDF output is too loose and I have to tighten it up this way. (This is true as well of some other fonts that I use in my print output (e.g., Lucida Sans Unicode).

Thank you very much for looking into the text misalignment problem for me.
Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: span text not aligned with rest of text line in PDF

Post by LTinker68 »

It does look to be a bug. The output in WebHelp and Word looks fine, but in PDF the span class is slightly raised.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: span text not aligned with rest of text line in PDF

Post by bonnie »

Thanks for verifying that, Lisa. I have reported it as a bug to MadCap.

Bonnie
Post Reply