Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2014, 12:34 PM   #1
kolijoco
Junior Member
kolijoco began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2014
Device: sony ps-505
prs 505 epub font embedding troubles

i've read just about all the threads i could google up on this, found some information to be contradicting, and non working for me. my problem is - the usual -, some international characters (double accented o's and u's - yep, hungarian) not showing up... in epubs.

here's how far i got. i used prscust, to install/enable the unicode fonts. as a result, the characters in question now render correctly in txt-s and rtf-s. (so i guess my replacing LRF fonts worked.) but epubs still don't work (i understand from my googling that epubs use a different set of fonts).

so i installed prs+, and enabled the "FontsAsInLRF.css" option. still not working.

again based on google, i tried to build my epub using calibre. i use the same text in the body of start.xhtml as my test text/rtf. so thats a check. i link my css, which is the following:

Code:
@font-face {font-family: 'serif1';src:url('res:///Data/fonst/tt0011m_.ttf')} 
@font-face {font-family: 'sans-serif1';src:url('res:///Data/fonts/tt0003m_.ttf')} 
body{font-family: 'serif1'}
p {font-family: 'serif1'}
h1 {font-family: 'sans-serif1'}
and here is my start.xhtml:

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
  <title>Teszttestz</title>
</head>
<h1>Tesztme</h1>
<body>
  tem bő félóra és jön az első attem
</body>
</html>
the page displayed is empty (and yes, it displays ?-s instead of my wonky chars if i don't mess with the fonts in the css). i'm thinking the fonts on the device are not addressed correctly. i've seen variations on the url path in different threads, like: src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf), but that didn't work either. i'm pretty sure i'm missing the path...

so if anyone has any suggestions on how i could make this work, please help me!

(i realize this is an older device, and i've been fine reading just english on it for all these years, but hey... i like it)

Last edited by kolijoco; 12-02-2014 at 12:39 PM.
kolijoco is offline   Reply With Quote
Old 12-03-2014, 02:55 AM   #2
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
Unlike PDFs or TXTs, which use the default system font, ePubs may point to a different one, either embedded or external (that could be one of the preinstalled ones, or a custom one).

So, either your ePub doesn't point to the right font, or the font you're using doesn't have these diacritics.
Ghitulescu is offline   Reply With Quote
Advert
Old 12-03-2014, 01:33 PM   #3
kolijoco
Junior Member
kolijoco began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2014
Device: sony ps-505
yep... i understand. thats exactly my question: how do i point my epub to the "builtin" fonts used by lrf. what url do i need to specify in css @font-face so the "builtin" fonts are picked up?
kolijoco is offline   Reply With Quote
Old 12-04-2014, 04:49 AM   #4
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
For my T1/T3 I use this path
@font-face {font-family: serif; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/AmasisMTW1G.otf)}

For previous models the path is different IIRC.
Ghitulescu is offline   Reply With Quote
Old 12-04-2014, 04:50 AM   #5
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
Quote:
Originally Posted by kolijoco View Post
@font-face {font-family: 'serif1';src:url('res:///Data/fonst/tt0011m_.ttf')}
@font-face {font-family: 'sans-serif1';src:url('res:///Data/fonts/tt0003m_.ttf')}
body{font-family: 'serif1'}
p {font-family: 'serif1'}
h1 {font-family: 'sans-serif1'}
There is a typo in your definitition
Ghitulescu is offline   Reply With Quote
Advert
Old 12-04-2014, 02:36 PM   #6
kolijoco
Junior Member
kolijoco began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2014
Device: sony ps-505
ok finally got it to work, with the path from prs+'s override css (which didn't really do the trick for any of my epubs when activated from the settings menu). but adding the references to the pubs did the trick, so here it goes:

pages_styles.css
Code:
@page {
    margin-bottom: 5pt;
    margin-top: 5pt
    }
@font-face {
    font-family: "myfont";
    src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf);
    }
@font-face {
    font-family: "myotherfont";
    src: url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)
    }
@font-face {
    font-family: "mythirdfont";
    src:url(res:///opt/sony/ebook/FONT/tt0419m_.ttf);
}
stylesheet.css:

Code:
.calibre {
    display: block;
    font-family: "myfont";
    font-size: 1em;
    padding-left: 0;
    padding-right: 0;
    margin: 0 0pt
    }
.calibre1 {
    display: block;
    font-family: "myotherfont";
    font-size: 1em;
    padding-left: 0;
    padding-right: 0;
    margin: 0 0pt
    }
.calibre2 {
    display: block;
    font-family: "mythirdfont";
    font-size: 1em;
    padding-left: 0;
    padding-right: 0;
    margin: 0 0pt
    }
start.xhtml:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>Teszteree</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
<link href="page_styles.css" rel="stylesheet" type="text/css"/>
</head>
  <body>
    <p class="calibre">árvíztűrő tükörfúrógép</p>
    <p class="calibre1">árvíztűrő tükörfúrógép</p>
    <p class="calibre2">árvíztűrő tükörfúrógép</p>
  </body>
</html>
kolijoco is offline   Reply With Quote
Old 12-05-2014, 05:25 AM   #7
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
Adding in calibre the fonts into the Extra CSS box is useful only in the beginning.

For predefined fonts, the editing of CSS files is more than enough. No conversion needed. Also no Extra CSS needed. But the predefined (stock) fonts have to contain the needed characters.
Ghitulescu is offline   Reply With Quote
Reply

Tags
505, embedding, epub, font


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding font in books that already have embedded font Barty Calibre 2 10-16-2013 11:38 PM
Problem embedding font into an ePub mvo ePub 16 01-03-2012 07:10 PM
The ePub 2.0.1 specifications and font embedding Giordano Galli ePub 8 09-24-2011 10:28 AM
PRS-505 Font differences - LRF vs EPUB jackie_w Calibre 11 10-23-2009 09:42 PM


All times are GMT -4. The time now is 11:43 PM.


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