HTML5 and SVG font support (or 3 reasons to use WOFF)

When writing our PDF to HTML5 and SVG font converter, the biggest headache has been making the fonts work (the PDF file format allows alsorts of interesting little ‘gotchas’ which need handling for the fonts to work in different browsers and Chrome, Safari, Firefox and IE all have their own ‘features’). We are very pleased with the general quality of the output from the conversion and much of our time is currently spent on these ‘corner cases’….

The second biggest headache has been choosing the font formats to use. Inside a PDF you can have OpenType, Truetype, and Postscript. So we started off by using the font format of the data. This is problematic because the font data often needs ‘tweaking’ (which often means rewriting large parts of the font data) and because not all Browsers support all font types. IE for example does not support Truetype (ironic as Microsoft invented the format)….

In our latest release, we have moved to a default font format of WOFF. This offers THREE key advantages:-

1. It is the best supported file format across all browsers.

2. It includes compression.

3. It allows us to standardise on one font format (no need for separate EOT conversion just for Internet Explorer).

You can still output as OTF and TFF files if required by we have made WOFF the default format. We hope you find it a good choice.

This post is part of our “Fonts Articles Index” in these articles we explore Fonts.

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>