Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve autohinting on all fonts, not just ttf #160

Merged
merged 2 commits into from
Dec 24, 2013

Conversation

jleider
Copy link
Contributor

@jleider jleider commented Dec 20, 2013

This change significantly improves font clarity for eot files on windows XP (GDI ClearType) and brings minor improvements in windows 7+ (DirectWrite ClearType) by enabling windows compatibility mode on ttfautohint and by moving the ttfautohint before any other fonts are generated from the original ttf, specifically eot and woff. This also has the benefit of adding type hinting to woff files which are used in windows chrome browsers, notorious for pixelated glyphs. You should see a marked improvement here as well.

Some downsides to adding type hinting to these file types is that it will increase file size. However, due to the small size of fonts anyway I think this is a worthy tradeoff. A test font collection of mine including 110 glyphs increased eot from 20k to 35k uncompressed and woff from 12k to 20k uncompressed. svg and ttf file sizes are not impacted.

Justin Leider added 2 commits December 20, 2013 16:06
@kaizau kaizau merged commit d69913a into FontCustom:master Dec 24, 2013
@RoelN
Copy link
Contributor

RoelN commented Feb 6, 2014

I was wondering what the actual impact of hinting is on icons. It seems like something so specifically made for type isn't going to reliably improve icons. Icomoon doesn't hint the icons, and removing the hinting step in Fontcustom doesn't visibly change anything significant.

I think you should show the icon as it was designed (like an SVG would), and leave smoothing/anti-aliasing or subpixel rendering to the browser/OS. What do you guys think?

Hinting also doubles (or sometimes even triples) the font file size, which is a significant downside for web use, so maybe it would be a good thing to make it optional.

@kaizau
Copy link
Member

kaizau commented Feb 8, 2014

@RoelN Good points. I'll run some tests after merging #175 , which is very relevant to this topic.

@vernnobile
Copy link

In theory, truetype hinting (with ttfautohint) of icons could improve their rendering on legacy Windows OS's (e.g. XP) at small sizes, say below 16px. Someone needs to run some tests to see what the differences really are, and whether it's worth it just for the sake of potentially only minor improvements on legacy Windows. In my experience ttfautohint can increase .ttf files sizes by around 20-30%.

@RoelN
Copy link
Contributor

RoelN commented Feb 10, 2014

I'm planning to do some test as well, but it'll be a few days till I have time for that. I figure if you generate a couple different icons with and without hinting and then scrutinize how they are rendered in various browsers, you'll get a pretty good idea if hinting makes a difference.

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

Successfully merging this pull request may close these issues.

None yet

4 participants