Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

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

52 sec read

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.

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Enabling SVG Gzip Compression on Apache and NGINX

Gzip compression is a widely supported method of reducing the size of the content sent from a web server in order to improve the...
Leon Atherton
47 sec read

Converting your PDF files to SVG with BuildVU

BuildVu is not just for conversion of PDF to HTML5.  We also have a version for SVG conversion, called BuildVu-SVG. This offers both a...
Leon Atherton
1 min read

Leave a Reply

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

IDRsolutions Ltd 2019. All rights reserved.