Menu

#22 Add support for managing embedded fonts conveniently

Convenience
open
epub (1)
1
2014-02-26
2014-02-25
No

Provide configuration options and mechanisms for easily embedding fonts in the generated EPUB packages.

Discussion

  • W. Eliot Kimber

    W. Eliot Kimber - 2014-02-25

    Need to extend this code to include font files:

    ~~~~
    <target name="zipepub">

    <zip destfile="${output.dir}${file.separator}${dita.map.filename.root}.epub" basedir="${epub.temp.dir}" compress="true" includes="META-INF${file.separator}container.xml,toc.ncx, content.opf,container.opf,**/*.html,**/*.css,**/*.HTML,**/*.CSS, **/*.jpg,**/*.jpeg,**/*.gif,**/*.png,**/*.svg,**/*.JPG,**/*.JPEG,**/*.GIF,**/*.PNG,**/*.SVG">
    <zip destfile="${output.dir}${file.separator}${dita.map.filename.root}.epub" basedir="${epub.temp.dir}" includes="mimetype" update="true" keepcompression="true" compress="false">
    </zip></zip></target>
    ~~~~

     
  • W. Eliot Kimber

    W. Eliot Kimber - 2014-02-26

    It appears that EPUB3 requires the EPUB2 contents and the EPUB3 contents to be in separate subdirs within the EPUB package and that it is thus suggested to put the EPUB2 contents in a directory called OPS/ or OEBPS/

     
  • Steven Calderwood

    We use OEBPS, for whatever that's worth. I don't quite remember why I chose that instead of OPS, but it was probably a combination of what is in the spec and what vendors' documentation say they prefer. I don't think there are any other changes I've made related to conformance with vendors'/the spec's desires.

     
  • W. Eliot Kimber

    W. Eliot Kimber - 2014-02-26

    I found a response to a question on an IDPF forum that pointed out that EPUB3/2 EPUBs require the two sets of content to be in different subdirs and suggested OPS or OEBPS as obvious names to choose, although they reiterated that the spec itself imposes no naming requirements.

    I've locally implemented a new parameter to specify where the content.opf and toc.ncx files go (I require them to be in the same directory to keep things simpler) and have updated the code to correctly generate references from those files to the content files wherever they might be relative to those files. The current code assumes that content.opf and toc.ncx are in the root of the EPUB package, which is obviously not correct and would have needed to be changed to support EPUB3 in any case.

     
  • Steven Calderwood

    Very sweet! Thanks, Eliot.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB