Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

View Poll Results: What unit should I use ?
em 5 55.56%
pt 1 11.11%
px 1 11.11%
none of the above 1 11.11%
it doesn't matter, all are ok 1 11.11%
Voters: 9. You may not vote on this poll

Reply
 
Thread Tools Search this Thread
Old 05-04-2010, 04:11 AM   #16
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,195
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by charleski View Post
Can the reader chose to go smaller? I'm just used to my 505 in which the book opens at the 'S' zoom level and you can make the text larger, but not smaller.
Yes, there are 12 font sizes to choose from, and the choice is global, for all books, until you change it again. Relative font sizes are always relative to the size you choose. I don't know about absolute font sizes, though.
Jellby is offline   Reply With Quote
Old 05-04-2010, 04:51 AM   #17
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 64,010
Karma: 42472847
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Kobo H2O, N7
Quote:
Originally Posted by NASCARaddicted View Post
Well,basically I gotta say: yes, I want margins to change with the font size.

O.k. I admit, sometimes it ain't so good: for example when it's something like the start of a chapter, I use top margin 5 em, so that there is some space before the chapter title.

However, especially when it comes to "characters per line", I see it different. With my CSS, when a new paragraph starts, it starts with a text intend of 1.5 em. And I removed the empty line between 2 paragraphs, so it really looks like a paper book.
Defining paragraph intents in "em" is absolutely fine. Same applies to line indents for poetry; you want them to scale with the text.

What you probably DON'T want is for your overall PAGE margins to scale with the text. I always define page margins in points, so they are fixed.
HarryT is offline   Reply With Quote
Old 05-04-2010, 06:04 AM   #18
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,112
Karma: 4315826
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by HarryT View Post
What you probably DON'T want is for your overall PAGE margins to scale with the text. I always define page margins in points, so they are fixed.
If you use em in @page the behavior is undefined and anything can happen. It is illegal to use it. So it is not as you have a choice.
tompe is online now   Reply With Quote
Old 05-04-2010, 06:33 AM   #19
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,195
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by tompe View Post
If you use em in @page the behavior is undefined and anything can happen. It is illegal to use it. So it is not as you have a choice.
But page margins can also be defined for the <body> element, which does accept em units.
Jellby is offline   Reply With Quote
Old 05-04-2010, 09:58 AM   #20
Ankh
Guru
Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.
 
Ankh's Avatar
 
Posts: 708
Karma: 2003741
Join Date: Oct 2008
Location: Ottawa, ON
Device: Kobo Touch
Quote:
Originally Posted by HarryT View Post
Defining paragraph intents in "em" is absolutely fine. Same applies to line indents for poetry; you want them to scale with the text.
Would you be so kind to elaborate on a difference between page margins and poetry indentation?

For example, what's wrong with the following practice:
- "normal" text: margin-left==margin-right==5% (of the page width)
- poetry: margin-left==margin-right==10%(of the page width)
Ankh is offline   Reply With Quote
Old 05-04-2010, 11:22 AM   #21
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 64,010
Karma: 42472847
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Kobo H2O, N7
You generally want a page margin to be a fixed width. In your case, 5% of the page.

When you indent one line of poetry relative to another line, you want the amount of indentation to scale with the text:

eg:
Code:
Line 1
  Line 2
Line 3
  Line 4
You'd want the "extra" indentation of lines 2 and 4, relative to lines 1 and 3, to be proportional to the font size. Of course, you might want the entire poem to be indented relative to the surrounding text, and a fixed offset would be fine for that.
HarryT is offline   Reply With Quote
Old 05-04-2010, 12:05 PM   #22
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 312
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch
Quote:
Originally Posted by HarryT View Post
You generally want a page margin to be a fixed width. In your case, 5% of the page.
So when I use something like "top margin 5%", will the 5% always be based on the page size ? I have no problem to change my page margins from em to %, points or pixel. I think pixel would be better, because afaik, points is a fixed unit. I mean, when I hear the resolution of my reader is 800x600, this means pixel, right ? In that case, using margins might be even easier, since I have the 800x600 as a starting base ...
NASCARaddicted is offline   Reply With Quote
Old 05-04-2010, 12:18 PM   #23
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,195
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by NASCARaddicted View Post
So when I use something like "top margin 5%", will the 5% always be based on the page size ? I have no problem to change my page margins from em to %, points or pixel. I think pixel would be better, because afaik, points is a fixed unit. I mean, when I hear the resolution of my reader is 800x600, this means pixel, right ? In that case, using margins might be even easier, since I have the 800x600 as a starting base ...
5% would refer to the height (or width) of the containing element, I think. But not everything is quite clear with heights, as they are dynamic...

