Menu

#434 issues with ePub conversion (2/3)

AMBER
closed
1(low)
2013-11-12
2012-08-28
No

Dear Sebastian,

the ePub generated from http://www.perseus.tufts.edu/hopper/opensource/downloads/texts/tei/1999.04.0074.xml using OxGarage had another issue

The resulting ePub document doesn't contain any embedded font. I'm afraid that ereaders (with eink, not tablets) don't allow installing fonts or anything (unless you root or jailbreak them [which might be illegal; not 100% sure about this]).

The vast majority of ereaders may display the Greek and Russian Unicode blocks (and the ones for Basic Latin and Latin-1 Supplement), but not the Greek Extended block. Actually they don't display the Latin Extended-A block (so ō is displayed as a question mark when the font isn't embedded). FreeSerif (or Sans) may be a solution to this (free licensed font [GNU GPL] and available at http://ftp.gnu.org/gnu/freefont/\).

My suggestion to this issue is: would it be possible that the transformation itself detects the font has to be embedded and embeds it
in the ePub file? (I mean, when there is a character from the Greek extended Unicode block in the text.) Or at least, it would be useful that there is an option to embed the fonts.

Many thanks for your help,

Pablo

Discussion

  • Sebastian Rahtz

    Sebastian Rahtz - 2012-09-09

    I accept the point, but I don't yet know how to embed fonts, or how to know when a reader doesn't support the unicode range. I don't want to force a particular font on people,
    if their reader already has one.

    needs some investigation....

     
  • Pablo Rodriguez

    Pablo Rodriguez - 2012-09-09

    I agree with you that imposing embedded typefaces for each ePub file isn't the proper way to do things. It would be better to provide an option to embed it in the ePub file (both within the stylesheets and Oxgarage).

    Embedding a font requires to add the following code to the CSS file (adapted from http://johnmacfarlane.net/pandoc/README.html\):

    @font-face {
    font-family: FreeSans;
    font-style: normal;
    font-weight: normal;
    src:url("/OPS/FreeSans.otf");
    }
    @font-face {
    font-family: FreeSans;
    font-style: normal;
    font-weight: bold;
    src:url("/OPS/FreeSansBold.otf");
    }
    @font-face {
    font-family: FreeSans;
    font-style: italic;
    font-weight: normal;
    src:url("/OPS/FreeSansOblique.otf");
    }
    @font-face {
    font-family: FreeSans;
    font-style: italic;
    font-weight: bold;
    src:url("/OPS/FreeSansBoldOblique.otf");
    }

    body { font-family: "FreeSans"; }

    and actually including the four font files in the said directory.

    With the files that include text with the serif typeface (such as the one cited as example), it is also be required to be able to embed the that fonts (and the same would be required for the monospaced typeface).

     
  • James Cummings

    James Cummings - 2013-11-10
    • Group: --> AMBER
    • Priority: 5 --> 1(low)
     
  • James Cummings

    James Cummings - 2013-11-10

    Setting as AMBER.

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-11-12

    As this is a very general issue with ePub generation, TEI Council meeting 11/13 asked that this issue be re-raised in Github, where the Stylesheets are managed now. Duly
    added as https://github.com/TEIC/Stylesheets/issues/1, where hopefully it can be resolved. Pablo, if you have new information or input, could you comment on Github?

     

    Last edit: Sebastian Rahtz 2013-11-12
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-11-12
    • status: open --> closed