purnimagupta / threepress

Automatically exported from code.google.com/p/threepress
Other
0 stars 0 forks source link

Add support for embedded fonts #146

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Involves:

1. Treating fonts declared in the OPF as objects to be saved to the
filesystem/DB (what are the acceptable media-types here? I know this was an
issue -- or just fall back to .otf/.ttf extensions)

2. Re-write URLs as for CSS to handle relative links from the document.

Check against the output from InDesign for the common cases here.

Unknown: whether to handle obfuscated fonts. Probably in violation of the
spirit of the obfuscation, as users could pull down the fonts.

Original issue reported on code.google.com by liza31337@gmail.com on 25 May 2009 at 12:00

GoogleCodeExporter commented 8 years ago
As of InDesign CS4 (6.0.2), fonts will be mangled, but embedding/not is an 
export
option. 

AFAIK, there's no registered mimetype for OTF. DocBook-XSL calls them
'font/opentype'. 'font/ttf' is another made-up one that seems semi-common. Good 
luck
searching for them, though...

Original comment by abdela...@gmail.com on 25 May 2009 at 2:37

GoogleCodeExporter commented 8 years ago
OPF 2.0 on embedded fonts (note should/coulds):
http://idpf.org/2007/ops/OPS_2.0_final_spec.html
"""
Fonts could be included in multiple formats by using a list of files for the 
src 
descriptor; the first supported format should be used. At least one file in 
OpenType
format should always be included in the list. It is advisable for a Reading 
System to
support the OpenType font format, but this is not a conformance requirement; a
reading system may  support no embedded font formats at all.
"""

and this impressively useless sentence:
"""
Any font files included in an OPS Publication must be included in the OPF 
manifest
with appropriate media type.  
"""

Original comment by abdela...@gmail.com on 25 May 2009 at 2:40

GoogleCodeExporter commented 8 years ago
It's annoying that InDesign will always mangle them even if my license allows 
unmangled distribution (I just used 
a font that specifically allows @font-face usage on the web).

I think I'll simply support unmangled fonts for this ticket and defer the 
mangled implementation for now.

Original comment by liza31337@gmail.com on 25 May 2009 at 2:45

GoogleCodeExporter commented 8 years ago
Nearly 100% of current O'Reilly EPUBs include an unmangled font with a 
permissive
license, if you want a test case. That said, I don't actually _like_ that font, 
but
am forced to embed it because ADE only has support for ASCII.

Original comment by abdela...@gmail.com on 25 May 2009 at 2:49

GoogleCodeExporter commented 8 years ago
In theory users will be able to disable the font by using the serif/sans-serif 
controls now, as that will force the 
document into the browser's current default for that family.

Original comment by liza31337@gmail.com on 25 May 2009 at 2:55