You can use pixels, but then the real dimension depends on the screen resolution. Points or millimeters should be device-independent.
Jellby is offline   Reply With Quote
Old 05-04-2010, 10:12 PM   #24
Ankh
Guru
Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.
 
Ankh's Avatar
 
Posts: 708
Karma: 2003741
Join Date: Oct 2008
Location: Ottawa, ON
Device: Kobo Touch
Quote:
Originally Posted by HarryT View Post
Code:
Line 1
  Line 2
Line 3
  Line 4
You'd want the "extra" indentation of lines 2 and 4, relative to lines 1 and 3, to be proportional to the font size. Of course, you might want the entire poem to be indented relative to the surrounding text, and a fixed offset would be fine for that.
Thanks for the clarification. When you said "poetry" my mind immediately translated that to "blockquote".
Ankh is offline   Reply With Quote
Old 05-04-2010, 10:41 PM   #25
Ankh
Guru
Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.
 
Ankh's Avatar
 
Posts: 708
Karma: 2003741
Join Date: Oct 2008
Location: Ottawa, ON
Device: Kobo Touch
Quote:
Originally Posted by Jellby View Post
5% would refer to the height (or width) of the containing element, I think.
Precisely. Here is the relevant portion of the spec:
8.3 Margin properties: 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', and 'margin'

Last edited by Ankh; 05-04-2010 at 10:43 PM.
Ankh is offline   Reply With Quote
Old 05-05-2010, 06:13 AM   #26
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,112
Karma: 4315826
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by Jellby View Post
But page margins can also be defined for the <body> element, which does accept em units.
With @page rule? What section of the CSS specification should I look at for a description of this?
tompe is online now   Reply With Quote
Old 05-05-2010, 06:37 AM   #27
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,195
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by tompe View Post
With @page rule? What section of the CSS specification should I look at for a description of this?
No, not with @page, I mean that if you define left and right margins for <body> you get in practice margins for every "page", because everything is inside a <body> (except for the page numbers of ADE).
Jellby is offline   Reply With Quote
Old 05-06-2010, 11:09 AM   #28
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 714
Karma: 1085604
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
Quote:
Originally Posted by charleski View Post
An important thing to remember is that while all readers will allow the font size to be increased, few (if any) allow it to be decreased, so the base font size is the minimum size that will be used. On my Sony 505, text at 100% renders at a height of 2.1mm, which is approximately 6pt. This size should be clearly legible to anyone with good eyesight and it provides a line measure of around 56 characters, which is close enough to the ideal of 66.
Are you sure about this?

I never set the base font size in my CSS files, so I assume that the text will be displayed at 1em. But if I set some text to have a font size of, say, 80%, it displays it at 80% of what I assume is the base font size.
ghostyjack is offline   Reply With Quote
Old 05-08-2010, 08:43 PM   #29
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by ghostyjack View Post
Are you sure about this?

I never set the base font size in my CSS files, so I assume that the text will be displayed at 1em. But if I set some text to have a font size of, say, 80%, it displays it at 80% of what I assume is the base font size.
Not talking about css settings here, I was talking about whether the user can choose to decrease the size. This isn't possible on Sony devices, but according to Jellby it can be done on Cybooks ereaders, and possibly others.
charleski is offline   Reply With Quote
Old 05-10-2010, 04:15 AM   #30
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 714
Karma: 1085604
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
I'm not sure I understand charleski, the original poster was talking about setting the default size in an external CSS style sheet, so I assumed that was what you were talking about.

Are you refering to setting the font size within the style section in each XHTML file? or are you talking about something else?
ghostyjack is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ideal base font size for ePub? eosrose ePub 5 05-28-2010 12:45 AM
ebook-convert doesn't recognize base-font-size parameter dracodoc Calibre 6 12-25-2009 10:26 PM
LIT->LRF Conversion - Quirky Base Font Size Setting orion2001 Calibre 6 09-27-2009 12:10 AM
Base Font Size not Working Colaveare Calibre 0 05-06-2009 02:09 AM
Global html2lrf/recipe base-font-size? streaml1ne Calibre 1 07-06-2008 11:59 AM


All times are GMT -4. The time now is 11:26 AM.


MobileRead.com is a privately owned, operated and funded community.