Better fix for Nook hyphenation issue--Nook now honors adobe-hyphenate: none.

This commit is contained in:
Jim Miller 2013-02-03 10:57:06 -06:00
parent b818a0c3ee
commit 81b74d045d
3 changed files with 20 additions and 21 deletions

View file

@ -320,12 +320,13 @@ background_color: ffffff
## Allow customization of CSS. Make sure to keep at least one space
## at the start of each line and to escape % to %%. Also need
## background_color to be in the same section, if included in CSS.
## 'adobe-text-layout: optimizeSpeed;' prevents hyphenation on newer Nooks
## 'adobe-hyphenate: none;' prevents hyphenation on newer Nooks
## STR(wG) (1.2.1+ for sure)
output_css:
body { background-color: #%(background_color)s;
text-align: justify;
margin: 2%%;
adobe-text-layout: optimizeSpeed; }
adobe-hyphenate: none; }
pre { font-size: x-small; }
sml { font-size: small; }
h1 { text-align: center; }

View file

@ -102,9 +102,9 @@ Some more longer description. "I suck at summaries!" "Better than it sounds!"
self.story.setMetadata('language',langs[idnum%len(langs)])
self.setSeries('The Great Test',idnum)
if idnum == 0:
self.setSeries('0 The Great Test',idnum)
self.setSeries("A Nook Hyphen Test "+self.story.getMetadata('dateCreated'),idnum)
self.story.setMetadata('rating','Tweenie')
if self.story.getMetadata('storyId') == '673':
self.story.addToList('author','Author From List')
@ -206,27 +206,24 @@ Some more longer description. "I suck at summaries!" "Better than it sounds!"
<p>http://test1.com?sid=668 - raises FailedToLogin unless username='Me'</p>
<p>http://test1.com?sid=669 - Succeeds with Updated Date=now</p>
<p>http://test1.com?sid=670 - Succeeds, but sleeps 2sec on each chapter</p>
<p>http://test1.com?sid=671 - Succeeds, but sleeps 2sec metadata only</p>
<p>http://test1.com?sid=672 - Succeeds, quick meta, sleeps 2sec chapters only</p>
<p>http://test1.com?sid=673 - Succeeds, multiple authors</p>
<p>Odd sid's will be In-Progress, evens complete. sid&lt;10 will be assigned one of four languages and included in a series.</p>
<p>http://test1.com?sid=672 - Succeeds, quick meta, sleeps 2sec chapters only</p><p>http://test1.com?sid=0 - Succeeds, generates some text specifically for testing hyphenation problems with Nook STR/STRwG</p><p>Odd sid's will be In-Progress, evens complete. sid&lt;10 will be assigned one of four languages and included in a series.</p>
</div>
'''
elif self.story.getMetadata('storyId') == '0':
text=u'''
<br />
Those things in the bar could be genetic mutations.<br />
<br />
<h3>45. Pronglet Returns to Hogwarts: Chapter 7</h3>
<br />
eyes but Im not convinced we should automatically<br />
<br />
eyes but Im not convinced we should automatically.<br />
<br />
<p>Those things in the bar could be genetic mutations.</p>
<p>t Im not convinced we should automatically</p>
<p>ut Im not convinced we should automatically</p>
<p>but Im not convinced we should automatically</p>
<p> but Im not convinced we should automatically</p>
<p>Those things in the bar could be genetic mutations.</p>
<br /><br />
<b>Thanks to the latest to recommend me: Alastor</b><br />
<br /><br />
Sure, invite her along. Does she have children?<br />
<br />
'''
else:
text=u'''

View file

@ -296,12 +296,13 @@ background_color: ffffff
## Allow customization of CSS. Make sure to keep at least one space
## at the start of each line and to escape % to %%. Also need
## background_color to be in the same section, if included in CSS.
## 'adobe-text-layout: optimizeSpeed;' prevents hyphenation on newer Nooks
## 'adobe-hyphenate: none;' prevents hyphenation on newer Nooks
## STR(wG) (1.2.1+ for sure)
output_css:
body { background-color: #%(background_color)s;
text-align: justify;
margin: 2%%;
adobe-text-layout: optimizeSpeed; }
adobe-hyphenate: none; }
pre { font-size: x-small; }
sml { font-size: small; }
h1 { text-align: center; }