Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m thankful

Horrible ePub monospace font in Sony Reader (PRS-700BC)

Thank you very much for providing ePub format files first of all.

I purchased three eBooks from O'reilly.com and they look almost OK in my Sony Reader. One problem is that it does not embed monospace fonts, which means the horrible default font is used to display a code block. I love the embedded DejaVu Serif font, so I would expect the DejaVu Mono to be embedded too for better readability.

I can modify the epub file by myself, but I would rather want to see the saner defaults.
1 person has
this problem
+1
Reply
  • 1
    I modified the "core.css" by myself to embed the monospace font and got a great result. I used 'Liberation Mono', but it should work for 'DejaVu Sans Mono', too.

    I had to define both regular and italic fonts because Sony Reader's default italicizer generates ugly glyphs:


    @font-face {
    font-family: "Liberation Mono";
    font-style: normal;
    font-weight: normal;
    src:url(LiberationMono.otf);
    }

    @font-face {
    font-family: "Liberation Mono";
    font-style: italic;
    font-weight: normal;
    src:url(LiberationMono-Italic.otf);
    }


    AND replace 'monospace' with 'Liberation Mono':


    pre {
    white-space: pre-wrap;
    font-family: "Liberation Mono", monospace;
    font-size: smaller;
    margin-left: 5px;
    }
    code {
    white-space: pre-wrap;
    font-family: "Liberation Mono", monospace;
    font-size: smaller;
    }


    I wish this proposed change is made into the next update. What do you think?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Very nice, Trustin, and thanks for the suggestion. I did the same thing over the weekend using DejaVu Sans Mono. I am planning to implement this soon.

    By the way, you should also add the font files to the OPF manifest. See Liza Daly's excellent tutorial.

    http://blog.threepress.org/2009/09/16...

    Thanks again for your excellent feedback and suggestions.

    Adam
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated