Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Make .woff the default font type #183

Closed
kasperpeulen opened this issue Jul 11, 2013 · 15 comments
Closed

Make .woff the default font type #183

kasperpeulen opened this issue Jul 11, 2013 · 15 comments

Comments

@kasperpeulen
Copy link

I've been exploring ways to convert pdf to html the last couple of months. I think this product is very good, but there are some issues I want to adress.

In chrome, the computer roman fonts of latex doesn't seem to look good:
http://www.mediafire.com/view/abv5hvlahq4gcvx/ross.pdf

chrome

Especially when the fonts gets small, it is very ugly. You talk about using mactype, I don't think this is a real solution.

I've been trying to find ways to convert latex (with computer roman fonts) to html. This is my method. I use illustrator to convert pdf to svg. The embedded svg fonts only work in chrome and opera, so therefore I replace those fonts with woff fonts generated by this product: http://www.idrsolutions.com/online-pdf-to-html5-converter/

It seems like those woff fonts produce better results in chrome. Even in internet explorer and firefox, where the fonts of pdf2htmlex doesn't look bad, it seems like those woff fonts are a bit superior, especially when you zoom out:

woff fonts:
woff

pdf2html fonts:
pdf2htmlex

These are screenshot from IE10/Windows 7.

@coolwanglu
Copy link
Owner

Have you tried ttfautohint ? You may find more info in the wiki.

@kasperpeulen
Copy link
Author

I'm not very good with computers, I'm failing to get linux to work at the moment. I'll try again tomorrow.

Could anybody here maybe check for me how the output of my pdf is with ttfautohint ?

@iapain
Copy link
Collaborator

iapain commented Jul 12, 2013

@coolwanglu Why .woff is not default in options. WOFF is now W3C recommended.

@coolwanglu
Copy link
Owner

@iapain OK, I'll check it out, probably it will be the default if everything is fine.

@coolwanglu
Copy link
Owner

According to http://caniuse.com woff is not widely supported as ttf, actually only on android mobile.

The main problem here is still about hinting, I'm not quite sure if I need to add hinting information there for Windows, if so, I don't find a counterpart for ttfautohint right now.

@iapain
Copy link
Collaborator

iapain commented Sep 5, 2013

AFAIK WOFF support was added in ICS. I just tested it on my Android device (4.1) WOFF renders properly. In addition to that I found this http://blog.typekit.com/2012/02/21/update-to-typekits-android-support/

@coolwanglu
Copy link
Owner

@iapain I'll try on my windows machine later.

@coolwanglu
Copy link
Owner

According to my tests, woff is better in both size and visual effect (comparing with ttf without ttfautohint).
However I found a few bugs for Firefox/Chrome on Linux, probably further due to their backend parsing woff.

I think we will definitely switch to woff, but still we need more time. Currently ttf+ttfautohint seems still to be the best solution overall.

@coolwanglu
Copy link
Owner

#83 is relevant.

@coolwanglu
Copy link
Owner

Currenty if --font-format=woff is used, seems that all italic text cannot be rendered correctly in Firefox + Windows.

It seems to be my fault though.

@iapain
Copy link
Collaborator

iapain commented Nov 7, 2013

We intensively use woff we never found any issue with italic text :)

@coolwanglu
Copy link
Owner

I tried with the demo.pdf in README. The fonts seem to be OK (viewed in font viewer), but some italic ones are not recognized by browsers.
I think I can make woff the default type after fixing this issue.

@coolwanglu
Copy link
Owner

ironically, those fonts work well in IE

@coolwanglu
Copy link
Owner

filed a new issue #238

@coolwanglu
Copy link
Owner

woff is the default format now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants