|
|
Thread Tools | Search this Thread |
01-22-2024, 03:01 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2024
Location: Beijing, China
Device: none
|
The same font size appears differently in the viewer and editor's preview.
1. I set font size to 20px in the viewer:
2. I set font size to 20px in the editor's preview (default font size): 3. They are clearly different from each other: Last edited by pdurrant; 01-22-2024 at 08:16 AM. |
01-22-2024, 03:36 AM | #2 |
creator of calibre
Posts: 44,336
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
preview settings only apply if the book defines no styles of its own.
|
Advert | |
|
01-22-2024, 08:37 PM | #3 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2024
Location: Beijing, China
Device: none
|
But by changing the preview font size settings, the actual font size surely becomes larger or smaller. I don't know CSS, but at least with same font size settings, they should have same font size.
|
01-22-2024, 09:21 PM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2024
Location: Beijing, China
Device: none
|
I make a comparison using Calibre viewer, editor's preview and Sigil's preview. The font size is set to 20. The actual font size for Calibre editor's preview and Sigil is the same. Calibre viewer's actual font size is smaller compared to these two.
|
01-22-2024, 09:31 PM | #5 |
Bibliophagist
Posts: 39,414
Karma: 153780470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Have you looked at the CSS of the ebook to see how the font-size is arrived at? Also note preview in the editor only uses that font size when the ebook CSS/inline styles do not define a font size.
|
Advert | |
|
01-22-2024, 09:37 PM | #6 |
creator of calibre
Posts: 44,336
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The viewer imposes the users font size preferences, scaling all fonts according to those preferences. The preview does not. You will not in general get the same font size between the two.
|
01-22-2024, 10:58 PM | #7 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2024
Location: Beijing, China
Device: none
|
Quote:
So I think this part of CSS is controlling the font-size: code { font-family: Courier, Courier New, monospace; font-size: small; } So if I set "default font size" to 20 in the Calibre editor preview's settings, the font size of the "code" part will be smaller than 20? --------- "Also note preview in the editor only uses that font size when the ebook CSS/inline styles do not define a font size." I don't quite understand. Does the above "code" CSS qualified as "ebook CSS/inline styles define a font size"? P.S. I uploaded the CSS and HTML to ch06.zip. Last edited by theducks; 01-23-2024 at 01:47 PM. Reason: inline large image removed |
|
01-22-2024, 11:03 PM | #8 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2024
Location: Beijing, China
Device: none
|
Quote:
Moderator Notice Please read the MR Guidelines about inline image sizes .Use attachments for larger sizes I am confused, why this font size setting uses absolute unit "px", while you are saying that "scaling all fonts" which implies that this is a relative unit? Last edited by theducks; 01-23-2024 at 01:49 PM. Reason: remove oversize inline images |
|
01-22-2024, 11:05 PM | #9 |
creator of calibre
Posts: 44,336
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Because there can be more than one font size ina document. That setting sets the base font size, all other font sizes are scaled relatively to it.
|
01-23-2024, 08:28 PM | #10 |
Resident Curmudgeon
Posts: 75,862
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Put the mouse pointer over the preview. Use control-mouse wheel to change the size.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Font size rendering in Calibre Viewer vs. Editor | maraskan_user | Viewer | 2 | 12-23-2020 03:02 PM |
font size problem calibre viewer, editor, content-server with non-resizing SVG text | rjwse@aol.com | Editor | 11 | 03-26-2020 12:06 AM |
Preview pane font size Sigil | benkuttner | Sigil | 3 | 12-11-2017 01:19 PM |
Font size in Book View / Preview Pane | Notjohn | Sigil | 4 | 10-12-2015 10:17 AM |
Calibre E-Book Viewer and ADE render ePub TD font-size differently | Agama | Devices | 5 | 06-17-2011 02:44 AM |