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

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-31-2011, 05:57 PM   #16
edcoan
Junior Member
edcoan began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2011
Device: PRS-505, Kindle Touch
Quote:
Originally Posted by spacebrew View Post
I finally got it. Thanks, Analogus, for your response. I checked what you put, and mine was like that. What it ended up being was I needed a div style in the css called .epub calling on that font. Jeez, what a bunch of work. Thanks guys.
spacebrew - I'm having the same problem. Can you write out the exact line you added?

Last edited by edcoan; 11-01-2011 at 10:20 PM.
edcoan is offline   Reply With Quote
Old 11-04-2011, 08:49 AM   #17
spacebrew
Enthusiast
spacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud of
 
spacebrew's Avatar
 
Posts: 41
Karma: 27540
Join Date: Sep 2011
Location: North Dallas
Device: PRS-T1, PRS-350, Droid X2
I'll just post my whole CSS so you can check it out. The very bottom entry is the one I added that made it work though.

Code:
@font-face {
 font-family: "Nimbus";
 font-weight: normal;
 font-style: normal;
 src: url(res:///Data/fonts/Nimbus.ttf);
 }

 @font-face {
 font-family: "Nimbus";
 font-weight: normal;
 font-style: italic;
 src: url(res:///Data/fonts/Nimbus_I.ttf);
 }

 body {
 font-family: "Nimbus"; 
 } 

 p { 
 font-size: 1.0em !important;
 text-align: justify !important;
 line-height: 130% !important;
 text-indent: 1.5em !important;
 margin-top: 0.1em !important; 
 margin-bottom: 0.1em !important; 
 }

 html { 
 font-family: Nimbus !important;
 }

 .mainBody {
 font-family: Nimbus !important;
 }

 .calibre {
 font-family: Nimbus !important;
 }
 
 .epub {
 font-family: Nimbus !important;
 }

I might also add that some books just don't change with it though. A couple of them, I've had to go into the embedded css and remove the font-family lines so it will use the default. You might try that, and even remove the fonts folder from the epub file.

Last edited by spacebrew; 11-04-2011 at 08:52 AM. Reason: wrong tag
spacebrew is offline   Reply With Quote
Advert
Old 11-05-2011, 01:59 PM   #18
vishcompany
Addict
vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.
 
vishcompany's Avatar
 
Posts: 283
Karma: 138550
Join Date: Mar 2009
Device: Gen3(†); PB302(↓); PRS-350; T1; voyage
Font collection for quick comparison

When trying out new fonts on the reader, I always found it a pity, that the actual procedure to switch fonts takes several steps and a little time, so it's hard to compare thoroughly.

Thus I put together a little collection of free fonts embedded into one single book just for reference. I'm no webdesigner and have no clue about css. Just happy, that it works on my 350. I'm sure there are better ways in doing this.

In this book you will find (only regular, no bold and italics):
Angleterre
Cantarell
Charis SIL
Deja Vu LGC Sans
Seja Vu Serif
Fontin
Free Sans
Free Serif
Gentium Plus
Georgia EInk 05
Goudy Bookletter 1911
Josefin Slab
Lexia DaMa
Liberation Serif
Numbus Mod
Open Sans
Palatia
prophecy
Roboto
Ubuntu

Edit:
The text always is our good old quick brown fox etc.
Attached Files
File Type: epub Embedded Fonts - Anonymous.epub (3.33 MB, 400 views)
vishcompany is offline   Reply With Quote
Old 11-05-2011, 02:29 PM   #19
spacebrew
Enthusiast
spacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud of
 
spacebrew's Avatar
 
Posts: 41
Karma: 27540
Join Date: Sep 2011
Location: North Dallas
Device: PRS-T1, PRS-350, Droid X2
Quote:
Originally Posted by vishcompany View Post
When trying out new fonts on the reader, I always found it a pity, that the actual procedure to switch fonts takes several steps and a little time, so it's hard to compare thoroughly.

Thus I put together a little collection of free fonts embedded into one single book just for reference. I'm no webdesigner and have no clue about css. Just happy, that it works on my 350. I'm sure there are better ways in doing this.
Great idea. Nice work. Thanks!
spacebrew is offline   Reply With Quote
Old 11-05-2011, 03:50 PM   #20
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,211
Karma: 11766195
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you very much!
Terisa de morgan is offline   Reply With Quote
Advert
Old 11-05-2011, 03:58 PM   #21
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
Simple solution for changing fonts (no altering size or line space)

I'm testing another 'kind' of CSS-file for changing fonts:

There is a CSS-file from PRS+ named 'FontsAsInLRF.css' with this code:

Code:
@font-face
{
	font-family: sans-serif;
	src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf);
}
@font-face
{
	font-family: serif;
	src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf);
}
@font-face
{
	font-family: monospace;
	src:url(res:///opt/sony/ebook/FONT/tt0419m_.ttf);
}
It forces to use the standard-fonts of Sony instead of the defined fonts of the ebook. Using the principle of this file I produce CSS-files like this for other fonts (like Caecilia in this case):


Code:
@font-face {
  font-family: serif; 
  font-weight: normal; 
  font-style: normal; 
  src: url(res:///Data/fonts/CaeciliaLTStd-Roman.ttf); 
}

@font-face {
  font-family: serif; 
  font-weight: bold; 
  font-style: normal; 
  src: url(res:///Data/fonts/CaeciliaLTStd-Bold.ttf); 
}

@font-face {
  font-family: serif; 
  font-weight: normal; 
  font-style: italic; 
  src: url(res:///Data/fonts/CaeciliaLTStd-Italic.ttf); 
}

@font-face {
  font-family: serif; 
  font-weight: bold; 
  font-style: italic; 
  src: url(res:///Data/fonts/CaeciliaLTStd-BoldItalic.ttf);
(complete code)

If there is just ONE font for normal, bold and italic, CSS-file looks like this:
Code:
@font-face {
  font-family: serif; 
  src: url(res:///Data/fonts/CaeciliaLTStd-Roman.ttf); 
}
That's the complete code inside the CSS-file. Very simple... and seems to work. Of course just fonts, not size nor line-space is altered.

Last edited by Analogus; 11-05-2011 at 04:00 PM.
Analogus is offline   Reply With Quote
Old 11-05-2011, 04:05 PM   #22
seajewel
Fanatic
seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.
 
Posts: 589
Karma: 1451235
Join Date: Jun 2008
Device: Sony PRS-505, Sony PRS-950
Thank you for the embedded fonts epub. I have to repeat that I really really like NimbusMod. I know there was some issue with not having true bold font included in the NimbusMod uploaded by delphin. Would I still see bold formatting, just rendered by software? Or would bold characters show up as regular characters?
seajewel is offline   Reply With Quote
Old 11-05-2011, 04:23 PM   #23
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
NimbusMod:

There is NO issue with not having bold fonts. Even Sony does have just ONE font for all four styles (bold, italic, bold-italic, regular). Bold-Italic and Bold are rendered from the two existing Nimbus fonts. No problem so far.

If you have time, give this CSS-style for Nimbus-Mod a try:

Code:
@font-face 
{
  font-family: serif; 
  font-weight: normal; 
  font-style: normal; 
  src: url(res:///Data/fonts/NimbusMod.ttf); 
}

@font-face 
{
  font-family: serif; 
  font-weight: normal; 
  font-style: italic; 
  src: url(res:///Data/fonts/NimbusMod_I.ttf); 
}
Alter path if necessary.

A.
Analogus is offline   Reply With Quote
Old 11-05-2011, 08:43 PM   #24
seajewel
Fanatic
seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.seajewel ought to be getting tired of karma fortunes by now.
 
Posts: 589
Karma: 1451235
Join Date: Jun 2008
Device: Sony PRS-505, Sony PRS-950
Quote:
Originally Posted by Analogus View Post
NimbusMod:

There is NO issue with not having bold fonts. Even Sony does have just ONE font for all four styles (bold, italic, bold-italic, regular). Bold-Italic and Bold are rendered from the two existing Nimbus fonts. No problem so far.
<snip>

Alter path if necessary.

A.
That is not what it says in the thread about favorite e-reader fonts. People have posted examples of Alice in Wonderland in normal, italic, bold, and bold-italic. The latter two are rendered as normal or italic font without any bolding.

https://www.mobileread.com/forums/sho...3&postcount=67

It appears delphin agreed and was going to work on a new version but has not visited the forums in a few months.

ETA: the post I linked seems to suggest it's only a Kobo issue, it's not. Delphin later says that he was mistaking larger font headings for bolded NimbusMod, which does not work. People posted workarounds involving using different fonts for bold and bold-italic, but actual NimbusMod would have been awesome
seajewel is offline   Reply With Quote
Old 11-05-2011, 10:15 PM   #25
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
seajewel:

Yes, you are right. I have overlooked it completely.

Played with fonts, CSS and changing system fonts.
Results:

It seems to be a fact, that using CSS you MUST have all 4 styles of fonts in the font folder! The reader is not able to render bold or italic if there is no special designed font in bold or italic. Not just with NimbusMod but every other fonts too.

But: if you change the system font of the reader (there is just ONE fontstyle; regular, bold, ... is rendered from that font) using NimbusMod_Regular all 4 styles are available!
That's what I have done - I use Caecilia and NimbusMod alternating as system-fonts.

And: Producing a BOLD-version (similiar to a rendered one) of Nimbus-Mod is quite simple. I could do that job.


A.
Analogus is offline   Reply With Quote
Old 11-06-2011, 08:03 AM   #26
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
Quote:
Originally Posted by Analogus View Post
[B]
It seems to be a fact, that using CSS you MUST have all 4 styles of fonts in the font folder! The reader is not able to render bold or italic if there is no special designed font in bold or italic. Not just with NimbusMod but every other fonts too. A.
Since I really don't care about seeing a bold difference or not because of my bad eyes, I just prefer using the bold always at times. What I do is simply used the bold and bold italic of a font as it should be, then copied the same 2 font files and renamed them to the normal and normal italic versions. I've never had a problem with something not displaying.

In the meantime, you could do that for the Nimbus font. Or find a font that's similiar in style and use the bold and bold italic from that font. I would just rename it to the Nimbus name so calling a "font family" won't have a mix of font family names in it (not sure if that would be a problem or not, just going on the side of caution with the last renaming part).
Ripplinger is offline   Reply With Quote
Old 11-06-2011, 08:42 AM   #27
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
If you don't mind not seeing any emboldening (is that a word?) then the following should work:
- map Regular and Bold to the same Nimbus regular file
- map Italic and BoldItalic to the same Nimbus italic file
rather than having to duplicate/rename font files. I haven't tried it, though.

Code:
@font-face {
  font-family: serif; 
  font-weight: all; 
  font-style: normal; 
  src: url(res:///Data/fonts/NimbusMod.ttf); 
}

@font-face {
  font-family: serif; 
  font-weight: all; 
  font-style: italic; 
  src: url(res:///Data/fonts/NimbusMod_I.ttf); 
}
It's also possible that this would work. Again I haven't tried it:
Code:
@font-face {
  font-family: serif; 
  font-style: normal; 
  src: url(res:///Data/fonts/NimbusMod.ttf); 
}

@font-face {
  font-family: serif; 
  font-style: italic; 
  src: url(res:///Data/fonts/NimbusMod_I.ttf); 
}
jackie_w is offline   Reply With Quote
Old 11-06-2011, 11:19 AM   #28
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
NimbusMod:

I tried to make a bold version. But I desided not to finish it. Reason:

If you have a closer look at some letters, you will recognize errors like this one (p):
Click image for larger version

Name:	06.11.png
Views:	305
Size:	29.1 KB
ID:	78687

It would be much work to solve those errors. Making the font bold requires to do that. Otherwise some letters will look very strange after transformation.

Sorry.

Last edited by Analogus; 11-06-2011 at 11:22 AM.
Analogus is offline   Reply With Quote
Old 11-06-2011, 06:43 PM   #29
pssquirrel
ebooknut
pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.
 
pssquirrel's Avatar
 
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
Another option that doesn't require duplicating/renaming font files, is to use the same source file for both normal and bold.

Spoiler:
Code:
@font-face { 
   font-family: serif; 
   font-weight: normal; 
   font-style: normal; 
   src: url(res:///Data/fonts/NimbusMod.ttf); 
} 

@font-face { 
   font-family: serif; 
   font-weight: bold; 
   font-style: normal; 
   src: url(res:///Data/fonts/NimbusMod.ttf); 
} 

@font-face { 
   font-family: serif; 
   font-weight: normal; 
   font-style: italic; 
   src: url(res:///Data/fonts/NimbusMod_I.ttf); 
} 

@font-face { 
   font-family: serif; 
   font-weight: bold; 
   font-style: italic; 
   src: url(res:///Data/fonts/NimbusMod_I.ttf); 
}
Then, to distinguish between normal and bold text when there's no bold font, you could add "text-decoration: underline" However, this only works when you know what tag the epub uses to call bold. In other words, if an epub uses <span class="bold"> or <b> to call for bold-faced text, you could add:

span.bold {text-decoration: underline; }
b {text-decoration: underline; }

Then all text that's supposed to be bold (but which can't be bold because there's no font) will be underlined instead.

Last edited by pssquirrel; 12-07-2011 at 12:18 AM. Reason: clarification
pssquirrel is offline   Reply With Quote
Old 11-12-2011, 06:47 PM   #30
edcoan
Junior Member
edcoan began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2011
Device: PRS-505, Kindle Touch
Thanks, spacebrew. I now get the same results. I don't know why some ebooks still won't take the new fonts, but pasting your css in the epub with calibre is so far flawless.
edcoan is offline   Reply With Quote
Reply

Tags
fonts, prs+, prs-350

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DR800 Changing Fonts on DR800S fredb iRex 15 12-25-2011 05:15 AM
Changing fonts Vit-orekhov enTourage eDGe 4 07-20-2011 12:57 AM
Development Changing fonts Vit-orekhov enTourage eDGe 0 07-18-2011 01:06 AM
Changing fonts Soxendom OpenInkpot 2 01-03-2010 10:14 AM
Changing text size and fonts with PRS 505 levi_john Sony Reader 1 01-20-2009 03:25 AM


All times are GMT -4. The time now is 07:53 AM.


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