View Full Version : Use two fonts in imp files?


Moonraker
04-10-2008, 03:32 PM
I have a book in which there are lots of paragraphs representing a dream in the storyline.

I want to use a different font for these so they are noticeable.

However, as eBook Publisher does not recognise font-family names -- only serif or sans-serif -- I have used serif in the main body and sans-serif in the "dream" paragraphs.

My problem is getting the "dream" paragraph text to increase or decrease when selecting the zoom option.

The main body text does this but I cannot work out what I am doing wrong with the "dream" text.

In my html code I have a class set up for the "dream" text as follows:

.dream { font-family: sans-serif; font-size: 13pt;}

If I omit the font-size then the text appears too large.

I can get it to zoom if I use font-size: xx-small, small, medium etc but the text is far too large even using xx-small.

Is this a bug or is it me?

nrapallo
04-10-2008, 03:59 PM
I have a book in which there are lots of paragraphs representing a dream in the storyline.

I want to use a different font for these so they are noticeable.

However, as eBook Publisher does not recognise font-family names -- only serif or sans-serif -- I have used serif in the main body and sans-serif in the "dream" paragraphs.

My problem is getting the "dream" paragraph text to increase or decrease when selecting the zoom option.

The main body text does this but I cannot work out what I am doing wrong with the "dream" text.

In my html code I have a class set up for the "dream" text as follows:

.dream { font-family: sans-serif; font-size: 13pt;}

If I omit the font-size then the text appears too large.

I can get it to zoom if I use font-size: xx-small, small, medium etc but the text is far too large even using xx-small.

Is this a bug or is it me?

I'm afraid you have hit a limitation using the current "built-in" font sets. Sans-serif is a "large" font used mainly for headings. You may wish to try 'font-family: monospace; font-size: xx-small' or simply just use the same font but superscript it i.e. surround it with '<sup> ... </sup>' (EDIT: this doesn't work so well) or italize it i.e. '<i> ... </i>'. How about using a different color font, perhaps a medium gray.

Check the attachment here (http://www.mobileread.com/forums/attachment.php?attachmentid=10792&d=1203826248) starting on page 9 to see the current "built-in" font sets. You can change the view on the 1150 to see the effect of using the different sizes with zooming. Also, near the end of this test document, you will find a section on using color (ok grayscale for the 1150). Play with the different combinations. If you want the background to change, then you will need to put the 'dream' part inside an (invisible) table using the <td> and color.

By the way, DaleDe has a nice summary of how the different font sizes relate to the built-in sizes. Just check the website link under his signature in any post.

DaleDe
04-10-2008, 04:30 PM
I'm afraid you have hit a limitation using the current "built-in" font sets. Sans-serif is a "large" font used mainly for headings. You may wish to try 'font-family: monospace; font-size: xx-small' or simply just use the same font but superscript it i.e. surround it with '<sup> ... </sup>' (EDIT: this doesn't work so well) or italize it i.e. '<i> ... </i>'. How about using a different color font, perhaps a medium gray.

Check the attachment here (http://www.mobileread.com/forums/attachment.php?attachmentid=10792&d=1203826248) starting on page 9 to see the current "built-in" font sets. You can change the view on the 1150 to see the effect of using the different sizes with zooming. Also, near the end of this test document, you will find a section on using color (ok grayscale for the 1150). Play with the different combinations. If you want the background to change, then you will need to put the 'dream' part inside an (invisible) table using the <td> and color.

By the way, DaleDe has a nice summary of how the diferrent font sizes relate to the built-in sizes. Just check the website link under his signature in any post.

Here is the IMP file I used to determine the relationship of all the font sizes. you might try relative sizes in your font statement.

Edit: I have been asked for the source for this document so here it is. It is crude done quick and dirty with all the style in the main document.

Dale

Moonraker
04-10-2008, 06:46 PM
Thanks for your help guys.

After spending some time doing different tests I have decided to make it easier on myself and have all the "dream" text bold.

At least all the text will then respond to the zoom button.:thanks: