Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 12-20-2020, 10:39 AM   #1
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
Chapter "first line" weirdness

I'm seeing something in the Viewer I've never encountered before. Each chapter of this novel has the first line in uppercase bold text, which isn't exactly uncommon. In the Viewer, though, the first line of the chapter runs off the right side of the window. And if I stretch the window to the right, the first line keeps getting longer, still in bold, and still runs off the right side. I can never get to the end of that first line to read it.

These paragraphs begin with
Code:
<p class="pcalibre x03-co-body-text">
and in stylesheet.css I find:
Code:
.pcalibre:first-line {
  font-family: "LinoLetter Std Roman", "Georgia", serif;
  font-weight: bold;
  text-transform: uppercase;
}

.x03-co-body-text {
  display: block;
  font-size: 0.88889em;
  orphans: 2;
  text-indent: 0;
  widows: 2;
  margin: 10% 0 0;
}
Can anyone tell from this what is going on? My HTML is a little shaky.
dan2the6th is offline   Reply With Quote
Old 12-20-2020, 11:22 AM   #2
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,179
Karma: 8800000
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by dan2the6th View Post
I'm seeing something in the Viewer I've never encountered before. Each chapter of this novel has the first line in uppercase bold text, which isn't exactly uncommon. In the Viewer, though, the first line of the chapter runs off the right side of the window. And if I stretch the window to the right, the first line keeps getting longer, still in bold, and still runs off the right side. I can never get to the end of that first line to read it.

These paragraphs begin with
Code:
<p class="pcalibre x03-co-body-text">
and in stylesheet.css I find:
Code:
.pcalibre:first-line {
  font-family: "LinoLetter Std Roman", "Georgia", serif;
  font-weight: bold;
  text-transform: uppercase;
}

.x03-co-body-text {
  display: block;
  font-size: 0.88889em;
  orphans: 2;
  text-indent: 0;
  widows: 2;
  margin: 10% 0 0;
}
Can anyone tell from this what is going on? My HTML is a little shaky.
Look here:
https://developer.mozilla.org/en-US/...S/::first-line

bernie
gbm is offline   Reply With Quote
Advert
Old 12-20-2020, 11:45 AM   #3
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
OK, fine, but that doesn't explain why my first line is trying to display past the right edge of the Viewer window. Does it? I mean, there are two or three words that are invisible past the right margin.
dan2the6th is offline   Reply With Quote
Old 12-20-2020, 12:05 PM   #4
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
One interesting thing: if I remove the "text-transform: uppercase" line, the first line fits in the Viewer just fine. Lowercase bold instead of uppercase. Looks like the width of the line when it's in the wider uppercase letters isn't being figured out correctly.
dan2the6th is offline   Reply With Quote
Old 12-20-2020, 12:20 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,253
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah, as I recall first-line + text-transform doesnt re-do layout in chrome (which is what the calibre viewer uses to render html)
kovidgoyal is offline   Reply With Quote
Advert
Old 12-20-2020, 03:24 PM   #6
dan2the6th
Connoisseur
dan2the6th began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Mar 2014
Device: iPhone XR
Thank you. I'll just live with the workaround without text-transform. I don't need that first line in uppercase anyway.
dan2the6th is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apple's Books/iBooks: "in this chapter" "in this book" display Hitch ePub 9 06-25-2020 09:30 PM
PDF - relation between "line un-wrapping factor" and "unwrap line" (heuristic proc.) dr_Fell Conversion 1 10-16-2017 10:56 PM
First line of chapter is "squashed" richardfoley Conversion 4 07-25-2016 05:19 AM
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" therealjoeblow Calibre 15 07-25-2011 03:14 PM
inserting a "ruled Line" /chapter and page breaks tscamera Calibre 3 01-05-2011 04:47 PM


All times are GMT -4. The time now is 02:31 AM.


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