Quantcast
Channel: MobileRead Forums - Sony Reader
Viewing all articles
Browse latest Browse all 1292

Custom font (PRS+) breaking itself

$
0
0
So far I have attempted every single suggestion and tutorial regarding changing fonts in epub's via PRS+ that I could find.

I can get the formatting to work, the font does not.

I got it to work once, then I change books and it stops working. :angry:
When I say it stops working, the font returns to the default, no matter what I select. Nothing I do will make it work again. I have resaved the css file, I have renamed everything related.. nothing works.

I am using an epub I made myself in Sigil, it has no fonts. It is only a few lines of text.

I believe it has something to do with the filesystem. /Data/fonts has not worked at all. /fonts works once. Of course I have tried different fonts.. everything I can find I tried.

I just got this today (PRS-350), I did the update and installed PRS+, no issues with that.

Please help if you can... this is driving me insane. I have been on this for over 7 HOURS :help:

Every time I open the css file in Notepad++ it identifies as UTF-8, as I was unable to save it minus BOM I saved it as ANSI, I don't know if that is an issue.
I have saved the file using PC and UNIX line endings, in ANSI and UTF-8. (There is a box for Unicode BOM, that is not selected)

PRS+ version:2.1.02alpha

CSS file
Spoiler:

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

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

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

@font-face {
font-family: "serif";
font-weight: bold;
font-style: italic;
src: url(res:///Data/fonts/constantiabi.ttf);
}
body
{
font-family: "serif";
margin:0em !important;
}

@page
{
margin-left: 0em !important;
margin-right: 0em !important;
margin-top: 0.5em !important;
margin-bottom: 0em !important;
}

p {
font-size: 0.95em !important;
text-align: justify !important;
line-height: 115% !important;
margin:0em !important;
}

html {
font-family: serif !important;
}

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

.calibre {
font-family: Constantia !important;
}

.epub {
font-family: Constantia !important;
}


The epub I am using:
Spoiler:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<p>&nbsp;The quick brown fox jumps over the lazy dog.<br/></p>
<p>&nbsp;the quick brown fox jumps over the lazy dog.<br/></p>
<p>&nbsp;THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.<br/></p>
<p><span style="font-style: italic;">&nbsp;The quick brown fox jumps over the lazy dog.</span><br/></p>
<p><span style="font-weight: bold;">&nbsp;The quick brown fox jumps over the lazy dog.</span><br/></p>
<h1>&nbsp;The quick brown fox jumps over the lazy dog.<br/></h1>
<h2>The quick brown fox jumps over the lazy dog.<br/></h2>
<h3>The quick brown fox jumps over the lazy dog.<br/></h3>
<h4>The quick brown fox jumps over the lazy dog.</h4>
<h5>The quick brown fox jumps over the lazy dog.</h5>
<h6>The quick brown fox jumps over the lazy dog.</h6>
<p>The quick brown fox jumps over the lazy dog.<br/></p>
</body>
</html>


Please note, I do not want to embed the fonts in each epub as I use different fonts depending on the light level.

Edit: I may have it working a little... Is there any way to add font size increments? The step between S and M is too large. "Font size" does not work either.

Edit again.. and suddenly all of the fonts have stopped working again... :surrender: I am starting to think this POS is faulty. Backed up CSS files referencing still-in-place ttf files don't work anymore, but only in certain books.. that worked before.

Viewing all articles
Browse latest Browse all 1292

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>